SpringBoot 报错 Unrecognized field
增加配置类
/*** @author SUN* @date 2021/4/23*/
@Configuration
public class JsonConfig {@Beanpublic MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter(){ObjectMapper objectMapper = new ObjectMapper();// 反序列化的时候 如果加了其他未知的属性, 不抛异常objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);// 序列化的时候 如果是空对象, 不抛出异常objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);return new MappingJackson2HttpMessageConverter(objectMapper);}
}
SpringBoot 报错 Unrecognized field相关推荐
- 启动SpringBoot报错:Field userService in com.sunshin.controller.UserController required a bean of type...
当项目启动SpringBoot报这个错误时: Field userService in com.sunshine.controller.UserController required a bean o ...
- 【杂文】spring-boot报错 ~ zone value ‘Öйú±ê׼ʱ¼ä‘ is unrecognized or represents more than on time zone.
spring-boot报错 zone value 'Öйú±ê׼ʱ¼ä' is unrecognized 修改MySQL的配置文件(failed) 更改MySQL中的系统时间(failed) 修 ...
- SpringBoot报错:Could not autowire. No beans of ‘DiscussantMapper‘ type found
SpringBoot报错:Could not autowire. No beans of 'DiscussantMapper' type found 一.资源 @Mapper和@Repository注 ...
- 启动springboot报错Error creating bean with name 'dataSource' defined in class path resource
2019独角兽企业重金招聘Python工程师标准>>> 启动springboot报错Error creating bean with name 'dataSource' define ...
- springboot报错!!!
点击运行springboot,再在浏览器访问路径的时候,报错!!! 运行结果出来了,但是再结束的时候报错. springboot报错java.lang.NoSuchMethodError: javax ...
- 使用xadmin搜索search_fields报错:Related Field got invalid lookup: icontains
在adminx.py文件定义的类里面添加这三个字段list_display = ['code','email','send_type','send_time'] #显示的字段类型search_fiel ...
- 【Debugger】解决springboot报错Failed to resolve org.junit.platform:junit-platform-launcher:1.x.x的两种解决方案
[Debugger]解决springboot报错Failed to resolve org.junit.platform:junit-platform-launcher:1.x.x的两种解决方案 主要 ...
- koa-multer报错Unexpected field
1.前提: node项目使用的koa框架 版本信息如下: "dependencies": { "debug": "^4.1.1", &quo ...
- springboot报错:class path resource cannot be opened because it does not exits
问题描述:springboot报错:在使用@PropertySource注解读取properties文件时,报错:class path resource cannot be opened becaus ...
最新文章
- 手撸 webpack4.x 配置(一)
- html标签里写js,JS事件(HTML标签内)
- crontab -e 运行python的脚本的坑
- CentOS+Subversion
- 那些让程序员炸毛的奇葩需求,说起来满满的都是泪!
- 简单易学!一步步带你理解机器学习算法——马尔可夫链蒙特卡罗(MCMC)
- VirtualBox安装Windows XP
- 新员工入职表_员工离职率过高,只要三步骤,就能轻松有效控制!
- java保留字详解_保留字
- 【深度学习】目标检测综述
- 关于团队协作开发的一些思考
- Python综合评价模型(二)灰色关联度法
- Mac OS编译C++库(XCode)
- pylint代码检查常见警告、提示的解决方法记录
- 2021筠连中学高考成绩查询,2021年筠连县中学升学率高不高?
- 近期题目整理2.0(递归和简单dfs)
- 将命令添加进开机自启
- NAND Flash启动和NOR FLASH启动的问题
- C语言中图片处理函数,怎么用C语言中的fopen函数打开bmp格式的图像文件?
- python教程:上下文管理器详细教程