spring AOP使用中Error creating bean with name ‘…’defined in class path resource..问题及其解决方法

2018/3/24 异常小记

工作环境:myeclipse2015(jar与java compiler 版本一致)、windows10

工作内容:spring 中AOP的使用测试

异常信息:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘AuthBeforeAdvice‘ defined in class path resource [applicationContext2.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘org.springframework.aop.aspectj.AspectJPointcutAdvisor#0‘: Cannot create inner bean ‘(inner bean)#19f3736‘ of type [org.springframework.aop.aspectj.AspectJMethodBeforeAdvice] while setting constructor argument; nested exception is

。。。。。。

异常原因:aspectjweaver.jar 版本冲突,导致无法正常引用。

异常前用户库:

解决方法:更换新版本的jar包

aspectjweaver-1.6.1.jar下载地址:

http://www.java2s.com/Code/Jar/a/Downloadaspectjweaver172jar.htm

snail 原创,欢迎转载,转载请注明出处。欢迎留言交流,期待共同进步。

QQ:185466981

原文地址:https://www.cnblogs.com/snail-coder/p/8639291.html

时间: 2024-10-12 04:01:35

spring AOP使用中Error creating bean with name ‘…’defined in class path resource..问题及其解决方法的相关文章

Java AOP nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice || Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0' 两个异常解决办法

贴出applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://ww

spring测试出错:Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name &#39;org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0&#39;:

解决办法 这里找不到根路径,也就找不到Spring-config.xml的配置,所以加上更改根路径的注解@WebAppConfiguration(“src/main/resources”)就解决了 1 @RunWith(SpringJUnit4ClassRunner.class) 2 @WebAppConfiguration("src/main/resources") //加上这个注解完美解决 3 @ContextConfiguration(locations = {"cla

spring Error creating bean with name &#39;xxxx&#39;

解决办法: 1.检查Service 扫描applicationContext包的配置web.xml 是否写错了 2.检查spring配置相关的配置,是否配置错误;尤其注意看一下spring自动扫描的包路径 3.检查spring mvc相关配置,是否配置错误 4.检查@Autowired,@Service,@Controller导包是否正确 5.检查QQ,会占用端口,电脑管家WiFi会生成intc6与zookeeper的ip冲突导致服务发布不到指定虚拟机ip,断掉wifi spring Error

Spring Boot - Error creating bean with name &#39;dataSource&#39; defined in class path resource

看起来像最初的问题是与自动配置. 如果你不需要数据源,只需从自动配置过程中删除它: @EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class}) Spring Boot - Error creating bean with name 'dataSource' defined in class path resource 原文地址:https://www.cnblogs.com/valu/p/8371296.html

Spring Boot 报错:Error creating bean with name &#39;entityManagerFactory&#39; defined in class path resource

spring boot 写一个web项目,在使用spring-data-jpa的时候,启动报如下错误: Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.2018-04-02 17:00:47.076 ERROR 4648 --- [ main] o.s.boot.SpringApplication : A

spring boot maven install时报错 Error creating bean with name &#39;serverEndpointExporter&#39;

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverEndpointExporter' defined in class path resource [com/pky/testmybatis/config/WebSocketConfig.class]: Invocation of init method failed; nested exception is j

org.springframework.beans.factory.BeanCreationException: Error creating bean with name &#39;org.mybatis.spring.mapper.MapperScannerConfigurer#0&#39; defined in class path resource

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.mapper.MapperScannerConfigurer#0' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exc

Error creating bean with name &#39;org.apache.cxf.spring.boot.autoconfigure.CxfAutoConfiguration

Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'org.apache.cxf.spring.boot.autoconfigure.CxfAutoConfiguration': Initialization of bean failed; nested exception

Spring Boot报错Error creating bean with name &#39;userRepository&#39;: Invocation of init method failed; nested exception

问题:出现UserRePository注入创建失败,一定先检查所有的@注解是否已经标记 问题发现:entity下的实体类上面没有加注解  任何基于hibernate的实体类一定要加上@Entity注解! Spring Boot报错Error creating bean with name 'userRepository': Invocation of init method failed; nested exception 原文地址:https://www.cnblogs.com/my-prog