日常问题总结 1

flyway高版本不支持MySQL5.7数据库

项目由Springboot 2.0.8升级到2.6.12,flyway-core升级到 8.0.5后启动报错,退回到5.0.7版本也不能正常启动,后查资料调整到5.2.4后正常。

<flyway.version>5.2.4</flyway.version>

URL中包含//,报404

Springboot中的tomcat由8.5.51升级到9.0.75后,点击菜单后出现404问题。经检查发现URL中拼写出现//导致404。退回后正常。

解决方法:统一处理菜单 URL拼写,改成'/'

delete请求失败

异常描述
org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported

解决方法
spring.mvc.hiddenmethod.filter.enabled=true

返回值是List的Feign接口,只有返回一条元素时报错

异常描述

Error while extracting response for type [java.util.List<com.css.djy.vo.dy.DyxxVo>] and content type [application/json]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type `java.util.ArrayList<>` from Object value (token `JsonToken.START_OBJECT`); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.util.ArrayList<>` from Object value (token `JsonToken.START_OBJECT`)

解决方法:

spring.jackson.deserialization.ACCEPT_SINGLE_VALUE_AS_ARRAY=true
posted @ 2023-08-15 18:37  二月无雨  阅读(36)  评论(0编辑  收藏  举报