org.apache.ibatis.executor.loader.javassist.JavassistProxyFactory$EnhancedResultObjectProxyImpl a...

简介: 当我用Springboot和mybatis进行延迟加载时候报出如下的错误:org.apache.ibatis.executor.loader.javassist.

当我用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 ,我没有试过也不建议这么做.

相关文章
|
7月前
|
Java Maven
java.lang.NoSuchMethodError: org.apache.maven.model.validation.DefaultModelValidator
java.lang.NoSuchMethodError: org.apache.maven.model.validation.DefaultModelValidator
74 1
|
7月前
|
Dubbo Java 应用服务中间件
Serialized class org.apache.catalina.core.ApplicationPart must implement java.io.Serializable
Serialized class org.apache.catalina.core.ApplicationPart must implement java.io.Serializable
106 0
|
6月前
|
IDE Java 应用服务中间件
解决org.apache.jasper.JasperException异常
解决org.apache.jasper.JasperException异常
|
XML Java 数据库连接
解决在mybatis中出现的org.apache.ibatis.exceptions.PersistenceException~
解决在mybatis中出现的org.apache.ibatis.exceptions.PersistenceException~
1201 0
|
7月前
|
Java 数据库连接 数据库
org.apache.ibatis.session.AutoMappingUnknownColumnBehavior
org.apache.ibatis.session.AutoMappingUnknownColumnBehavior
65 0
|
SQL
org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration
org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration
98 0
|
Java 数据库连接 mybatis
项目依赖问题导致No qualifying bean of type 'org.apache.ibatis.session.SqlSessionFactory' available: more tha...
项目依赖问题导致No qualifying bean of type 'org.apache.ibatis.session.SqlSessionFactory' available: more tha...
373 0
|
SQL Java 数据库连接
org.apache.ibatis.reflection.ReflectionException: There is no getter for propert
org.apache.ibatis.reflection.ReflectionException: There is no getter for propert
175 0
org.apache.ibatis.reflection.ReflectionException: There is no getter for propert
|
Java 数据库连接 程序员
异常:org.apache.ibatis.reflection.ReflectionException
异常:org.apache.ibatis.reflection.ReflectionException
214 0
|
SQL Java 数据库连接
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration.
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration.
474 0
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration.