发布网友 发布时间:2022-04-23 13:16
共1个回答
热心网友 时间:2023-10-12 02:07
原因可能如下:
1、可能是使用了外部属性文件,没有导入外部资源文件报错;
解决方案:引入外部资源文件,在Spring配置文件中加入:<context:property-placeholder location="classpath:db.properties"/>
2、Spring配置文件正确,是因为没有导入aspectjweaver.jar包;
解决方案:导入aspectjweaver.jar包就不报错啦,没有导入aspectjweaver.jar可能会报错:Caused by: java.lang.NoClassDefFoundError:org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException,aspectjweaver.jar是和Spring AOP有关的jar包;
热心网友 时间:2023-10-12 02:07
原因可能如下:
1、可能是使用了外部属性文件,没有导入外部资源文件报错;
解决方案:引入外部资源文件,在Spring配置文件中加入:<context:property-placeholder location="classpath:db.properties"/>
2、Spring配置文件正确,是因为没有导入aspectjweaver.jar包;
解决方案:导入aspectjweaver.jar包就不报错啦,没有导入aspectjweaver.jar可能会报错:Caused by: java.lang.NoClassDefFoundError:org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException,aspectjweaver.jar是和Spring AOP有关的jar包;
热心网友 时间:2023-10-12 02:07
原因可能如下:
1、可能是使用了外部属性文件,没有导入外部资源文件报错;
解决方案:引入外部资源文件,在Spring配置文件中加入:<context:property-placeholder location="classpath:db.properties"/>
2、Spring配置文件正确,是因为没有导入aspectjweaver.jar包;
解决方案:导入aspectjweaver.jar包就不报错啦,没有导入aspectjweaver.jar可能会报错:Caused by: java.lang.NoClassDefFoundError:org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException,aspectjweaver.jar是和Spring AOP有关的jar包;