1。报异常:com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 141 path $[0].jumpUrl
There was an unexpected error (type=Internal Server Error, status=500).
com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 141 path $[0].jumpUrl
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 141 path $[0].jumpUrl
at com.google.gson.internal.Streams.parse(Streams.java:60)
at com.google.gson.JsonParser.parse(JsonParser.java:84)
at com.google.gson.JsonParser.parse(JsonParser.java:59)
at com.google.gson.JsonParser.parse(JsonParser.java:45)
at com.example.demo1.http.TaskInfoServiceImpl.getTaskInfo(TaskInfoServiceImpl.java:40)
at com.example.demo1.http.IndexController.getTaskList(IndexController.java:20)
解决方法:
taskInfoList = taskInfoService.getTaskInfo(typeId, userId);
//反序列化成对象
ObjectMapper mapper = new ObjectMapper();
List<TaskInfo> list = mapper.convertValue(taskInfoList, new TypeReference<List<TaskInfo>>() { });
2。 java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed
mysql8.x版本的数据库在连接的时候报错java.sql.SQLNonTransientConnectionException: Public Key R