springboot test 报错解决办法:Unable to find a @SpringBootConfiguration, you need to use @Context
包名
保证test下的包路径和项目下java的包路径相同
在java路径下放置一个Application
/**
* 提供给springboot test使用
* @author humorchen
* @date 2022/7/27 10:31
*/
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
本文来自博客园,作者:HumorChen99,转载请注明原文链接:https://www.cnblogs.com/HumorChen/p/18039481