mirror of https://gitee.com/maxjhandsome/pig
🐛 Fixing a bug. jar 包中的AOP 没有拦截@Inner 请求
This commit is contained in:
parent
ecc0aa7504
commit
12dad0a063
|
@ -25,6 +25,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.aspectj.lang.ProceedingJoinPoint;
|
import org.aspectj.lang.ProceedingJoinPoint;
|
||||||
import org.aspectj.lang.annotation.Around;
|
import org.aspectj.lang.annotation.Around;
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
|
import org.springframework.core.Ordered;
|
||||||
import org.springframework.security.access.AccessDeniedException;
|
import org.springframework.security.access.AccessDeniedException;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@ -32,7 +33,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lengleng
|
* @author lengleng
|
||||||
* @date 2018/11/26
|
* @date 2019/02/14
|
||||||
* <p>
|
* <p>
|
||||||
* 服务间接口不鉴权处理逻辑
|
* 服务间接口不鉴权处理逻辑
|
||||||
*/
|
*/
|
||||||
|
@ -40,7 +41,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
@Aspect
|
@Aspect
|
||||||
@Component
|
@Component
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class PigxSecurityInnerAspect {
|
public class PigSecurityInnerAspect implements Ordered {
|
||||||
private final HttpServletRequest request;
|
private final HttpServletRequest request;
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
@ -54,4 +55,8 @@ public class PigxSecurityInnerAspect {
|
||||||
return point.proceed();
|
return point.proceed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOrder() {
|
||||||
|
return Ordered.HIGHEST_PRECEDENCE + 1;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||||
com.pig4cloud.pig.common.security.component.PermissionService,\
|
com.pig4cloud.pig.common.security.component.PermissionService,\
|
||||||
com.pig4cloud.pig.common.security.component.PigAccessDeniedHandler,\
|
com.pig4cloud.pig.common.security.component.PigAccessDeniedHandler,\
|
||||||
|
com.pig4cloud.pig.common.security.component.PigSecurityInnerAspect,\
|
||||||
com.pig4cloud.pig.common.security.component.ResourceAuthExceptionEntryPoint,\
|
com.pig4cloud.pig.common.security.component.ResourceAuthExceptionEntryPoint,\
|
||||||
com.pig4cloud.pig.common.security.component.PigResourceServerTokenRelayAutoConfiguration,\
|
com.pig4cloud.pig.common.security.component.PigResourceServerTokenRelayAutoConfiguration,\
|
||||||
com.pig4cloud.pig.common.security.feign.PigFeignClientConfiguration,\
|
com.pig4cloud.pig.common.security.feign.PigFeignClientConfiguration,\
|
||||||
|
|
Loading…
Reference in New Issue