Skip to content

peachyy/jackson-jpapage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jackson-jpapage

场景:

  • 当接口返回值interface的时候 如jpapage Page<User>feign调用报错
  • 其它类似的错误 也可以利用这种方式 画葫芦

使用于jpapage直接序列化/反序列化出现异常错误的问题。

Jackson返回如下异常的时候 可以使用这种方式去修复 支持不修改任何代码 只新增 Can not construct instance of org.springframework.data.domain.Page: abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information

使用方法

引入依赖

    <dependency>
      <groupId>com.peachyy</groupId>
      <artifactId>jackson-jpapage</artifactId>
      <version>0.0.1-SNAPSHOT</version>
    </dependency>

注解启用

@EnableJacksonJpaPage

About

feign 接口返回JPA Page时错误解决方法

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages