whyclxw
3 天以前 82d3504d93db29e2b04ed1137e541a19e0cba0f1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.whyc.controller;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
 
@Controller
@Api(tags = "index")
public class IndexController {
 
    @RequestMapping("/")
    @ApiOperation("默认跳转,无需调用")
    public void index(HttpServletResponse response, HttpServletRequest request){
        try {
            response.sendRedirect("/pis/index.html?n="+System.currentTimeMillis());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
 
}