I am trying to configure multiple pointcuts and use method tracking. With the following configuration I get an exception when running the application.
<aop:pointcut id="services" expression="execution(* org.yourscrum.service.*Service.*(..))"/>
<aop:advisor advice-ref="trackingAdvice" pointcut-ref="services"/>
org.springframework.beans.factory.BeanInitializationException: Property 'application' is required for bean 'trackingAdvice'
Any ideas how to resolve this?
you need to add the 'application' attribute to bt:advice; so
<bt:advice id="trackingAdvice" application="myApplicationName"/>
myApplicationName can be any string. it's just some name you want to give this application for logging purposes.
The problem with the application attribute is that it is not supported by the xsd schema
i see your point :)
the code supports it, but the schema does not. try this workaround, which involves adding an explicit <bt:manager> tag:
<bt:manager id="defaultTrackingManager" application="myAppName"/>
<bt:advice id="trackingAdvice" tracking-manager="defaultTrackingManager"/>
if you already have a bt:manager tag defined (based on your other forum posts, i think you might), just reference that one.
i'll add a defect -- i think we need to add the application attribute to the schema for this use case.
defect report added: https://sourceforge.net/tracker/?func=detail&aid=2847429&group_id=258926&atid=1127321
No, tried that before, and just to be absolutely sure, tried it again. Problem is the @Required in BehaviorTrackingAdvice for the setter of the application property.
Log in to post a comment.