记录一下下:
练习AOP编程时,spring配置的没有错,但是一直报这个错误:
Error creating bean with name 'empService' defined in class path resource [aop/spring.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/NativeDetector
大概意思就是嵌套异常spring框架中的NativeDetector引用找不到了
多翻排查,最后发现问题出在pom文件。spring-aop版本过高,spring-expression和spring-aspects都是5.3.3,但是aop是5.3.5。降到5.3.3之后终于不报错了