提交 9a0caed3 编写于 作者: zhouweidong's avatar zhouweidong

SpringMvc入门Controller示例

上级 29a97a23
......@@ -5,16 +5,13 @@ TARGET=PSAPPDATAENTITY
package ${pub.getPKGCodeName()}.${de.getPSSystemModule().codeName?lower_case}.rest;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import ${pub.getPKGCodeName()}.${de.getPSSystemModule().codeName?lower_case}.domain.${de.codeName};
@RestController
public class ${de.codeName}Controller{
<#assign appReqUrl="/" +app.getPKGCodeName()?lower_case + "/"+de.getPSSystemModule().codeName?lower_case +"/"+de.codeName?lower_case ><#comment>拼接当前应用的请求路径</#comment>
@ResponseBody
@PostMapping(value="${appReqUrl}")
@RequestMapping(value="${appReqUrl}")
public String hello(){
return String.format("您好,您目前正在访问[%s]实体","${de.codeName}");
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册