springAOP demo 带错误解决文档
2015-10-18 16:34
337 查看
首先要说的是目前spring最新版本的下载
1.树形结构:http://repo.springsource.org/libs-release-local/org/springframework/spring/
2.相关依赖包可以在这里下载 http://www.apache.org/
在搭建spring项目时通常需要这些jar包
commons-logging-1.1.3.jar
spring-aop-4.0.6.RELEASE.jar
spring-beans-4.0.6.RELEASE.jar
spring-context-4.0.6.RELEASE.jar
spring-core-4.0.6.RELEASE.jar
spring-expression-4.0.6.RELEASE.jar
在使用spring额外功能时
1 需要在xml文件中加入命名空间
可以在spring-framework-4.0.6.RELEASE\docs\spring-framework-reference\html 中搜索关键字查找配置
2 加入需要的jar包(依赖包)
由于没有引入 spring-aop-4.0.6.RELEASE.jar引起的错误
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:Configuration problem:
Unable to locate Spring NamespaceHandler for XMLschema namespace [http://www.springframework.org/schema/aop]
Offendingresource: class path resource [beans.xml]
atorg.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70)
由于缺少依赖包 aspectjweaver-1.6.12.jar
http://search.maven.org/remotecontent?filepath=org/aspectj/aspectjweaver/1.6.12/aspectjweaver-1.6.12.jar
org.springframework.beans.factory.BeanCreationException:Error creating bean with name'org.springframework.aop.config.internalAutoProxyCreator': Instantiation ofbean failed; nested exception is org.springframework.beans.BeanInstantiationException:Could not
instantiate bean class[org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]:Constructor threw exception; nested exception is
java.lang.NoClassDefFoundError:org/aspectj/lang/annotation/Around
由于缺少依赖包 aopalliance-1.0.jar
org.springframework.beans.factory.BeanCreationException:Error creating bean with name'org.springframework.aop.config.internalAutoProxyCreator': Instantiation ofbean failed; nested exception is org.springframework.beans.BeanInstantiationException:Could not
instantiate bean class[org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]:Constructor threw exception; nested exception is java.lang.NoClassDefFoundError:org/aopalliance/intercept/MethodInterceptor
1.树形结构:http://repo.springsource.org/libs-release-local/org/springframework/spring/
2.相关依赖包可以在这里下载 http://www.apache.org/
在搭建spring项目时通常需要这些jar包
commons-logging-1.1.3.jar
spring-aop-4.0.6.RELEASE.jar
spring-beans-4.0.6.RELEASE.jar
spring-context-4.0.6.RELEASE.jar
spring-core-4.0.6.RELEASE.jar
spring-expression-4.0.6.RELEASE.jar
在使用spring额外功能时
1 需要在xml文件中加入命名空间
可以在spring-framework-4.0.6.RELEASE\docs\spring-framework-reference\html 中搜索关键字查找配置
2 加入需要的jar包(依赖包)
由于没有引入 spring-aop-4.0.6.RELEASE.jar引起的错误
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:Configuration problem:
Unable to locate Spring NamespaceHandler for XMLschema namespace [http://www.springframework.org/schema/aop]
Offendingresource: class path resource [beans.xml]
atorg.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70)
由于缺少依赖包 aspectjweaver-1.6.12.jar
http://search.maven.org/remotecontent?filepath=org/aspectj/aspectjweaver/1.6.12/aspectjweaver-1.6.12.jar
org.springframework.beans.factory.BeanCreationException:Error creating bean with name'org.springframework.aop.config.internalAutoProxyCreator': Instantiation ofbean failed; nested exception is org.springframework.beans.BeanInstantiationException:Could not
instantiate bean class[org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]:Constructor threw exception; nested exception is
java.lang.NoClassDefFoundError:org/aspectj/lang/annotation/Around
由于缺少依赖包 aopalliance-1.0.jar
org.springframework.beans.factory.BeanCreationException:Error creating bean with name'org.springframework.aop.config.internalAutoProxyCreator': Instantiation ofbean failed; nested exception is org.springframework.beans.BeanInstantiationException:Could not
instantiate bean class[org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]:Constructor threw exception; nested exception is java.lang.NoClassDefFoundError:org/aopalliance/intercept/MethodInterceptor
相关文章推荐
- java值传递还是应用传递
- Struts-文件上传
- 如何在eclipse显示struts中的.class的反编译源码
- Struts2标签
- 关于Java的数据类型以及相互转换
- ASCII码对照表编程(java)
- Struts自定义类型转换器
- SpringMVC 使用JSR-303进行校验 @Valid
- shiro-cas集成实战
- java——递归调用
- 从校园到工作的路(三)——那些java中的常见异常与错误
- java.util.Properties类 学习笔记2
- Java IO4:字符编码
- java中重载与重写的区别
- java.util.Properties类 学习笔记1
- java实现内部类
- Spring MVC之@RequestParam @RequestBody @RequestHeader 等详解
- 关于Eclipse 和 IDEA 导入library库文件 的步骤
- Eclipse build launcher 3具体步骤
- java入门第八天 数组的复制扩容(截取)