org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘userServiceImpl’: Unsatisfied dependency expressed through field ‘userMapper’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userMapper’ defined in file [E:\JavaCodeBase\SSM\HomeworkCode\homework15\day15-homework\target\day15-homework-1.0-SNAPSHOT\WEB-INF\classes\com\qyt\mapper\UserMapper.class]: Cannot resolve reference to bean ‘sqlSessionFactory’ while setting bean property ‘sqlSessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [application.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type ‘java.lang.String’ to required type ‘org.apache.ibatis.type.TypeHandler[]’ for property ‘typeHandlers’; nested exception is java.lang.IllegalStateException: Cannot convert value of type ‘java.lang.String’ to required type ‘org.apache.ibatis.type.TypeHandler’ for property ‘typeHandlers[0]’: no matching editors or conversion strategy found
解决:
配置文件中typeHandler的格式配置不对,改为下面的这种格式。