解决控制台Could not resolve view with name ...
关于 Could not resolve view with name 'xxx' in servlet with name 'spring-mvc' 的解决方法
1、原因之一,没有写“@ResponseBody“
@RequestMapping("/logout")public Response logout(HttpServletRequest request, HttpServletResponse response) {String result = service.loginOut(request, response);System.out.println("退出登录 result:"+result);Map<String, String> map = new HashMap<>(); map.put("ok", "退出登录");return new Response(200, "", map);}
2、正确写法
@RequestMapping("/logout")
@ResponseBodypublic Response logout(HttpServletRequest request, HttpServletResponse response) {String result = service.loginOut(request, response);System.out.println("退出登录 result:"+result);Map<String, String> map = new HashMap<>(); map.put("ok", "退出登录");return new Response(200, "", map);}
解决控制台Could not resolve view with name ...相关推荐
- 造成javax.servlet.ServletException: Could not resolve view with name的各种原因及解决方法
报错完成信息: javax.servlet.ServletException: Could not resolve view with name '/lose/index' in servlet wi ...
- javax.servlet.ServletException: Could not resolve view with name ‘***‘ in servlet
javax.servlet.ServletException: Could not resolve view with name 'employee/login' in servlet with na ...
- Could not resolve view with name '/xx.html' in servlet with name 'dispatcherServlet'
springboot 项目启动后访问网页,控制台报错: Could not resolve view with name '/xx.html' in servlet with name 'dispat ...
- Spring Boot问题之JSP无法显示Could not resolve view with name ‘xxxx‘ in servlet with name ‘dispatcherServlet
问题: 在Spring Boot应用中JSP页面无法显示, 页面提示: 控制台的错误信息类似: javax.servlet.ServletException: Could not resolve vi ...
- IllegalStateException: Could not resolve view with name
最近遇到一个重定向的问题困扰了很久,百度也找不到合适的解决方案!! 一 .问题描述 使用的技术:springboot(2.6.x) + springcloud gateway(3.1.x): 1.请求 ...
- Could not resolve view with name 'xxx' in servlet with name 'dispatcherServlet',
1,问题 本人启动spring boot项目后,访问接口,报错信息如下: {"timestamp": 1537234637805,"status": 500,& ...
- Could not resolve view with name ‘updatelog/saveDetail’
Could not resolve view with name 'updatelog/saveDetail' in servlet with name 'dispatcherServlet'异常 数 ...
- 解决“QGtkStyle could not resolve GTK……”问题
解决"QGtkStyle could not resolve GTK--"问题 参考文章: (1)解决"QGtkStyle could not resolve GTK-- ...
- elasticsearch解决控制台中文乱码问题
elasticsearch解决控制台中文乱码问题 参考文章: (1)elasticsearch解决控制台中文乱码问题 (2)https://www.cnblogs.com/chenmz1995/p/1 ...
最新文章
- Shell基础命令之echo
- 任务和特权级保护(四)——《x86汇编语言:从实模式到保护模式》读书笔记35
- 这份书单,给那些想学Hadoop大数据、人工智能的人
- 深入理解C#:编程技巧总结(一)
- ArcGIS怎样获取重分类后各类所占的像元个数
- centos 安装MySQL报错You could try using --skip-broken to work around the problem You could try running:
- java 并发 set_高并发下的Java数据结构(List、Set、Map、Queue)
- Linux磁盘读写速率测试
- 天气预报为什么要用超级计算机,为什么天气预报不够准确?
- 噪声的频谱分析的重要意义_噪声测量:噪声源识别与定位的方法简析
- source insight 深色主题配置文件
- mysql insert 主键冲突_在MySql中建立存储过程和解决insert into select 中主键冲突的有关问题...
- 使用Vitamio开发iOS平台上的万能播放器
- python-普通数据分析-科比职业生涯数据分析
- 用PS快速给图片添加逼真彩虹效果
- 如何给word文档添加注释
- Android基础学习总结(十六)——基于ijkplayer封装支持简单界面UI定制的视频播放器
- GD32f103ret6 使用HID,设备管理里,提示未知设备
- leetcode 5. 最长回文子串(c++)
- 用python画玫瑰花