1、Question: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token.
Answer: 前端传入的json格式不对,应该是json数组,传过来的是json字符串
org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token
2、Question: java.sql.SQLException:ORA-12899:列”TEST”,”USER”.”STATE”的值太大(实际值 6,最大值:1)
Answer: 是因为前端状态state传的是“有效 or 无效”,而后端没有做数据转化处理,数据库里存的是U/E
3、Question: xml里的sql有时候找不到参数是为什么?
Answer: (1)如果有两个参数的话,就得用@param注解;
(2)有时候前后端接口要对应的字段,一种是Bean接收,自动生成好的字段变量名sql取别名的时候,就可以直接返回前台这个参数;一种是map接收,可以用取别名,但是要记得加引号,如果不加的话,那么返回的key值就是大写的。