开发者社区> 问答> 正文

SpringBoot报错:出错原因不明白,怎么解决? ?报错

1.implement代码

public Result<List<盘点计划表>> search计划编号(String 计划编号) {
    Result<List<盘点计划表>> res = new Result<>();
    try {
        计划编号 = "%" + 计划编号 + "%";
        List<盘点计划表> data = 盘点计划表Dao.search计划编号(计划编号);
        res.setFlag(true);
        res.setCount((long) data.size());
        res.setData(data);
    } catch (Exception e) {
        e.printStackTrace();
        logger.error(e.getMessage());
        res.setFlag(false);
        res.setMessage(e.getMessage());
    }
    return res;
}

2.xml代码

select

from IMOS_PD_CheckPlan
where CheckPlan_Code like #{计划编号} and CheckPlan_Result = '未执行'

3.报错
16:16:12 [http-nio-8080-exec-3] DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'dispatcherServlet' processing POST request for [/%E7%9B%98%E7%82%B9%E8%AE%A1%E5%88%92%E8%A1%A8/%E6%A0%B9%E6%8D%AE%E8%AE%A1%E5%88%92%E7%BC%96%E5%8F%B7%E8%8E%B7%E5%8F%96%E7%9B%98%E7%82%B9%E8%AE%A1%E5%88%92]
16:16:12 [http-nio-8080-exec-3] DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /盘点计划表/根据计划编号获取盘点计划
16:16:12 [http-nio-8080-exec-3] DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Returning handler method [public com.bean.Result> com.controller.盘点计划表Controller.根据计划编号获取盘点计划(javax.servlet.http.HttpServletRequest,java.lang.String)]
16:16:12 [http-nio-8080-exec-3] DEBUG o.s.w.s.m.m.a.RequestResponseBodyMethodProcessor - Read [class java.lang.String] as "application/json;charset=UTF-8" with [org.springframework.http.converter.StringHttpMessageConverter@2092b072]
16:16:27 [http-nio-8080-exec-3] DEBUG com.dao.盘点计划表Dao.search计划编号 - ==> Preparing: select CheckPlan_Code ,CheckPlan_Name ,CheckPlan_Way ,CheckPlan_Project ,CheckPlan_OperatorCode ,CheckPlan_OperatorName ,CheckPlan_StartDate ,CheckPlan_EndDate ,CheckPlan_Result from IMOS_PD_CheckPlan where CheckPlan_Code like ? and CheckPlan_Result = '未执行'
16:16:27 [http-nio-8080-exec-3] DEBUG com.dao.盘点计划表Dao.search计划编号 - ==> Parameters: %{"计划编号":""}%(String)
16:16:28 [http-nio-8080-exec-3] DEBUG com.dao.盘点计划表Dao.search计划编号 - <== Total: 0
16:16:30 [http-nio-8080-exec-3] DEBUG o.s.w.s.m.m.a.RequestResponseBodyMethodProcessor - Written [com.bean.Result@6607bb55] as "application/json" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@504521ae]
16:16:30 [http-nio-8080-exec-3] DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
16:16:30 [http-nio-8080-exec-3] DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request

展开
收起
爱吃鱼的程序员 2020-06-23 01:16:58 594 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    NullModelAndViewreturnedtoDispatcherServletwithname'dispatcherServlet':assumingHandlerAdaptercompletedrequesthandling

    这里应该是错误根源了,看下这个是什么请求,为什么没有设置返回值。

    2020-06-23 01:17:16
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
Spring框架入门 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关实验场景

更多