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

相关文章
|
18天前
|
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
19 0
|
28天前
|
Java Maven
java.lang.NoSuchMethodError: org.apache.maven.model.validation.DefaultModelValidator
java.lang.NoSuchMethodError: org.apache.maven.model.validation.DefaultModelValidator
12 1
|
4月前
|
XML Java 数据库连接
解决在mybatis中出现的org.apache.ibatis.exceptions.PersistenceException~
解决在mybatis中出现的org.apache.ibatis.exceptions.PersistenceException~
286 0
|
8月前
|
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
|
8月前
|
Java Maven
Class org.apache.commons.logging.impl.Jdk14Logger does not implement Log 解决方法
org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Jdk14Logger does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:400) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.jav
128 0
|
9月前
|
Java 应用服务中间件 Maven
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188) - Java
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188) - Java
|
9月前
|
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...
230 0
|
Java 数据库连接 程序员
异常:org.apache.ibatis.reflection.ReflectionException
异常:org.apache.ibatis.reflection.ReflectionException
107 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
95 0
org.apache.ibatis.reflection.ReflectionException: There is no getter for propert
java.lang.ClassNotFoundException: org.apache.commons.fileupload.disk.DiskFileItemFactory
您好,我是码农飞哥,感谢您阅读本文!本文主要介绍文件上传报的错
103 0