日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

SpringMvc的服务器端跳转和客户端跳转

發(fā)布時間:2024/9/20 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SpringMvc的服务器端跳转和客户端跳转 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

首先,找到

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:";

會有這倆個屬性

默認情況下是服務器端跳轉(zhuǎn),在需要客戶端跳轉(zhuǎn)的時候加上“redirect:”即可

總結(jié)

以上是生活随笔為你收集整理的SpringMvc的服务器端跳转和客户端跳转的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。