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
68 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
94 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~
1153 0
|
7月前
|
Java 数据库连接 数据库
org.apache.ibatis.session.AutoMappingUnknownColumnBehavior
org.apache.ibatis.session.AutoMappingUnknownColumnBehavior
62 0
|
Dubbo 应用服务中间件
2.7.11,java.lang.NoSuchMethodError: org.apache.curator.framework.recipes.cache.NodeCache.getListenab
2.7.11,java.lang.NoSuchMethodError: org.apache.curator.framework.recipes.cache.NodeCache.getListenab
|
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...
371 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
167 0
org.apache.ibatis.reflection.ReflectionException: There is no getter for propert
|
Java 数据库连接 程序员
异常:org.apache.ibatis.reflection.ReflectionException
异常:org.apache.ibatis.reflection.ReflectionException
206 0
NoUniqueBeanDefinitionException: No qualifying bean of type 'org.apache.ibatis.session.SqlSession...
Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'org.
4941 0