要使用springtest来进行单元测试 否则将无法注入 applicationContext.xml

spring test

原文地址:https://www.cnblogs.com/kinome/p/9284292.html