Results 1 to 3 of 3

Thread: autoproxy method interceptors for all beans in application

  1. #1

    Post autoproxy method interceptors for all beans in application

    Hi,

    we have used spring for action injection, now the requirement is, i have to print on console each and every method name and class name (that is for each and every bean in configuration file) on run-time invocation, for that i have followed

    <bean class="org.springframework.aop.framework.autoproxy .BeanNameAutoProxyCreator">
    <property name="beanNames"><value>jdk*,OnlyJdk</value></property>
    <property name="interceptorNames">
    <list>
    <value>beforeInterceptor</value>
    </list>
    </property>
    </bean>


    but it is not working please help me out

  2. #2

    Smile

    Hi ,

    Can you send the entire XML file beacuse from the above example,the value which you have specified is "beforeInterceptor" is just a value.Its should be a reference to one of the SpringsInterceptor .

    kartik

  3. #3

    Default

    Hi

    Following is my xml file


    <bean id="beforeInterceptor" class="com.mycompany.interceptors.MyMethodIntercep tor">
    </bean>



    <bean class="org.springframework.aop.framework.autoproxy .BeanNameAutoProxyCreator">
    <property name="beanNames"><value>jdk*,onlyJdk</value>
    </property>
    <property name="interceptorNames">
    <list>
    <value>beforeInterceptor</value>
    </list>
    </property>
    </bean>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •