【bug】context with path [] threw exception [Request processing failed; nested exception is java.lang

1、问题:

在上一个问题基础上点击,又出现以下错误信息

SEVERE: Servlet.service() for servlet [taotao-manager-web] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause

 

2、解决

这是由于在service实现类中没有写下面的Autowired这个注解。

下次要注意。不要再犯这种小错误。耽误时间

 @Autowired
private TbContentMapper tbContentMapper;

 

16:29:33.734 DEBUG o.s.web.servlet.DispatcherServlet - GET "/base/chat?question=%E4%BD%A0%E5%A5%BD", parameters={masked} 16:29:33.745 DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped to com.igruel.Deepseek.DeepSeekController#chat(String) 16:29:40.194 DEBUG o.s.web.servlet.DispatcherServlet - Failed to complete request: com.alibaba.fastjson.JSONException: not close json text, token : { 16:29:40.511 ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [/base] threw exception [Request processing failed; nested exception is com.alibaba.fastjson.JSONException: not close json text, token : {] with root cause com.alibaba.fastjson.JSONException: not close json text, token : { at com.alibaba.fastjson.parser.DefaultJSONParser.close(DefaultJSONParser.java:1556) at com.alibaba.fastjson.JSON.parseObject(JSON.java:398) at com.alibaba.fastjson.JSON.parseObject(JSON.java:298) at com.alibaba.fastjson.JSON.parseObject(JSON.java:588) at com.igruel.Deepseek.DeepSeekService.chat(DeepSeekService.java:48) at com.igruel.Deepseek.DeepSeekController.chat(DeepSeekController.java:20) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandl
03-17
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值