我将我的程序用maven自带的package功能打包之后传给其他人并写了dockerfile如下
FROM java:8
COPY *.jar /VEEProject-0.0.1-SNAPSHOT.jar
CMD ["--server.port=8099"]
EXPOSE 8099
ENTRYPOINT ["java","-jar","/VEEProject-0.0.1-SNAPSHOT.jar"]
文件在我这运行没有问题,当他那边运行时出现如下错误
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.boot.autoconfigure.data.AbstractRepositoryConfigurationSourceSupport$AutoConfiguredAnnotationRepositoryConfigurationSource.<init>(AbstractRepositoryConfigurationSourceSupport.java:133)
The following method did not exist:
org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource.<init>(Lorg/springframework/core/type/AnnotationMetadata;Ljava/lang/Class;Lorg/springframework/core/io/ResourceLoader;Lorg/springframework/core/env/Environment;Lorg/springframework/beans/factory/support/BeanDefinitionRegistry;Lorg/springframework/beans/factory/support/BeanNameGenerator;)V
The calling method's class, org.springframework.boot.autoconfigure.data.AbstractRepositoryConfigurationSourceSupport$AutoConfiguredAnnotationRepositoryConfigurationSource, was loaded from the following location:
jar:file:/Users/matthewwilliams/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.7.8/spring-boot-autoconfigure-2.7.8.jar!/org/springframework/boot/autoconfigure/data/AbstractRepositoryConfigurationSourceSupport$AutoConfiguredAnnotationRepositoryConfigurationSource.class
The called method's class, org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource, is available from the following locations:
jar:file:/Users/matthewwilliams/.m2/repository/org/springframework/data/spring-data-commons/2.1.2.RELEASE/spring-data-commons-2.1.2.RELEASE.jar!/org/springframework/data/repository/config/AnnotationRepositoryConfigurationSource.class
The called method's class hierarchy was loaded from the following locations:
org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource: file:/Users/matthewwilliams/.m2/repository/org/springframework/data/spring-data-commons/2.1.2.RELEASE/spring-data-commons-2.1.2.RELEASE.jar
org.springframework.data.repository.config.RepositoryConfigurationSourceSupport: file:/Users/matthewwilliams/.m2/repository/org/springframework/data/spring-data-commons/2.1.2.RELEASE/spring-data-commons-2.1.2.RELEASE.jar
Action:
Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.data.AbstractRepositoryConfigurationSourceSupport$AutoConfiguredAnnotationRepositoryConfigurationSource and org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource
请问这样的错误在哪边修改会方便一点,或者我这边不打包,把代码给他,并写一个dockerfile给他,在他那边build能否解决?