[AppClassLoader@18b4aac2] error can't determine implemented interfaces of missing type org.springframework.cache.ehcache.EhCacheCacheManager
when weaving type org.springframework.boot.autoconfigure.cache.EhCacheCacheConfiguration
when weaving classes
when weaving
[Xlint:cantFindType]
[AppClassLoader@18b4aac2] error can't determine implemented interfaces of missing type org.springframework.cache.ehcache.EhCacheCacheManager
when weaving type org.springframework.boot.autoconfigure.cache.EhCacheCacheConfiguration
when weaving classes
when weaving
字符串
这些警告到底是什么?
我已经在我的应用中创建了一个 @Aspect 类,它可以正常工作。
我对atm的了解并不深,只有我知道当应用程序将我的方面编织到应该使用它的类中时存在的那一刻。
我很困惑。为什么应用程序要编织我在这个日志中看到的类?
- PS* stackoverflow给了我一个如何避免警告的答案(aop.xml)。但我想知道这个警告最初的原因是什么。将来会不会是问题。
1条答案
按热度按时间kqqjbcuj1#
看起来你的切入点太宽了,试图编织到所有现有的Spring组件中,包括Spring自己的组件,fox example class
EhCacheCacheConfiguration
,这是一个Sping Boot 类。显然,这个类引用了Spring Core classEhCacheCacheManager
,当试图将aspect编织到configuration类或其中一个组件/bean时,这个类是不可用的。这是一个经典的全局“编织整个世界”方面的 Bootstrap 问题。我不认为
aop.xml
文件会在这里帮助你,因为可能,像大多数用户一样,你正在使用默认的AOP框架Spring AOP,而不是原生的AOP J,但aop.xml
仅适用于A/D/J负载-时间织入配置。你想做的是通过向切入点添加类似&& within(my.target.package..*)
的东西来限制你的方面的目标范围。可能错误就消失了。