chenjiahe
2022-03-31 0bf91738d54b72851f5a7f46916fe737d907574d
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;
   /*请不要声明变量,会导致不安全,因为这个是单列*/
   //只需要加上下面这段即可,注意不能忘记注解