Junit单元测试:Could not detect default resource locations for test

1.在web项目(即含有SpringApplication启动类)中test目录新建测试类,包路径和SpringApplication中的扫描路径一致,否则无法启动测试类。若测试类的包路径和启动类的包路径不一致,会出现以下错误信息 Could not detect default resource locations for test(画红线包路径要一致)
相关文章
相关标签/搜索