org.apache.ibatis.executor.loader.javassist.JavassistProxyFactory$EnhancedResultObjectProxyImpl and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.
当我用Springboot和mybatis进行延迟加载时候报出如下的错误:
org.apache.ibatis.executor.loader.javassist.JavassistProxyFactory$EnhancedResultObjectProxyImpl and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)
这里我的解决方法是在yml的配置中设置:
spring:
jackson:
serialization:
FAIL_ON_EMPTY_BEANS: false
同理在properties中设置为:
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false
这里搜索到的很多说将bean中属性为private,改为public ,我没有试过也不建议这么做.
org.apache.ibatis.executor.loader.javassist.JavassistProxyFactory$EnhancedResultObjectProxyImpl and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.的更多相关文章
- No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer
异常信息如下所示: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for cla ...
- 【实体 报错 】No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer
HTTP Status 500 - Could not write content: No serializer found for class org.hibernate.proxy.pojo.ja ...
- Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.apache.catalina.connector.CoyoteWriter and no properties discovered to create BeanSerializer
一.什么是序列化In computer science, in the context of data storage, serialization is the process of transla ...
- mybatis查询异常-Error querying database. Cause: java.lang.ClassCastException: org.apache.ibatis.executor.ExecutionPlaceholder cannot be cast to java.util.List
背景,mybatis查询的时候直接取的sqlsession,没有包装成SqlSessionTemplate,没有走spring提供的代理. 然后我写的获取sqlsession的代码没有考虑到并发的情况 ...
- SpringBoot报错:nested exception is org.apache.ibatis.executor.ExecutorException: No constructor found in com.tuyrk.test.User matching [java.lang.Long, java.lang.String, java.lang.String]
错误提示: Caused by: org.apache.ibatis.executor.ExecutorException: No constructor found in com.tuyrk._16 ...
- 出错:Cause: org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'cn.mgy.mapper.UserMapper.findById'.
详细出错代码: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.a ...
- java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer; at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.jav
在整合spring和mybatis在执行数据库操作的时候报出了: java.lang.AbstractMethodError: org.mybatis.spring.transaction.Sprin ...
- MyBatis3.4.0以上的分页插件错误:Could not find method on interface org.apache.ibatis.executor.statement.StatementHandler named prepare. Cause: java.lang.NoSuchMethodException: org.apache.ibatis.executor.stateme
错误: Could not find method on interface org.apache.ibatis.executor.statement.StatementHandler named p ...
- Cause: org.apache.ibatis.executor.ExecutorException: Error getting generated key or setting result to parameter object. Cause: java.sql.SQLException: 不支持的特性
mybatis插入数据时报错: Cause: org.apache.ibatis.executor.ExecutorException: Error getting generated key or ...
随机推荐
- C语言之预处理命令与用typedef命名已有类型
预处理命令 主要是改进程序设计环境,以提高编程效率,不属于c语言本身的组成部分,不能直接对它们进行编译,必须在对 程序编译之前,先对程序中的这些特殊命令进行“预处理”.比如头文件. 有以下三类:宏定义 ...
- Linux服务器部署系列之一—Apache篇(上)
Linux系统的应用越来越广泛了,学习linux系统的网管兄弟也有增加的趋势.很久以前就有些想法,要将自己学的linux知识整理一下.最近,终于下定决心,挤出时间开始动手写些东西了.虽然不一定好,不过 ...
- python操作数据库-数据表
数据表: 数据类型: 帮助的三种形式: 在cmd中输入: help 要帮助的主题词,或 ? 要帮助的主题词 或 \h 要帮助的主题词 . 数据表的创建: CREATE database IF NOT ...
- IntelliJ IDEA 2017版 springloaded实现热部署
1.配置pom.xml文档 <?xml version="1.0" encoding="UTF-8"?> <project xmlns=&qu ...
- nexus 下载及安装
一.下载 nexus maven http://www.sonatype.org/ http://www.sonatype.org/nexus/ http://www.sonatype.org/nex ...
- 使用process_monitor.sh监控hadoop进程的crontab配置
可以从下列链接找到process_monitor.sh:https://github.com/eyjian/libmooon/blob/master/shell/process_monitor.sh ...
- Example11(June 9,2015)
%--------------sort------------------------------- >> A=[ ; ; ] A = >> B=sort(A,)%A(:,)& ...
- Autofac创建实例的方法总结[转]
1.InstancePerDependency 对每一个依赖或每一次调用创建一个新的唯一的实例.这也是默认的创建实例的方式. 官方文档解释:Configure the component so tha ...
- WebAPI开发中的定时处理
https://blog.csdn.net/lordwish/article/details/77931897
- application/force-download 不生效
不管用什么方式都无法下载txt 设置application/force-download也不生效 很无奈 胡搞瞎搞 最终解决方案:但是没搞明白什么原理 问题解决 @RequestMapping(val ...