zhouxiang
2022-04-25 8ab2ad5580212b91df848e4c127f2a682485fde3
src/main/java/com/hx/common/BaseController.java
@@ -1,5 +1,6 @@
package com.hx.common;
import com.hx.common.service.CommonService;
import com.hx.exception.ParamException;
import com.hx.exception.ServiceException;
import org.springframework.beans.propertyeditors.CustomDateEditor;
@@ -9,6 +10,7 @@
import org.springframework.web.context.request.ServletRequestAttributes;
import org.springframework.web.context.request.WebRequest;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.text.DateFormat;
@@ -23,6 +25,8 @@
public class BaseController {
   @Resource
   protected CommonService commonService;
   /*请不要声明变量,会导致不安全,因为这个是单列*/
   //只需要加上下面这段即可,注意不能忘记注解