API访问Maven生成的MANIFEST.MF
@Controller public class VersionController { @Resource private ServletContext context; @ResponseBody @RequestMapping(value = "/version", method = RequestMethod.GET) @ApiOperation(value = "查看编译版本", response = Map.class, httpMethod = "GET", notes = "查看编译版本") public Map<String, String> version(HttpServletRequest request) throws IOException { Map<String, String> map = new HashMap<String, String>(); MfMap mfMap = Manifests.DEFAULT.append(new ServletMfs(context)); map.put("project-version", mfMap.get("project-version")); map.put("env", mfMap.get("env")); map.put("built-at", mfMap.get("built-at")); return map; } }
,温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/70265.html
- 上一篇:WindowPhone8 音频播放和视频播放应用
- 下一篇:C#中构造函数的作用