统一使用日志类slf4j

master
星期八 5 years ago
parent cd52517c52
commit e66e173185
  1. 3
      src/main/java/com/lq/cms/web/FileSystemController.java
  2. 5
      src/main/java/com/lq/cms/web/IndexController.java
  3. 5
      src/main/java/com/lq/cms/web/LoginController.java
  4. 4
      src/main/java/com/lq/cms/web/UeditorController.java
  5. 5
      src/main/java/com/lq/cms/web/sys/LogController.java
  6. 6
      src/main/java/com/lq/cms/web/sys/MenuController.java
  7. 2
      src/main/java/com/lq/cms/web/sys/PermissionController.java
  8. 5
      src/main/java/com/lq/cms/web/sys/RoleController.java
  9. 5
      src/main/java/com/lq/cms/web/sys/UserController.java
  10. 4
      src/main/java/com/lq/cms/web/wechat/WechatInfoController.java
  11. 5
      src/main/java/com/lq/cms/web/wechat/WechatMessageController.java
  12. 4
      src/main/java/com/lq/cms/web/wechat/WechatRuleController.java
  13. 4
      src/main/java/com/lq/cms/web/wechat/WechatUserController.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;

@ -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;

@ -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;

@ -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 {

@ -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";

@ -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";

@ -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;

@ -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";

@ -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";

@ -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

@ -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

@ -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

@ -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 "";

Loading…
Cancel
Save