From 910cda74139eae6205efd1ab56dcccf76ff5e027 Mon Sep 17 00:00:00 2001 From: xiangwb Date: Mon, 23 Apr 2018 16:28:41 +0800 Subject: [PATCH] merge --- .../com/xwbing/configuration/DispatcherServletConfig.java | 2 ++ .../java/com/xwbing/configuration/SchedulingConfig.java | 4 ++-- .../main/java/com/xwbing/configuration/SwaggerConfig.java | 2 +- .../com/xwbing/controller/sys/DataDictionaryControl.java | 2 +- .../java/com/xwbing/controller/sys/SysAuthorityControl.java | 6 +++--- .../java/com/xwbing/controller/sys/SysConfigControl.java | 6 +++--- .../main/java/com/xwbing/controller/sys/SysRoleControl.java | 6 +++--- .../main/java/com/xwbing/controller/sys/SysUserControl.java | 6 +++--- 8 files changed, 18 insertions(+), 16 deletions(-) diff --git a/boot-web/src/main/java/com/xwbing/configuration/DispatcherServletConfig.java b/boot-web/src/main/java/com/xwbing/configuration/DispatcherServletConfig.java index a1d9bce..f16a586 100644 --- a/boot-web/src/main/java/com/xwbing/configuration/DispatcherServletConfig.java +++ b/boot-web/src/main/java/com/xwbing/configuration/DispatcherServletConfig.java @@ -55,6 +55,8 @@ public class DispatcherServletConfig extends WebMvcConfigurerAdapter { // registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); //服务器部署的tomcat下html路径 // registry.addResourceHandler("/js/**").addResourceLocations("html/js/"); +// registry.addResourceHandler("/css/**").addResourceLocations("html/css/"); +// registry.addResourceHandler("/img/**").addResourceLocations("html/img/"); super.addResourceHandlers(registry); } diff --git a/boot-web/src/main/java/com/xwbing/configuration/SchedulingConfig.java b/boot-web/src/main/java/com/xwbing/configuration/SchedulingConfig.java index 1869588..9451fd2 100644 --- a/boot-web/src/main/java/com/xwbing/configuration/SchedulingConfig.java +++ b/boot-web/src/main/java/com/xwbing/configuration/SchedulingConfig.java @@ -14,11 +14,11 @@ import org.springframework.scheduling.annotation.Scheduled; * 作者: xiangwb */ @Configuration -@EnableScheduling // 启用定时任务 +@EnableScheduling//启用定时任务 public class SchedulingConfig { private final Logger logger = LoggerFactory.getLogger(SchedulingConfig.class); - @Scheduled(cron = "0 0 6 * * ? ")//每天6点开启定时任务 + @Scheduled(cron = "0 0 6 * * ? ")//每天6点执行定时任务 public void scheduler() { logger.info("清除公共数据类过期数据==================="); CommonDataUtil.clearExpiryData(); diff --git a/boot-web/src/main/java/com/xwbing/configuration/SwaggerConfig.java b/boot-web/src/main/java/com/xwbing/configuration/SwaggerConfig.java index 81a2a33..deee9ad 100644 --- a/boot-web/src/main/java/com/xwbing/configuration/SwaggerConfig.java +++ b/boot-web/src/main/java/com/xwbing/configuration/SwaggerConfig.java @@ -94,7 +94,7 @@ public class SwaggerConfig { } /** - * 自定义返回信息 + * 自定义返回状态信息描述 * * @return */ diff --git a/boot-web/src/main/java/com/xwbing/controller/sys/DataDictionaryControl.java b/boot-web/src/main/java/com/xwbing/controller/sys/DataDictionaryControl.java index 2dc8c8e..de7a6dd 100644 --- a/boot-web/src/main/java/com/xwbing/controller/sys/DataDictionaryControl.java +++ b/boot-web/src/main/java/com/xwbing/controller/sys/DataDictionaryControl.java @@ -42,7 +42,7 @@ public class DataDictionaryControl { } @LogInfo("修改字典") - @PostMapping("update") + @PutMapping("update") @ApiOperation(value = "修改字典", response = RestMessageVo.class) public JSONObject update(@RequestBody DataDictionary dictionary) { if (StringUtils.isEmpty(dictionary.getId())) { diff --git a/boot-web/src/main/java/com/xwbing/controller/sys/SysAuthorityControl.java b/boot-web/src/main/java/com/xwbing/controller/sys/SysAuthorityControl.java index 4bc0b77..affc823 100644 --- a/boot-web/src/main/java/com/xwbing/controller/sys/SysAuthorityControl.java +++ b/boot-web/src/main/java/com/xwbing/controller/sys/SysAuthorityControl.java @@ -51,8 +51,8 @@ public class SysAuthorityControl { @LogInfo("删除权限") @ApiOperation(value = "删除权限", response = RestMessageVo.class) - @GetMapping("removeById") - public JSONObject removeById(@RequestParam String id) { + @DeleteMapping("removeById/{id}") + public JSONObject removeById(@PathVariable String id) { if (StringUtils.isEmpty(id)) { return JsonResult.toJSONObj("主键不能为空"); } @@ -66,7 +66,7 @@ public class SysAuthorityControl { @LogInfo("修改权限") @ApiOperation(value = "修改权限", response = RestMessageVo.class) - @PostMapping("update") + @PutMapping("update") public JSONObject update(@RequestBody SysAuthority sysAuthority) { if (StringUtils.isEmpty(sysAuthority.getId())) { return JsonResult.toJSONObj("主键不能为空"); diff --git a/boot-web/src/main/java/com/xwbing/controller/sys/SysConfigControl.java b/boot-web/src/main/java/com/xwbing/controller/sys/SysConfigControl.java index 8d245f0..202b6c3 100644 --- a/boot-web/src/main/java/com/xwbing/controller/sys/SysConfigControl.java +++ b/boot-web/src/main/java/com/xwbing/controller/sys/SysConfigControl.java @@ -43,8 +43,8 @@ public class SysConfigControl { } @ApiOperation(value = "删除", notes = "根据code删除系统配置信息", response = RestMessageVo.class) - @GetMapping("removeByCode") - public JSONObject removeByCode(@RequestParam String code) { + @DeleteMapping("removeByCode/{code}") + public JSONObject removeByCode(@PathVariable String code) { String logMsg = "根据code删除系统配置信息"; logger.info(logMsg + " code:{}", code); if (StringUtils.isEmpty(code)) { @@ -55,7 +55,7 @@ public class SysConfigControl { } @ApiOperation(value = "修改", notes = "修改系统配置信息", response = RestMessageVo.class) - @PostMapping("update") + @PutMapping("update") public JSONObject update(@RequestBody @Valid SysConfig sysConfig) { String logMsg = "修改系统配置信息"; logger.info(logMsg); diff --git a/boot-web/src/main/java/com/xwbing/controller/sys/SysRoleControl.java b/boot-web/src/main/java/com/xwbing/controller/sys/SysRoleControl.java index cdc2b1c..5478ae6 100644 --- a/boot-web/src/main/java/com/xwbing/controller/sys/SysRoleControl.java +++ b/boot-web/src/main/java/com/xwbing/controller/sys/SysRoleControl.java @@ -50,8 +50,8 @@ public class SysRoleControl { @LogInfo("删除角色") @ApiOperation(value = "删除角色", response = RestMessageVo.class) - @GetMapping("removeById") - public JSONObject removeById(@RequestParam String id) { + @DeleteMapping("removeById/{id}") + public JSONObject removeById(@PathVariable String id) { if (StringUtils.isEmpty(id)) { return JsonResult.toJSONObj("主键不能为空"); } @@ -61,7 +61,7 @@ public class SysRoleControl { @LogInfo("修改角色") @ApiOperation(value = "修改角色", response = RestMessageVo.class) - @PostMapping("update") + @PutMapping("update") public JSONObject update(@RequestBody SysRole sysRole) { if (StringUtils.isEmpty(sysRole.getId())) { return JsonResult.toJSONObj("主键不能为空"); diff --git a/boot-web/src/main/java/com/xwbing/controller/sys/SysUserControl.java b/boot-web/src/main/java/com/xwbing/controller/sys/SysUserControl.java index c0be23f..513e230 100644 --- a/boot-web/src/main/java/com/xwbing/controller/sys/SysUserControl.java +++ b/boot-web/src/main/java/com/xwbing/controller/sys/SysUserControl.java @@ -59,8 +59,8 @@ public class SysUserControl { @LogInfo("删除用户") @ApiOperation(value = "删除用户", response = RestMessageVo.class) - @GetMapping("removeById") - public JSONObject removeById(@RequestParam String id) { + @DeleteMapping("removeById/{id}") + public JSONObject removeById(@PathVariable String id) { if (StringUtils.isEmpty(id)) { return JsonResult.toJSONObj("主键不能为空"); } @@ -70,7 +70,7 @@ public class SysUserControl { @LogInfo("修改用户信息") @ApiOperation(value = "修改用户信息", response = RestMessageVo.class) - @PostMapping("update") + @PutMapping("update") public JSONObject update(@RequestBody @Valid SysUser sysUser) { if (StringUtils.isEmpty(sysUser.getId())) { return JsonResult.toJSONObj("主键不能为空");