【发布时间】:2018-03-01 14:33:39
【问题描述】:
我需要在 Spring Boot Application 中从 Rest API 返回一个 html 页面。 html "test.html" 位于 src/main/resource 目录中。下面是我的代码sn-p
@RequestMapping(value ="/get/getReportById",method = RequestMethod.GET)
@ResponseBody()
public String getReportsByCategory(String id) throws Exception{
try{
//Do something
}catch(Exception e){
e.printStackTrace();
}
return "test";
}
【问题讨论】:
标签: java spring rest http spring-boot