当前位置: 代码迷 >> 综合 >> Disable SerializationFeature.FAIL_ON_EMPTY_BEANS
  详细解决方案

Disable SerializationFeature.FAIL_ON_EMPTY_BEANS

热度:53   发布时间:2023-12-05 22:48:41.0

Disable SerializationFeature.FAIL_ON_EMPTY_BEANS
本文章是active6流程相关的问题,主要是实体间相互关联,转json过程中出现的奇怪的问题,所以作为记录
@Bean
Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer(){
return new Jackson2ObjectMapperBuilderCustomizer() {
@Override
public void customize(Jackson2ObjectMapperBuilder jacksonObjectMapperBuilder) {
jacksonObjectMapperBuilder.featuresToDisable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
}
};
}
转载于:https://blog.csdn.net/J080624/article/details/82529082

  相关解决方案