Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘accountDaoImpl’: Unsatisfied dependency expressed through method ‘setJdbcTemplate’ parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘org.springframework.jdbc.core.JdbcTemplate’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Qualifier(value=jdbcTemplate)}
期待至少有1个组件,但容器中取出的是0。
也就是说你没有注册组件,但你却去容器中取它了。
原因是在application.xml文件中把jdbcTemplate的注册信息给注释了。