SpringXML名称空间
我目前正在努力完成《行动中的春天》。我被困在从方面开始,我想知道是否有人能看到我的错误。 在我的AppConfig.xml中,我用以下命令启动bean声明:SpringXML名称空间,xml,spring,config,Xml,Spring,Config,我目前正在努力完成《行动中的春天》。我被困在从方面开始,我想知道是否有人能看到我的错误。 在我的AppConfig.xml中,我用以下命令启动bean声明: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/sche
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
定义可能是错误的
感谢您的帮助
问候,,
Marcus确保项目中包含spring-aop.jar、aopalliance.jar或aspectjtools-1.6.0.jar。错误表明在类路径上找不到Advice类。它可以在我提到的两个罐子中找到,具体取决于您使用的Spring版本
在启动应用程序开发Spring 3.0版本时,我也遇到了同样的问题 AOP已从3.0版本中删除 因此,您需要显式下载这个特殊的jar{aopalliance-1.0.jar},并将其放在您的类路径中
这将解决问题。不是配置错误,而是缺少库错误。您正在部署aop依赖项吗?实际上,缺少的是aspectjtools-1.6.0.jar,spring发行版似乎已经完成。没有什么可以探索新语言的领域8)@Marcus Toepper谢谢你的更新,我编辑了我的答案以包含你的发现。
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [config/AppConfig.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice