diff --git a/mall-ums/ums-boot/src/main/java/com/youlai/mall/ums/UmsApplication.java b/mall-ums/ums-boot/src/main/java/com/youlai/mall/ums/UmsApplication.java index 2cc39b539..6a72a9052 100644 --- a/mall-ums/ums-boot/src/main/java/com/youlai/mall/ums/UmsApplication.java +++ b/mall-ums/ums-boot/src/main/java/com/youlai/mall/ums/UmsApplication.java @@ -1,6 +1,5 @@ package com.youlai.mall.ums; -import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; @@ -8,7 +7,6 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient; @SpringBootApplication(exclude = DataSourceAutoConfiguration.class) @EnableDiscoveryClient -@MapperScan("com.youlai.mall.ums.mapper") public class UmsApplication { public static void main(String[] args) { SpringApplication.run(UmsApplication.class); diff --git a/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java b/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java index 8942c26c1..f7fde408e 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java +++ b/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java @@ -64,6 +64,13 @@ public class AuthController { ) throws HttpRequestMethodNotSupportedException { OAuth2AccessToken oAuth2AccessToken; + /** + * 获取登录认证的客户端ID + * + * 兼容两种方式获取Oauth2客户端信息(client_id、client_secret) + * 方式一:client_id、client_secret放在请求路径中 + * 方式二:放在请求头(Request Headers)中的Authorization字段,且经过加密,例如 Basic Y2xpZW50OnNlY3JldA== 明文等于 client:secret + */ String clientId = RequestUtils.getAuthClientId(); switch (clientId) { case AuthConstants.WEAPP_CLIENT_ID: // 微信认证