springboot中java.lang.IllegalStateException: No typehandler found for property xxx错误

springboot完成一对多实体的映射,属性对象匹配不到

17:24:06.648 ocr [main] ERROR o.s.boot.SpringApplication - Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘asynTask’: Unsatisfied dependency expressed through field ‘ocrBillService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘ocrBillService’: Unsatisfied dependency expressed through field ‘mapper’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ocrBillMapper’ defined in file [C:\amyfile\香侬\project\finance-icr-master\target\classes\com\sinochem\finance\ocr\mapper\OcrBillMapper.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 [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method ‘sqlSessionFactory’ threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘file [C:\amyfile\香侬\project\finance-icr-master\target\classes\mapper\SysOcrUserMapper.xml]’; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: java.lang.IllegalStateException: No typehandler found for property sysOcrDept

解决方案:在实体类中注入的该实体对象去掉即可

你可能感兴趣的:(常见错误汇总,spring)