maven spring boot引入本地jar不能打入部署包

对接某支付,对方提供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>

需要配置一下!!!!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值