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

  • SEARCH
  • Home
  • 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 8828615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:38:51+00:00 2026-06-14T07:38:51+00:00

Spring AOP has a method-level tracer called CustomizableTraceInterceptor . Using Spring’s XML configuration approach,

  • 0

Spring AOP has a method-level tracer called CustomizableTraceInterceptor. Using Spring’s XML configuration approach, one would set up this tracer like so:

<bean id="customizableTraceInterceptor" class="
  org.springframework.aop.interceptor.CustomizableTraceInterceptor">
  <property name="enterMessage" value="Entering $[methodName]($[arguments])"/>
  <property name="exitMessage" value="Leaving $[methodName](): $[returnValue]"/>
</bean>

<aop:config>
  <aop:advisor advice-ref="customizableTraceInterceptor"
    pointcut="execution(public * org.springframework.data.jpa.repository.JpaRepository+.*(..))"/>
</aop:config>

I would like to set up above configuration using Spring’s JavaConfig style (i.e. taking advantage of Java annotations, especially @EnableAspectJAutoProxy for activating AspectJ in JavaConfig).

@Configuration
@EnableTransactionManagement
@EnableJpaRepositories(basePackages = { "some.package" })
@ComponentScan(basePackages = { "some.package2", "some.package3" })
@EnableAspectJAutoProxy
public class FacebookDomainConfiguration {

    @Bean someBean() {
    ...
    }
...
}

What is the @EnableAspectJAutoProxy-style equivalent for <aop:advisor advice-ref="customizableTraceInterceptor" ...>?

  • 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-06-14T07:38:52+00:00Added an answer on June 14, 2026 at 7:38 am

    Unfortunately, you cannot because the Java language does not support method literals which would be needed to support this in Spring JavaConfig. A bug was opened for this but marked as “Won’t Fix”: https://jira.springsource.org/browse/SPR-8148.

    The two options mentioned in the bug report are:

    1. Continue using <aop:config> by including the relevant XML snippet using @ImportResource
    2. Convert any existing <aop:config> elemements to use @Aspect style. [which is not possible with the CustomizableTraceInterceptor]
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a spring app with aop enabled using cglib proxies for logging: <?xml
I'm using Spring.NET AOP to determine when a C# persistent object has change any
I am working on profiling a legacy application using Spring AOP and I want
I'm writing very basic schema-based Spring AOP, here's the .xml <bean id=aoplistener class=tao.zhang.Listener/> <aop:config>
I am new to (Spring) AOP and I would like to get some suggestions
I'm using spring AOP to advice my services methods and especially ones returning an
I'm at the moment using spring AOP + Ehcache for our scala application. I
When using Spring AOP to create a proxy for a class using NameMatchMethodPointcutAdvisor and
Spring has been a good framework for DI and AOP for Java developers. Now,
I was trying to implement Spring AOP in web app. Unfortunately all the sample

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.