废话不多说,直接上代码
package com.zyj.infrastructure.intercept;
import com.zyj.application.model.dto.login.LoginUserQueryDTO;
import com.zyj.common.constant.ErpPayConstant;
import com.zyj.domain.base.ResultObj;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpSession;
/**
* 登录拦截
* @author zhangyajuan
* @Date 2021/07/14
*/
@Slf4j
@Component
@Aspect
public class LoginIntercept {
/**
* 指定切入点(规定切面范围)
* 排除登录校验密码controller
*/
@Pointcut("within(com.zyj.api.controller..*)"
+ "&&