【发布时间】:2012-01-06 12:32:43
【问题描述】:
我目前正在努力完成“Spring in Action”。从这些方面开始被卡住,我想知道是否有人能看到我的错误。 在我的 AppConfig.xml 中,我开始 bean-declaratiotn:
<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">
运行应用程序,我得到以下异常:
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
定义可能有误?
任何帮助表示赞赏!
问候, 马库斯
【问题讨论】:
-
这不是配置错误,而是缺少库错误。你在部署 aop 依赖吗?