我们在JBoss 7.1.1上运行spring应用程序-最终我们需要在org.springframework.integration.http.inbound.HttpRequestHandlingMessagingGateway,中拦截sendAndReceive方法的执行。我们有自己的AspectJ方面,可以很好地与我们自己的bean一起工作,但我们不能用它来编织(加载时) HttpRequestHandlingMessagingGateway类。编织springframework bean有什么限制吗?对如何做有什么建议吗?在我们的aop.xml中我们有
<weaver options="-verbose -showWeaveInfo -debug">
<include within="org.springframework.integration.http.inbound.*"/>
</weaver>我们还尝试在pom中添加weaveDependecies块,如下所示
<weaveDependencies>
<weaveDependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-http</artifactId>
</weaveDependency>
</weaveDependencies>但这并没有帮助
发布于 2015-08-30 15:34:24
免责声明:我不是一个Spring用户,而是一个AspectJ专家。
sendAndReceive方法受保护,为true。但在AspectJ中,这不是问题,只要有正确的切入点,只在Spring AOP中。因此,如果您使用AspectJ LTW,这不是根本原因。
根据Javadoc的说法,在这个包中有三个带有sendAndReceive的类,但每个类都继承了org.springframework.integration.gateway.MessagingGatewaySupport类。因此,您可能希望编织该包或类,否则该类中的execution()连接点将被排除在编织之外。
https://stackoverflow.com/questions/32230131
复制相似问题