Hello - I'm trying to use a spring aop aspect with a servlet.
I have the following spring configuration:
<aop:aspectj-autoproxy proxy-target-class="true"/>
<aop:config>
<aop:pointcut id="monitorScope" expression="(execution(* com.probuild.intranet.web.servlet..doGet(..)))" />
<aop:aspect id="myMonitoringAspect" ref="monitoringAspect">
<aop:around method="monitor" pointcut-ref="monitorScope" />
</aop:aspect>
</aop:config>
<bean id="monitoringAspect" class="com.probuild.aspects.AroundAspect" />
and the following web configuration:
<servlet>
<servlet-name>AssetServlet</servlet-name>
<servlet-class>
com.probuild.intranet.web.servlet.IntraAssetServle t
</servlet-class>
<init-param>
<param-name>folderFilter</param-name>
<param-value>/intranet/resources</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>AssetServlet</servlet-name>
<url-pattern>/asset</url-pattern>
</servlet-mapping>
When deployed, the monitoringAspect does not get executed when the doGet method is called. I've tried a variety of configurations but as of yet have not been able to find the sweet spot. Does anyone see anything obviously wrong with this config? Or better still, does anyone have any suggestions that I might try?
Thanks in advance for your help.


Reply With Quote
