请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

新创建的项目打包错误

新建spring初始化工程的时候,引用的springboot版本和springcloud版本和你的保持一致,settings配置文件用的是spring的仓库和你的保持一致,项目创建完之后,打包失败,但是编译和clean是正常的

截图示例:
图片描述图片描述

打包错误信息
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.01 s <<< FAILURE! - in com.huamai.eureka.EurekaApplicationTests
contextLoads Time elapsed: 0.002 s <<< ERROR!

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2019-08-14 17:49:26.425 ERROR 47724 — [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘configurationPropertiesBeans’ defined in org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.context.properties.ConfigurationPropertiesBeans]: Factory method ‘configurationPropertiesBeans’ threw exception; nested exception is java.lang.NoSuchFieldError: BINDER_BEAN_NAME

Caused by: java.lang.NoSuchFieldError: BINDER_BEAN_NAME

正在回答

1回答

试试先跳过单侧看能打包成功吗?

1 回复 有任何疑惑可以回复我~
  • 提问者 简单_阳 #1
    老师,可以了,但是为什么有测试单元就打包失败了呢
    回复 有任何疑惑可以回复我~ 2019-08-14 18:48:59
  • 提问者 简单_阳 #2
    非常感谢!
    回复 有任何疑惑可以回复我~ 2019-08-14 19:11:16
  • 廖师兄 回复 提问者 简单_阳 #3
    具体要看test的方法。springboot的版本和课程保持一致。
    回复 有任何疑惑可以回复我~ 2019-08-15 15:52:13
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号