@RequestMapping(value = "/sitemap.xml", method = RequestMethod.GET, produces = "application/xml;charset=UTF-8")
@ResponseBody
public String getSitemap(HttpServletRequest request,Locale locale, Model model) throws IOException {
ServletContextResource resource = new ServletContextResource(context, "/WEB-INF/spring/sitemap.xml");
StringWriter writer = new StringWriter();
IOUtils.copy(resource.getInputStream(), writer, "UTF-8");
return writer.toString();
}
ApartmentController.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:rento
作者:
评论列表
文章目录