SpringMvc的服务器端跳转和客户端跳转
首先,找到
package org.springframework.web.servlet.view;
public class InternalResourceViewResolver extends UrlBasedViewResolver
UrlBasedViewResolver这个类
/**
* Prefix for special view names that specify a redirect URL (usually
* to a controller after a form has been submitted and processed).
* Such view names will not be resolved in the configured default
* way but rather be treated as special shortcut.
*/
public static final String REDIRECT_URL_PREFIX = "redirect:";
/**
* Prefix for special view names that specify a forward URL (usually
* to a controller after a form has been submitted and processed).
* Such view names will not be resolved in the configured default
* way but rather be treated as special shortcut.
*/
public static final String FORWARD_URL_PREFIX = "forward:";
会有这俩个属性
默认情况下是服务器端跳转,在需要客户端跳转的时候加上“redirect:”即可
最新文章
- js获取给定月份的N个月后的日期
- lattice 与 modelsim 仿真 笔记
- Spring的三种通过XML实现DataSource注入方式
- Java8 Lambda表达式和流操作如何让你的代码变慢5倍
- CSS-3 Animation 的使用
- sdut 2153 Clockwise (2010年山东省第一届ACM大学生程序设计竞赛)
- Codeforces Round #372 (Div. 1) B. Complete The Graph (枚举+最短路)
- Android studio快捷键Windows版本
- 1.网络工具:ifconfig,ping,netstate,Redhat命令和图形化设置ip,finger,nslookup
- vijos1698题解
- StackExchange.Redis学习笔记(五) 发布和订阅
- react-native 打包成apk 文件
- Hadoop3.2.0集群(4节点-无HA)
- Linux环境下使用tcpdump抓包与下载
- 如何在Android平台上使用USB Audio设备
- 检查安装的 DirectX 版本
- 【LeetCode】229. Majority Element II
- 如何使用 adb 命令实现自动化测试
- 如何彻底删除TFS的工作项字段
- Codeforces Round #361 (Div. 2) D - Friends and Subsequences
热门文章
- 禁用quartz自动检查更新
- Pandas Installation
- jq用户评论点击回复简单代码。
- 打开Office2007弹出“向程序发送命令时出现问题” 解决方案
- hdu4796
- thinkphp5.0目录结构
- JSP内置对象——application对象和out对象
- 洛谷——P2071 座位安排 seat.cpp/c/pas
- 【SQL】175. Combine Two Tables
- 【BZOJ 3997】 3997: [TJOI2015]组合数学 (DP| 最小链覆盖=最大点独立集)