java - Pointcuts not intercepting appropriate points -



java - Pointcuts not intercepting appropriate points -

eventserviceaspect.java

public eventserviceaspect{ @pointcut(value="call(* com.xyz.serviceinput.callsetup(..))") public void anycallsetup(){} @after("anycallsetup() && @annotation(publisheventtoservice)") public void publishevent(joinpoint jp, publisheventtoservice publisheventtoservice){ log.warn("batman here!"); } }

sampleclass.java

public sampleclass{ @publisheventtoservice public void somefunc(){ serviceinput.callsetup("testing testing") } }

the callsetup not beingness intercepted pointcut. thought what's wrong code?

it's big configuration file...the relevant part is:

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:util="http://www.springframework.org/schema/util" xmlns:task="http://www.springframework.org/schema/task" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemalocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd" default-init-method="init"> <aop:aspectj-autoproxy proxy-target-class = "true"/>

please check this

http://eggsylife.co.uk/2010/02/03/spring-annotation-based-aop-and-intercepting-the-ball/

and should execution instead of call

java spring aop aspectj spring-aop

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -