pringboot在js中直接跳转后台再到页面

js代码:

function(data)
            {
console.info(data.result);
if(data.result==true)
{
url = "/order/main.do"
window.location.href = encodeURI(url);
}
if(data.result==false)
{
ajaxLoadEnd();
$.messager.alert('提醒',"登录失败",'warning');
}

            }

后台代码:

@Controller
@RequestMapping("/order")
public class OrderTrackController {

@RequestMapping("/main.do")
public String goMain() {
System.out.println("jinlail ");
return "main";

}

目录结构如下图:

pringboot在js中直接跳转后台再到页面_第1张图片

你可能感兴趣的:(springboot)