(1)通过jUnit进行单元测试时出现 java.lang.IllegalStateException: Failed to load ApplicationContext异常:
此处路径出错
(2)NoSuchBeanDefinitionException: No bean named 'userService' is defined
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'userService' is definedNoSuchBeanDefinitionException: No bean named 'userService' is defined
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'userService' is defined
此处路径出错,配置文件spring-mybatis.xml 找不到,导致注解无法找到userService bean的配置,参见http://www.myexception.cn/operating-system/1462645.html。