java我的应用程序有应用程序。然而,Spring boot应用程序正在抱怨这个应用程序。找不到属性
我的申请有申请权。然而,主和测试资源文件夹中的yml应用程序(带Maven的Spring boot 2.4)正在抱怨该应用程序。找不到属性
下面是错误
2021-07-08 04:37:33.381 ERROR --- [ main] o.s.test.context.TestContextManager : Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@bd4ee01] to prepare test instance [com.test.SomeTests@6a7aa675]
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132)
...
Caused by: java.io.FileNotFoundException: class path resource [application.properties] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:187)
我试图在网上找到解决方案,但没能找到。请帮忙
共 (0) 个答案