浏览代码

使用指南,小程序党建福利信息 富文本过滤

LIVE_YE 2 年之前
父节点
当前提交
48d4e5a26c

+ 3 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/business/UseGuideController.java

@@ -4,6 +4,7 @@ import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
@@ -71,7 +72,7 @@ public class UseGuideController extends BaseController
      */
     @Log(title = "使用指南", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody UseGuide useGuide)
+    public AjaxResult add(@Validated @RequestBody UseGuide useGuide)
     {
         return toAjax(useGuideService.insertUseGuide(useGuide));
     }
@@ -81,7 +82,7 @@ public class UseGuideController extends BaseController
      */
     @Log(title = "使用指南", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody UseGuide useGuide)
+    public AjaxResult edit(@Validated @RequestBody UseGuide useGuide)
     {
         return toAjax(useGuideService.updateUseGuide(useGuide));
     }

+ 2 - 2
ruoyi-admin/src/main/resources/application.yml

@@ -29,7 +29,7 @@ spring:
     # 国际化资源文件路径
     basename: i18n/messages
   profiles: 
-    active: prod
+    active: druid
   # 文件上传
   servlet:
      multipart:
@@ -80,6 +80,6 @@ xss:
   # 过滤开关
   enabled: true
   # 排除链接(多个用逗号分隔)
-  excludes: /system/notice,/system/merchants,/system/guide
+  excludes: /system/notice,/system/merchants,/system/guide,/system/use,/system/welfare
   # 匹配链接
   urlPatterns: /system/*,/monitor/*,/tool/*