E1ED922C1E9526DD63272D7EC5C6CB77
2020-12-14 4f13f0c4e91465050a3f00abe36aeb9adcaf62c2
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,9 @@
public class BaseController {
   @Resource
   protected CommonService commonService;
   /*请不要声明变量,会导致不安全,因为这个是单列*/
   //只需要加上下面这段即可,注意不能忘记注解