From e66e1731852d855c5d2cde97e87aa1c52814db36 Mon Sep 17 00:00:00 2001 From: qi Date: Wed, 1 Apr 2020 22:15:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=BD=BF=E7=94=A8=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E7=B1=BBslf4j?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/lq/cms/web/FileSystemController.java | 3 +++ src/main/java/com/lq/cms/web/IndexController.java | 5 +++-- src/main/java/com/lq/cms/web/LoginController.java | 5 +++-- src/main/java/com/lq/cms/web/UeditorController.java | 4 ++++ src/main/java/com/lq/cms/web/sys/LogController.java | 5 +++-- src/main/java/com/lq/cms/web/sys/MenuController.java | 6 +++--- src/main/java/com/lq/cms/web/sys/PermissionController.java | 2 -- src/main/java/com/lq/cms/web/sys/RoleController.java | 5 +++-- src/main/java/com/lq/cms/web/sys/UserController.java | 5 +++-- .../java/com/lq/cms/web/wechat/WechatInfoController.java | 4 ++++ .../java/com/lq/cms/web/wechat/WechatMessageController.java | 5 +++++ .../java/com/lq/cms/web/wechat/WechatRuleController.java | 4 ++++ .../java/com/lq/cms/web/wechat/WechatUserController.java | 4 ++++ 13 files changed, 42 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/lq/cms/web/FileSystemController.java b/src/main/java/com/lq/cms/web/FileSystemController.java index 3a8a814..c35f9d0 100755 --- a/src/main/java/com/lq/cms/web/FileSystemController.java +++ b/src/main/java/com/lq/cms/web/FileSystemController.java @@ -4,6 +4,8 @@ import com.lq.code.entity.AjaxResult; import com.lq.code.util.DateUtil; import com.lq.code.web.BaseController; import com.lq.entity.SysFile; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -25,6 +27,7 @@ import java.util.Date; @RequestMapping("/cms/file") public class FileSystemController extends BaseController{ + public static final Logger LOGGER = LoggerFactory.getLogger(FileSystemController.class); // @Autowired // private SysFileService sysFileService; diff --git a/src/main/java/com/lq/cms/web/IndexController.java b/src/main/java/com/lq/cms/web/IndexController.java index 57e777b..2dcef35 100755 --- a/src/main/java/com/lq/cms/web/IndexController.java +++ b/src/main/java/com/lq/cms/web/IndexController.java @@ -16,10 +16,11 @@ import com.lq.code.util.os.OsUtil; import com.lq.code.util.os.mode.JvmInfo; import com.lq.code.util.os.mode.OsInfo; import com.lq.entity.SysUser; -import org.apache.log4j.Logger; import org.apache.shiro.SecurityUtils; import org.apache.shiro.session.Session; import org.apache.shiro.subject.Subject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; @@ -39,7 +40,7 @@ import java.util.List; @RequestMapping("/cms") public class IndexController { - private static Logger LOGGER = Logger.getLogger(IndexController.class); + private static Logger LOGGER = LoggerFactory.getLogger(IndexController.class); @Autowired private SysResourceService sysResourceService; diff --git a/src/main/java/com/lq/cms/web/LoginController.java b/src/main/java/com/lq/cms/web/LoginController.java index 22ffbea..cc8572a 100755 --- a/src/main/java/com/lq/cms/web/LoginController.java +++ b/src/main/java/com/lq/cms/web/LoginController.java @@ -7,12 +7,13 @@ import com.lq.code.util.DateUtil; import com.lq.code.util.StringUtil; import com.lq.code.web.BaseController; import com.lq.entity.SysUser; -import org.apache.log4j.Logger; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.UnknownAccountException; import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.session.Session; import org.apache.shiro.subject.Subject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -36,7 +37,7 @@ import java.util.concurrent.ThreadLocalRandom; @RequestMapping("/cms/login") public class LoginController extends BaseController{ - private static Logger logger = Logger.getLogger(LoginController.class); + private static final Logger LOGGER = LoggerFactory.getLogger(LoginController.class); @Autowired private SysUserService sysUserService; diff --git a/src/main/java/com/lq/cms/web/UeditorController.java b/src/main/java/com/lq/cms/web/UeditorController.java index 9360e5b..3110140 100755 --- a/src/main/java/com/lq/cms/web/UeditorController.java +++ b/src/main/java/com/lq/cms/web/UeditorController.java @@ -1,6 +1,8 @@ package com.lq.cms.web; import com.baidu.ueditor.ActionEnter; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -14,6 +16,8 @@ import java.io.UnsupportedEncodingException; @RequestMapping("/ueditor") public class UeditorController { + public static final Logger LOGGER = LoggerFactory.getLogger(UeditorController.class); + @RequestMapping("/dispatch") public void config(HttpServletRequest request, HttpServletResponse response){ try { diff --git a/src/main/java/com/lq/cms/web/sys/LogController.java b/src/main/java/com/lq/cms/web/sys/LogController.java index 2ac1e3f..6833b30 100755 --- a/src/main/java/com/lq/cms/web/sys/LogController.java +++ b/src/main/java/com/lq/cms/web/sys/LogController.java @@ -8,8 +8,9 @@ import com.lq.cms.mode.AdminDataGridParam; import com.lq.cms.service.SysLogService; import com.lq.cms.vo.SysLogVo; import com.lq.code.util.Constant; -import org.apache.log4j.Logger; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -23,7 +24,7 @@ import org.springframework.web.servlet.ModelAndView; @RequestMapping("cms/log") public class LogController { - private static Logger LOGGER = Logger.getLogger(LogController.class); + public static final Logger LOGGER = LoggerFactory.getLogger(LogController.class); public static final String INDEX_URL = "/cms/log/index"; diff --git a/src/main/java/com/lq/cms/web/sys/MenuController.java b/src/main/java/com/lq/cms/web/sys/MenuController.java index 21e6344..09282a0 100755 --- a/src/main/java/com/lq/cms/web/sys/MenuController.java +++ b/src/main/java/com/lq/cms/web/sys/MenuController.java @@ -8,17 +8,17 @@ import com.lq.code.entity.AjaxResult; import com.lq.code.util.Constant; import com.lq.entity.SysResource; import com.lq.entity.SysUser; -import org.apache.log4j.Logger; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.subject.Subject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; - import java.util.Date; import java.util.List; @@ -31,7 +31,7 @@ import java.util.List; @RequestMapping("/cms/menu") public class MenuController { - private static Logger LOGGER = Logger.getLogger(MenuController.class); + public static final Logger LOGGER = LoggerFactory.getLogger(MenuController.class); public static final String INDEX_URL = "/cms/menu/index"; diff --git a/src/main/java/com/lq/cms/web/sys/PermissionController.java b/src/main/java/com/lq/cms/web/sys/PermissionController.java index 75d602c..96b4796 100644 --- a/src/main/java/com/lq/cms/web/sys/PermissionController.java +++ b/src/main/java/com/lq/cms/web/sys/PermissionController.java @@ -6,9 +6,7 @@ import com.lq.cms.service.SysPermissionService; import com.lq.cms.service.SysResourceService; import com.lq.cms.vo.SysPermissionVo; import com.lq.code.entity.AjaxResult; -import com.lq.code.util.Constant; import com.lq.code.web.BaseController; -import com.lq.dao.SysResourceDao; import com.lq.entity.SysPermission; import com.lq.entity.SysResource; import org.slf4j.Logger; diff --git a/src/main/java/com/lq/cms/web/sys/RoleController.java b/src/main/java/com/lq/cms/web/sys/RoleController.java index 8ed9ab4..561b64c 100755 --- a/src/main/java/com/lq/cms/web/sys/RoleController.java +++ b/src/main/java/com/lq/cms/web/sys/RoleController.java @@ -12,8 +12,9 @@ import com.lq.code.entity.AjaxResult; import com.lq.code.util.BeanUtil; import com.lq.code.util.Constant; import com.lq.entity.SysRole; -import org.apache.log4j.Logger; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; @@ -31,7 +32,7 @@ import java.util.List; @RequestMapping("/cms/role") public class RoleController { - private static Logger LOGGER = Logger.getLogger(RoleController.class); + public static Logger LOGGER = LoggerFactory.getLogger(RoleController.class); public static final String INDEX_URL = "/cms/role/index"; diff --git a/src/main/java/com/lq/cms/web/sys/UserController.java b/src/main/java/com/lq/cms/web/sys/UserController.java index 8787bcb..08b1cbe 100755 --- a/src/main/java/com/lq/cms/web/sys/UserController.java +++ b/src/main/java/com/lq/cms/web/sys/UserController.java @@ -10,13 +10,14 @@ import com.lq.cms.vo.SysUserVo; import com.lq.code.entity.AjaxResult; import com.lq.code.util.*; import com.lq.entity.SysUser; -import org.apache.log4j.Logger; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.mgt.RealmSecurityManager; import org.apache.shiro.subject.PrincipalCollection; import org.apache.shiro.subject.SimplePrincipalCollection; import org.apache.shiro.subject.Subject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; @@ -41,7 +42,7 @@ import java.util.UUID; @RequestMapping("/cms/user") public class UserController { - private final static Logger LOGGER = Logger.getLogger(UserController.class); + public final static Logger LOGGER = LoggerFactory.getLogger(UserController.class); private final static String INDEX_URL="/cms/user/index"; diff --git a/src/main/java/com/lq/cms/web/wechat/WechatInfoController.java b/src/main/java/com/lq/cms/web/wechat/WechatInfoController.java index 72826d3..ec8f633 100755 --- a/src/main/java/com/lq/cms/web/wechat/WechatInfoController.java +++ b/src/main/java/com/lq/cms/web/wechat/WechatInfoController.java @@ -11,6 +11,8 @@ import com.lq.entity.WechatInfo; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.subject.Subject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -28,6 +30,8 @@ import java.util.Map; @RequestMapping("/cms/wechat/info") public class WechatInfoController { + public static final Logger LOGGER = LoggerFactory.getLogger(WechatInfoController.class); + public static final String INDEX_URL = "/cms/wechat/info/index"; @Autowired diff --git a/src/main/java/com/lq/cms/web/wechat/WechatMessageController.java b/src/main/java/com/lq/cms/web/wechat/WechatMessageController.java index 5d8fb3f..d0cd0f5 100755 --- a/src/main/java/com/lq/cms/web/wechat/WechatMessageController.java +++ b/src/main/java/com/lq/cms/web/wechat/WechatMessageController.java @@ -11,6 +11,8 @@ import com.lq.code.util.FileUtil; import com.lq.code.util.StringUtil; import com.lq.entity.WechatMessage; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; @@ -22,6 +24,7 @@ import org.springframework.web.multipart.MultipartFile; import java.io.File; import java.io.IOException; +import java.security.acl.LastOwnerException; import java.util.Date; import java.util.List; import java.util.Map; @@ -34,6 +37,8 @@ import java.util.UUID; @RequestMapping("/cms/wechat/message") public class WechatMessageController { + public static final Logger LOGGER = LoggerFactory.getLogger(WechatMessageController.class); + public static final String INDEX_URL = "/cms/wechat/message/index"; @Autowired diff --git a/src/main/java/com/lq/cms/web/wechat/WechatRuleController.java b/src/main/java/com/lq/cms/web/wechat/WechatRuleController.java index 6176995..faaa4ad 100755 --- a/src/main/java/com/lq/cms/web/wechat/WechatRuleController.java +++ b/src/main/java/com/lq/cms/web/wechat/WechatRuleController.java @@ -10,6 +10,8 @@ import com.lq.code.entity.AjaxResult; import com.lq.code.util.StringUtil; import com.lq.entity.WechatInfo; import com.lq.entity.WechatKeyword; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -27,6 +29,8 @@ import java.util.Map; @RequestMapping("/cms/wechat/rule") public class WechatRuleController { + public static final Logger LOGGER = LoggerFactory.getLogger(WechatRuleController.class); + @Autowired private WechatInfoService wechatInfoService; @Autowired diff --git a/src/main/java/com/lq/cms/web/wechat/WechatUserController.java b/src/main/java/com/lq/cms/web/wechat/WechatUserController.java index 1b0c210..397743f 100755 --- a/src/main/java/com/lq/cms/web/wechat/WechatUserController.java +++ b/src/main/java/com/lq/cms/web/wechat/WechatUserController.java @@ -1,5 +1,7 @@ package com.lq.cms.web.wechat; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -13,6 +15,8 @@ import org.springframework.web.bind.annotation.RequestMapping; @RequestMapping("/cms/wechat/user") public class WechatUserController { + public static final Logger LOGGER = LoggerFactory.getLogger(WechatUserController.class); + public String index(){ return "";