Bug
ITdfq
夏虫不可语冰,井蛙不可语海
展开
-
Validation failed for argument [0]
出现原因:@RequestBody @Validated 同时使用,如果实体类参数为null 就会抛出异常解决办法:BindingResult result 进行接收,对错误进行处理例如: (@RequestBody @Validated Student student,BindingResult result) log.info("接受的参数为: 【{}】", JSON.toJSONString(student)); if (result.hasErrors()) { .原创 2021-08-03 10:10:27 · 1560 阅读 · 1 评论 -
Error creating bean with name ‘requestMappingHandlerMapping‘
错误日志org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘requestMappingHandlerMapping’ defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.原创 2021-06-01 11:06:12 · 3255 阅读 · 1 评论