Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for cl
參考:https://blog.51cto.com/12012821/2368259
spring boot使用jpa查詢返回實體後,返回介面時候json格式化出錯
Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.winyo.commonstarter.model.ServiceResult["data"]->com.winyo.shop.entity.User$HibernateProxy$RIMO4ULm["hibernateLazyInitializer"])
實體類加上註解即可
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
相關文章
- No serializer found for class org.apache.ibatis.executor.loader.javassist.JavassistProxyFactory...ApacheBATJava
- Caused by: org.apache.ibatis.binding.BindingException: Parameter 'parameter' not found.解決ApacheBATException
- drf Serializer基本使用
- Caused by: android.os.Android
- 序列化器-Serializer LL
- Django REST Framework中的Serializer relationsDjangoRESTFramework
- Yii2.0 初識 RESTful SerializerREST
- drf-序列化器serializer
- Caused by:.NoSuchBeanDefinitionException: No bean named 'userInfoServiceImpl' availableBeanExceptionAI
- Springboot:Caused by: java.lang.NoSuchMethodError...Spring BootJavaError
- Caused by: Error: ' ' is not a valid resource name characterError
- OpenCL中的管道cl::Pipe的使用
- Django(45)drf序列化類的使用(Serializer)Django
- -bash: id: command not found -bash: tty: command not found
- Caused by: java.lang.NumberFormatException: For input string: "18446744073709551615"JavaORMException
- Caused by: java.lang.NoClassDefFoundError: javax/servlet/GenericFilterJavaErrorServletFilter
- kubeadm not found
- Caused by: java.lang.IllegalArgumentException: port out of range:-1JavaException
- Spring Cloud與Dubbo的完美融合之手「Spring ClSpringCloud
- nodemon: command not found
- pip: command not found
- found an invalid color
- drf serializer 字首 get 是什麼? 如何傳遞引數?
- Caused by: java.lang.IllegalArgumentException: Unable to instantiate SparkSession with Hive supportJavaExceptionSparkSessionHive
- Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of typeSpringFrameworkBeanException
- E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packagesErrorPackage
- 使用cl.exe和linker.exe連線程式線程
- [ChatGPT 勘誤] 關於 CL_WB_PGEDITOR 的用途ChatGPT
- mysql中You can’t specify target table for update in FROM clMySql
- zsh:command not found: xxx
- mac mysql: command not foundMacMySql
- 樹莓派4B-SPI讀寫flash-FM25CL16B(同時支援FM25CL64等其它系列Flash)樹莓派
- Caused by: java.lang.IllegalStateException: getWriter() has already been called for this responseJavaException
- Caused by: com.fasterxml.jackson.databind.JsonMappingException: Incompatible Jackson version: 2.7.3ASTXMLJSONAPPException
- Android:Unexpected lock protocol found in lock file. Expected 3, found 0.AndroidProtocol
- 【轉載】CL_HTTP_CLIENT的HTTP和SOAP用法示例HTTPclient
- Caused by: java.lang.IllegalStateException: Only single-level inheritance supported: XxxxServiceJavaException
- Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load classbootException