【发布时间】:2018-12-25 00:15:05
【问题描述】:
测试类:
@RunWith(SpringRunner.class)
@SpringBootTest
public class FileInterfaceTest {
@Test
public void contextLoads() {
}
}
应用:
应用配置:
@Configuration
@ImportResource({ "classpath:process-flows.xml" })
public class AppConfig {
}
有 Bootstraploader 类。
错误:
java.lang.IllegalStateException: Failed to load ApplicationContext
Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [file.properties] cannot be opened because it does not exist
资源位置:
src/main/resources
---process-flow.xml
--- process.yml
src/main/resources/env/cconfig
--- file.properties
【问题讨论】:
标签: spring-boot spring-boot-test spring-junit springjunit4classrunner