如何解决更正应用程序的类路径,使其包含单个兼容版本的 javax.annotation.Resource
我收到此错误_>
2021-03-10 11:20:55.145 ERROR --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.<init>(CommonAnnotationBeanPostProcessor.java:628)
The following method did not exist:
'java.lang.String javax.annotation.Resource.lookup()'
The method's class,javax.annotation.Resource,is available from the following locations:
jar:file:/C:/repos/project/lib/jboss-jaxws.jar!/javax/annotation/Resource.class
jar:file:/C:/Users/username/.gradle/caches/modules-2/files-2.1/javax.annotation/javax.annotation-api/1.3.2/934c04d3cfef185a8008e7bf34331b79730a9d43/javax.annotation-api-1.3.2.jar!/javax/annotation/Resource.class
jar:file:/C:/Users/username/.gradle/caches/modules-2/files-2.1/org.apache.tomcat/tomcat-annotations-api/9.0.39/53d0991b26632c4eaa6c67bfba1a15ca7d929e11/tomcat-annotations-api-9.0.39.jar!/javax/annotation/Resource.class
It was loaded from the following location:
file:/C:/repos/project/lib/jboss-jaxws.jar
Action:
Correct the classpath of your application so that it contains a single,compatible version of javax.annotation.Resource
当我检查时,lookup() 方法在 annotation.Resource 中的 jboss-jaxws.jar 中不可用
但它在这两个中可用- javax.annotation/javax.annotation-api 资源类 org.apache.tomcat/tomcat-annotations-api 资源类
如何添加 crrect 类路径以使其包含正确的 Resource.class
我正在使用-> 圣杯 4.0.8 使用 gradle 构建
附言- 如果有帮助,我会将 grails 从 2.4.x 升级到 4.0.8
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。