package com.northglass.web.mes;
|
|
import org.springframework.stereotype.Controller;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
@Controller
|
@RequestMapping(value="/mesview")
|
public class JSPController {
|
|
//page路径从属于layout.jsp, 不属于独立页,有菜单栏
|
@RequestMapping(method=RequestMethod.GET, value="/_{groups}")
|
public String getView(@PathVariable("groups") String groups){
|
|
|
return "mes/view/"+groups;
|
}
|
|
//page路径下不从属于layout.jsp, 属于独立页,样式也和layout无关
|
@RequestMapping(method=RequestMethod.GET, value="/page/_{groups}")
|
public String getPage(@PathVariable("groups") String groups){
|
return "mes/page/"+groups;
|
}
|
|
//专用于返回数据,返回一般用于返回json结构的数据,xml也可
|
//由于jsp文件头<%page >的的原因该返回的数据有开头的空行,如果想在jsp里直接返回字符串,在前端接收时在前端去除空行
|
@RequestMapping(method=RequestMethod.POST, value="data/_{groups}")
|
public String getData(@PathVariable("groups") String groups){
|
return "mes/data/"+groups;
|
}
|
|
|
|
}
|