对接某支付,对方提供sdk后在本地修改pom引入后打成jar包,docker启动时报找不到
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actServiceImpl': Failed to introspect bean class [com.psbc.demo.service.impl.ActServiceImpl] for lookup method metadata: could not find class that it depends on; nested exception is java.lang.NoClassDefFoundError: com/shopoint/openapis/common/auth/CredentialsProvider
2024-09-05 12:31:50.359 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2024-09-05 12:31:50.463 INFO 1 --- [ main] utoConfigurationReportLoggingInitializer :
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2024-09-05 12:31:50.472 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'actServiceImpl': Failed to introspect bean class [com.psbc.demo.service.impl.ActServiceImpl] for lookup method metadata: could not find class that it depends on; nested exception is java.lang.NoClassDefFoundError: com/shopoint/openapis/common/auth/CredentialsProvider
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:321)
本地不打jar运行正常,打成jar包后运行异常,emo...
多方探查下找到解决方法:
在pom.xml文件中找到spring-boot-maven-plugin插件,添加如下配置
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
需要配置一下!!!!!