摘要: 在Test中写测试代码时,与直接启动项目不同,不会启动spring,需要手动去加载spring,具体例子如下:首先在引入spring等依赖的同时要引入junit与spring-test这两个测试工具。 ... 阅读全文
posted @ 2019-03-04 13:45 DingDingDongDong 阅读(69) 评论(0) 推荐(0) 编辑
摘要: java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.c... 阅读全文
posted @ 2019-03-04 11:13 DingDingDongDong 阅读(180) 评论(0) 推荐(0) 编辑