测试类:
@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