第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

重定向求助?

想請教下springboot下不使用模板引擎怎么進(jìn)行html頁面重定向?(使用springboot默認(rèn)的項(xiàng)目結(jié)構(gòu))

正在回答

1 回答

import?org.springframework.web.bind.annotation.GetMapping;
import?org.springframework.web.bind.annotation.ResponseBody;
import?org.springframework.web.bind.annotation.RestController;
import?org.springframework.web.servlet.ModelAndView;

/**
?*?@version?1.0?2017/1/17
?*?@since?1.0
?*/
@RestController
public?class?HelloController?{

????@GetMapping(value?=?"/hello")
????@ResponseBody
????public?ModelAndView?say()?{
????????return?new?ModelAndView("redirect:http://idcbgp.cn");
????}
}


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

zackma 提問者

謝謝老師,已解決
2017-01-21 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消
2小時學(xué)會Spring Boot
  • 參與學(xué)習(xí)       151527    人
  • 解答問題       1132    個

Spring Boot入門視頻教程,你將學(xué)會使用Spring Boot快速構(gòu)建應(yīng)用程序

進(jìn)入課程

重定向求助?

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號