Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 683263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:41:17+00:00 2026-05-14T01:41:17+00:00

I am new to working with Spring on regular basis so I had a

  • 0

I am new to working with Spring on regular basis so I had a basic design question on it.

Should the concept of interceptors be used for separating out business logic in an application. E.g. A method getData is called from 3 classes/ One of the 3 needs some more processing before reaching the data. This processing is not a concern like logging etc which seems to be used more in examples for interceptors (I am basing this purely on my limited reading of Manning book), but a proper business logic of the app.

Should I be using interceptor here at all or normal if else or overriding should be used?

This has been my general curiosity to understand that whether interceptors only make sense for framework level concerns?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:41:17+00:00Added an answer on May 14, 2026 at 1:41 am

    Since your custom logic execution would depend on the caller, not the called method, using an interceptor is indeed a strange choice.

    Not knowing the details about your exact case, I’d suggest adding another method that executes the additional logic, and call it. In case you call 3 times the same method on the same interface but with 3 underlying implementations, just append the additional code in one of the underlying implementations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I'm getting a new job working with databases (Microsoft SQL Server to be
In the course of my career I've noticed that developers working on new functionality
When working on developing new software i normally get stuck with the redundancy vs
I am working on a new project. Is there any benefit with going with
I am working in a new part of an existing system. What are the
I was working with a new C++ developer a while back when he asked
I'm working on a new project, a web application, where I need to focus
We are working with some new Cutting Tools that can have it's hardware parameters
I'm working on a new project and i want to do something similar (somehow)
I'm working on a new project and I'm using the repository pattern, I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.