From 63bade1a9a4beee2fc1b46b80c029fd9bdb6e2bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E6=B5=A9?= Date: Sat, 7 May 2016 11:39:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=83=E4=B8=ADAuthorize=E6=B3=A8=E8=A7=A3?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AopAuthorizeValidatorAutoConfiguration.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hsweb-web-controller/src/main/java/org/hsweb/web/controller/AopAuthorizeValidatorAutoConfiguration.java b/hsweb-web-controller/src/main/java/org/hsweb/web/controller/AopAuthorizeValidatorAutoConfiguration.java index 025530ec5..356f1bb15 100644 --- a/hsweb-web-controller/src/main/java/org/hsweb/web/controller/AopAuthorizeValidatorAutoConfiguration.java +++ b/hsweb-web-controller/src/main/java/org/hsweb/web/controller/AopAuthorizeValidatorAutoConfiguration.java @@ -3,8 +3,8 @@ package org.hsweb.web.controller; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; -import org.hsweb.web.authorize.AopAuthorizeValidator; -import org.hsweb.web.exception.AuthorizeException; +import org.hsweb.web.core.authorize.AopAuthorizeValidator; +import org.hsweb.web.core.exception.AuthorizeException; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -25,7 +25,7 @@ public class AopAuthorizeValidatorAutoConfiguration extends AopAuthorizeValidato @Aspect @Order(1) static class ControllerAuthorizeValidator extends AopAuthorizeValidator { - @Around(value = "execution(* org.hsweb.web.controller..*Controller..*(..))") + @Around(value = "execution(* org.hsweb.web..controller..*Controller..*(..))||@annotation(org.hsweb.web.core.authorize.annotation.Authorize)") public Object around(ProceedingJoinPoint pjp) throws Throwable { boolean access = super.validate(pjp); if (!access) throw new AuthorizeException("无权限", 403);