Closed hgmsq closed 4 years ago
1、替换PostController.java 方法,然后重新编译halo 生成 PostController.class 文件,然后替换jar包里面的 PostController.class文件,最后重启jar就可以了。
@GetMapping("{postId:\d+}") @ApiOperation("Gets a post") public BasePostDetailDTO getBy(@PathVariable("postId") Integer postId, @RequestParam(value = "formatDisabled", required = false, defaultValue = "true") Boolean formatDisabled, @RequestParam(value = "sourceDisabled", required = false, defaultValue = "false") Boolean sourceDisabled) { BasePostDetailDTO detailDTO = postService.convertToDetail(postService.getById(postId));
if (formatDisabled) { // Clear the format content detailDTO.setFormatContent(null); } if (sourceDisabled) { // Clear the original content detailDTO.setOriginalContent(null); } postService.increaseVisit(postId); return detailDTO; }
小程序名称:IT技术分享社区 IT技术分享社区
感谢贡献
1、替换PostController.java 方法,然后重新编译halo 生成 PostController.class 文件,然后替换jar包里面的 PostController.class文件,最后重启jar就可以了。
@GetMapping("{postId:\d+}") @ApiOperation("Gets a post") public BasePostDetailDTO getBy(@PathVariable("postId") Integer postId, @RequestParam(value = "formatDisabled", required = false, defaultValue = "true") Boolean formatDisabled, @RequestParam(value = "sourceDisabled", required = false, defaultValue = "false") Boolean sourceDisabled) { BasePostDetailDTO detailDTO = postService.convertToDetail(postService.getById(postId));
小程序名称:IT技术分享社区 IT技术分享社区