admin管理员组文章数量:1130349
原因分析:添加了JSON类型处理器 :@TableField(typeHandler = JacksonTypeHandler.class)
今天在使用MP的提供CRUD方法把User实体中的某个类类型的属性与对应数据库表中的JSON类型的字段进行互转:
在类上开启自动映射并在类的属性(类类型)上添加Json类型处理器,添加后Mp会自动将该指定的属性与数据库字段互转,但之前自定义的SQL没自动转换,所以就报错了。
报错内容:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userService': Error creating bean with name 'userServiceImpl': Injection of resource dependencies failed
原因分析:添加了JSON类型处理器 :@TableField(typeHandler = JacksonTypeHandler.class)
今天在使用MP的提供CRUD方法把User实体中的某个类类型的属性与对应数据库表中的JSON类型的字段进行互转:
在类上开启自动映射并在类的属性(类类型)上添加Json类型处理器,添加后Mp会自动将该指定的属性与数据库字段互转,但之前自定义的SQL没自动转换,所以就报错了。
报错内容:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userService': Error creating bean with name 'userServiceImpl': Injection of resource dependencies failed
本文标签: BeanuserControllererrorcreatingexpressed
版权声明:本文标题:Error creating bean with name ‘userController‘: Unsatisfied dependency expressed through field ... 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1755027296a2755193.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论