在命令行中打包失败

来源:3-1 人生中第一个SpringBoot程序

weixin_慕UI9059703

2020-01-14 16:22

-------------------------------------------------------------------------------

Test set: com.imoo.luckymoney.LuckymoneyApplicationTests

-------------------------------------------------------------------------------

Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.119 s <<< FAILURE! - in com.imoo.luckymoney.LuckymoneyApplicationTests

initializationError(com.imoo.luckymoney.LuckymoneyApplicationTests)  Time elapsed: 0.003 s  <<< ERROR!

java.lang.Exception: The class com.imoo.luckymoney.LuckymoneyApplicationTests is not public.


initializationError(com.imoo.luckymoney.LuckymoneyApplicationTests)  Time elapsed: 0.001 s  <<< ERROR!

java.lang.Exception: Test class should have exactly one public constructor


initializationError(com.imoo.luckymoney.LuckymoneyApplicationTests)  Time elapsed: 0.001 s  <<< ERROR!

java.lang.Exception: Method contextLoads() should be public


写回答 关注

3回答

  • 带带太师兄
    2020-03-26 14:00:22

    The class com.imoo.luckymoney.LuckymoneyApplicationTests is not public.

    把类跟方法都声明为public

  • 慕工程5139473
    2020-03-05 22:22:19

    http://img3.mukewang.com/5e610ab70001c91107650335.jpg

    你改成这样看看

    或者这样

    http://img.mukewang.com/5e610b1800012a6609570482.jpg

  • weibo_慕虎1439260
    2020-01-16 15:15:18

    The class com.imoo.luckymoney.LuckymoneyApplicationTests is not public.

2小时上手SpringBoot

2小时上手SpringBoot,实战开发红包表白程序,体现程序员专属花式浪漫

11882 学习 · 115 问题

查看课程

相似问题