From 0e687e242d504cd4f45da50eb41af047ba5bdd39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E6=B2=90?= Date: Fri, 27 May 2022 19:43:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=99=BB=E5=BD=95=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/net/maku/framework/config/SwaggerConfig.java | 6 +++--- .../maku/framework/security/config/AuthorizationServerConfig.java | 2 ++ .../java/net/maku/framework/security/config/PermitResource.java | 2 +- .../src/main/java/net/maku/security/filter/ValidateCodeFilter.java | 2 +- .../main/java/net/maku/system/controller/SysOauthController.java | 2 +- pom.xml | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/fast-boot-framework/src/main/java/net/maku/framework/config/SwaggerConfig.java b/fast-boot-framework/src/main/java/net/maku/framework/config/SwaggerConfig.java index 6f81da7..e4c2afb 100644 --- a/fast-boot-framework/src/main/java/net/maku/framework/config/SwaggerConfig.java +++ b/fast-boot-framework/src/main/java/net/maku/framework/config/SwaggerConfig.java @@ -11,7 +11,7 @@ import org.springframework.context.annotation.Configuration; /** * Swagger配置 * - * @author 阿沐 dolinked@qq.com + * @author 阿沐 babamu@126.com */ @Configuration public class SwaggerConfig{ @@ -35,9 +35,9 @@ public class SwaggerConfig{ .description( "FastBoot") .contact(contact) .version("1.0") - .termsOfService("https://gitee.com/makunet") + .termsOfService("https://maku.net") .license(new License().name("MIT") - .url("https://gitee.com/makunet"))); + .url("https://maku.net"))); } } \ No newline at end of file diff --git a/fast-boot-framework/src/main/java/net/maku/framework/security/config/AuthorizationServerConfig.java b/fast-boot-framework/src/main/java/net/maku/framework/security/config/AuthorizationServerConfig.java index bf6119f..142a9f6 100644 --- a/fast-boot-framework/src/main/java/net/maku/framework/security/config/AuthorizationServerConfig.java +++ b/fast-boot-framework/src/main/java/net/maku/framework/security/config/AuthorizationServerConfig.java @@ -56,6 +56,8 @@ public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdap endpoints.exceptionTranslator(new FastWebResponseExceptionTranslator()); // 配置授权码模式,存放在Redis中 endpoints.authorizationCodeServices(redisAuthorizationCodeServices); + // 自定义登录地址 + endpoints.pathMapping("/oauth/token","/sys/oauth/token"); } @Bean diff --git a/fast-boot-framework/src/main/java/net/maku/framework/security/config/PermitResource.java b/fast-boot-framework/src/main/java/net/maku/framework/security/config/PermitResource.java index c92386a..8bda3df 100644 --- a/fast-boot-framework/src/main/java/net/maku/framework/security/config/PermitResource.java +++ b/fast-boot-framework/src/main/java/net/maku/framework/security/config/PermitResource.java @@ -18,6 +18,6 @@ public class PermitResource { "/swagger-ui.html", "/swagger-ui/**", "/doc.html", - "/oauth/captcha" + "/sys/oauth/captcha" }; } diff --git a/fast-boot-system/src/main/java/net/maku/security/filter/ValidateCodeFilter.java b/fast-boot-system/src/main/java/net/maku/security/filter/ValidateCodeFilter.java index 6319752..764113d 100644 --- a/fast-boot-system/src/main/java/net/maku/security/filter/ValidateCodeFilter.java +++ b/fast-boot-system/src/main/java/net/maku/security/filter/ValidateCodeFilter.java @@ -22,7 +22,7 @@ import java.io.IOException; @Component @AllArgsConstructor public class ValidateCodeFilter extends OncePerRequestFilter { - private final static String OAUTH_TOKEN_URL = "/oauth/token"; + private final static String OAUTH_TOKEN_URL = "/sys/oauth/token"; private final CaptchaService captchaService; private final UserAuthenticationFailureHandler authenticationFailureHandler; diff --git a/fast-boot-system/src/main/java/net/maku/system/controller/SysOauthController.java b/fast-boot-system/src/main/java/net/maku/system/controller/SysOauthController.java index 71dede5..a8c743f 100644 --- a/fast-boot-system/src/main/java/net/maku/system/controller/SysOauthController.java +++ b/fast-boot-system/src/main/java/net/maku/system/controller/SysOauthController.java @@ -25,7 +25,7 @@ import java.util.Map; * @author 阿沐 babamu@126.com */ @RestController -@RequestMapping("oauth") +@RequestMapping("sys/oauth") @Tag(name="认证管理") @AllArgsConstructor public class SysOauthController { diff --git a/pom.xml b/pom.xml index 618a8e3..5de0d94 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ fast-boot FastBoot - https://gitee.com/makunet + https://maku.net org.springframework.boot