nested exception is java.lang.No
作者:
索性流年 | 来源:发表于
2021-02-02 11:32 被阅读0次
完整报错
2020-11-17 13:40:55.572 ERROR 12576 --- [nio-9020-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: com/google/gson/GsonBuilder] with root cause
报错原因
- 这是因为Servlet需要返回json 格式没有相关依赖
解决办法
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
本文标题:nested exception is java.lang.No
本文链接:https://www.haomeiwen.com/subject/sluxiktx.html
网友评论