From e84f1c4b31b6253359df5fa47796189d7f60c76f Mon Sep 17 00:00:00 2001 From: csyue <1203338439@qq.com> Date: Thu, 30 May 2024 16:20:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98=E9=A1=B9?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-auth/src/main/resources/bootstrap.yml | 7 +++++ .../src/main/resources/bootstrap.yml | 7 +++++ .../src/main/resources/bootstrap.yml | 6 ++++ .../controller/SysOperlogController.java | 17 ++++------- .../service/impl/SysOperLogServiceImpl.java | 29 ++++++++----------- .../src/main/resources/bootstrap.yml | 6 ++++ 6 files changed, 44 insertions(+), 28 deletions(-) diff --git a/sgzb-auth/src/main/resources/bootstrap.yml b/sgzb-auth/src/main/resources/bootstrap.yml index e8b1c5d3..14e7e8c9 100644 --- a/sgzb-auth/src/main/resources/bootstrap.yml +++ b/sgzb-auth/src/main/resources/bootstrap.yml @@ -2,6 +2,13 @@ server: port: 29200 + +# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问 +management: + endpoint: + env: + enabled: false + # Spring spring: application: diff --git a/sgzb-modules/sgzb-base/src/main/resources/bootstrap.yml b/sgzb-modules/sgzb-base/src/main/resources/bootstrap.yml index e778cf56..24acc05b 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/bootstrap.yml +++ b/sgzb-modules/sgzb-base/src/main/resources/bootstrap.yml @@ -2,6 +2,13 @@ server: port: 29301 + +# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问 +management: + endpoint: + env: + enabled: false + # Spring spring: application: diff --git a/sgzb-modules/sgzb-material/src/main/resources/bootstrap.yml b/sgzb-modules/sgzb-material/src/main/resources/bootstrap.yml index 5e400e16..99e275d9 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/bootstrap.yml +++ b/sgzb-modules/sgzb-material/src/main/resources/bootstrap.yml @@ -2,6 +2,12 @@ server: port: 29302 +# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问 +management: + endpoint: + env: + enabled: false + # Spring spring: application: diff --git a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/controller/SysOperlogController.java b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/controller/SysOperlogController.java index e6036f17..4762b5c5 100644 --- a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/controller/SysOperlogController.java +++ b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/controller/SysOperlogController.java @@ -27,7 +27,7 @@ import com.bonus.sgzb.system.service.ISysOperLogService; /** * 操作日志记录 - * + * * @author ruoyi */ @RestController @@ -39,8 +39,7 @@ public class SysOperlogController extends BaseController { @RequiresPermissions("system:operlog:list") @GetMapping("/list") - public TableDataInfo list(SysOperLog operLog) - { + public TableDataInfo list(SysOperLog operLog) { startPage(); List list = operLogService.selectOperLogList(operLog); return getDataTable(list); @@ -49,8 +48,7 @@ public class SysOperlogController extends BaseController { @Log(title = "操作日志", businessType = BusinessType.EXPORT) @RequiresPermissions("system:operlog:export") @PostMapping("/export") - public void export(HttpServletResponse response, SysOperLog operLog) - { + public void export(HttpServletResponse response, SysOperLog operLog) { List list; list = operLogService.selectOperLogList(operLog); //根据前端列表选中选择性列表导出 @@ -65,24 +63,21 @@ public class SysOperlogController extends BaseController { @Log(title = "操作日志", businessType = BusinessType.DELETE) @RequiresPermissions("system:operlog:remove") @DeleteMapping("/{operIds}") - public AjaxResult remove(@PathVariable Long[] operIds) - { + public AjaxResult remove(@PathVariable Long[] operIds) { return toAjax(operLogService.deleteOperLogByIds(operIds)); } @RequiresPermissions("system:operlog:remove") @Log(title = "操作日志", businessType = BusinessType.CLEAN) @DeleteMapping("/clean") - public AjaxResult clean() - { + public AjaxResult clean() { operLogService.cleanOperLog(); return success(); } @InnerAuth @PostMapping - public AjaxResult add(@RequestBody SysOperLog operLog) - { + public AjaxResult add(@RequestBody SysOperLog operLog) { return toAjax(operLogService.insertOperlog(operLog)); } } diff --git a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SysOperLogServiceImpl.java b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SysOperLogServiceImpl.java index 9be7b09a..01d886f3 100644 --- a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SysOperLogServiceImpl.java +++ b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SysOperLogServiceImpl.java @@ -1,6 +1,7 @@ package com.bonus.sgzb.system.service.impl; import java.util.List; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.bonus.sgzb.system.api.domain.SysOperLog; @@ -9,60 +10,55 @@ import com.bonus.sgzb.system.service.ISysOperLogService; /** * 操作日志 服务层处理 - * + * * @author ruoyi */ @Service -public class SysOperLogServiceImpl implements ISysOperLogService -{ +public class SysOperLogServiceImpl implements ISysOperLogService { @Autowired private SysOperLogMapper operLogMapper; /** * 新增操作日志 - * + * * @param operLog 操作日志对象 * @return 结果 */ @Override - public int insertOperlog(SysOperLog operLog) - { + public int insertOperlog(SysOperLog operLog) { return operLogMapper.insertOperlog(operLog); } /** * 查询系统操作日志集合 - * + * * @param operLog 操作日志对象 * @return 操作日志集合 */ @Override - public List selectOperLogList(SysOperLog operLog) - { + public List selectOperLogList(SysOperLog operLog) { return operLogMapper.selectOperLogList(operLog); } /** * 批量删除系统操作日志 - * + * * @param operIds 需要删除的操作日志ID * @return 结果 */ @Override - public int deleteOperLogByIds(Long[] operIds) - { + public int deleteOperLogByIds(Long[] operIds) { return operLogMapper.deleteOperLogByIds(operIds); } /** * 查询操作日志详细 - * + * * @param operId 操作ID * @return 操作日志对象 */ @Override - public SysOperLog selectOperLogById(Long operId) - { + public SysOperLog selectOperLogById(Long operId) { return operLogMapper.selectOperLogById(operId); } @@ -70,8 +66,7 @@ public class SysOperLogServiceImpl implements ISysOperLogService * 清空操作日志 */ @Override - public void cleanOperLog() - { + public void cleanOperLog() { operLogMapper.cleanOperLog(); } } diff --git a/sgzb-modules/sgzb-system/src/main/resources/bootstrap.yml b/sgzb-modules/sgzb-system/src/main/resources/bootstrap.yml index 13e6331a..22d357ae 100644 --- a/sgzb-modules/sgzb-system/src/main/resources/bootstrap.yml +++ b/sgzb-modules/sgzb-system/src/main/resources/bootstrap.yml @@ -2,6 +2,12 @@ server: port: 29201 +# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问 +management: + endpoint: + env: + enabled: false + # Spring spring: servlet: