报错

java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
......
......
......
......
......
......
......

 

我当时运行SpringBoot测试类的时候踩这个坑,当时的解决办法就是,原本的包名为test现在改为panfeng就行了.

SpringBoot测试类启动错误 java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you ne...

这里的主配置类也就是`PanfengUploadApplication`所在包是 java 下的 `panfeng`

所以测试类的`FastDFSTest`也要在 java 下的 `panfeng`包

 

相关文章:

  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2021-04-09
猜你喜欢
  • 2021-08-22
  • 2021-08-12
  • 2021-05-14
  • 2021-10-05
  • 2021-10-24
  • 2021-04-20
相关资源
相似解决方案