大致如下:
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:125)
主要原因在于ApplicationContext的配置文件中有这么一段
方案一:看到了如上这个context标签里面的location属性写错了,把如上的“classpath:*.properties” 值改为"classpath:jdbc.properties",反正就是指定我图上目录下的这个模块的具体jdbc配置文件。不然他会把其他模块一起扫了。
方案二:当然也可以直接在jdbc.properties文件下把数据库用户名和密码写固定的值也可,但不推荐
The end!! 2023.5.7