package com.lightinit.hsdataportal.controller.open;

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

/**
 * @author WangYao
 * @date 2018/7/2 16:09
 * @description 静态页控制器
 */
@Controller("openStaticController")
@RequestMapping(value = {"/open/static"})
public class StaticController {

    @RequestMapping(value = "/{page}")
    public String index(@PathVariable String page){
        String validPage = page.replace("../", "").replace("./", "");
        validPage = "open/static/" + validPage;
        return validPage;
    }
}
