实现springmvc 的controller级别的跳转的方法 return "redirect:/news/to";

来源:互联网 发布:jquery 数组排序 sort 编辑:程序博客网 时间:2024/06/07 10:15
package com.wanju.project001.zonghe.common.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
@RequestMapping("/news")
public class TestJavaRedirectController {


    @RequestMapping("/to")
    public String redirectTo()
    {
        System.out.println("self-test");
        return "redirect:/news/to";  
    }
}
0 0
原创粉丝点击