解决java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use

1.遇到的问题: 在单元测试的时候报:java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use 问题有可能是有两个: 1.你没有写启动类: 2.虽然你写了启动类但是你的启动类所在的包和单元测试的包不在同一级根目录下。如上图:一个是在cn.gitv.pro.charging.
相关文章
相关标签/搜索