Spring AOP (Aspect) Not executing

前端 未结 6 743
没有蜡笔的小新
没有蜡笔的小新 2021-02-05 08:18

I ams using Spring 2.5.6, asm 1.5.3, aspectjrt/aspectjweaver 1.6.1, cglib 2.1_3 In my Web based Spring application I have following class:

package uk.co.txttools         


        
6条回答
  •  长发绾君心
    2021-02-05 08:45

    Finally SOLVED it.

    I think I was missing aspectj-maven-plugin. It required for spring to weaving of aspects. None tutorial provide this information though. Added following to my pom.xml.

    
        org.codehaus.mojo
        aspectj-maven-plugin
        1.0
        
            
                org.aspectj
                aspectjrt
                1.6.1
            
            
                org.aspectj
                aspectjtools
                1.6.1
            
        
        
            
                
                    compile
                    test-compile
                
            
        
        
            true
            true
            true
            
                
                    org.springframework
                    spring-aspects
                
            
            1.6
            1.6
        
    
    

    Thanks guys

提交回复
热议问题