refactor:删除多余引入

This commit is contained in:
hxrui 2021-02-26 20:38:57 +08:00
parent 32acded3e3
commit faf4b8dd47
2 changed files with 7 additions and 2 deletions

View File

@ -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);

View File

@ -64,6 +64,13 @@ public class AuthController {
) throws HttpRequestMethodNotSupportedException {
OAuth2AccessToken oAuth2AccessToken;
/**
* 获取登录认证的客户端ID
*
* 兼容两种方式获取Oauth2客户端信息client_idclient_secret
* 方式一client_idclient_secret放在请求路径中
* 方式二放在请求头Request Headers中的Authorization字段且经过加密例如 Basic Y2xpZW50OnNlY3JldA== 明文等于 client:secret
*/
String clientId = RequestUtils.getAuthClientId();
switch (clientId) {
case AuthConstants.WEAPP_CLIENT_ID: // 微信认证