我正在尝试从此页面设置 spring AOP 示例:
http://www.javabeat.net/articles/51-introduction-to-springs-aspect-oriented-programminga-4.html
我使用 Eclipse Indigo 作为我的开发环境。
在这些方面:
public class LogAfterThrowsAdvice implements ThrowsAdvice{
public class LogAfterReturningAdvice implements AfterReturningAdvice{
public class LogBeforeCallAdvice implements MethodBeforeAdvice {
我收到消息:
The type org.aopalliance.aop.Advice cannot be resolved. It is indirectly referenced from required .class files
我从这里下载了 org.aopalliance 包:
http://sourceforge.net/projects/aopalliance/
jar 文件是 aopalliance-alpha1.jar。它不包含路径 org.aopalliance.aop。我想知道我是否应该使用不同的 aopalliance jar 文件?
最佳答案
我从这里下载了 jar:
这解决了我的问题。
关于java - 在 spring java 程序中获取消息 "The type org.aopalliance.aop.Advice cannot be resolved.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10214875/