mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2025-01-04 01:52:21 +08:00
refactor:删除多余引入
This commit is contained in:
parent
32acded3e3
commit
faf4b8dd47
@ -1,6 +1,5 @@
|
|||||||
package com.youlai.mall.ums;
|
package com.youlai.mall.ums;
|
||||||
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
@ -8,7 +7,6 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
|||||||
|
|
||||||
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
|
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
|
||||||
@EnableDiscoveryClient
|
@EnableDiscoveryClient
|
||||||
@MapperScan("com.youlai.mall.ums.mapper")
|
|
||||||
public class UmsApplication {
|
public class UmsApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(UmsApplication.class);
|
SpringApplication.run(UmsApplication.class);
|
||||||
|
@ -64,6 +64,13 @@ public class AuthController {
|
|||||||
) throws HttpRequestMethodNotSupportedException {
|
) throws HttpRequestMethodNotSupportedException {
|
||||||
OAuth2AccessToken oAuth2AccessToken;
|
OAuth2AccessToken oAuth2AccessToken;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取登录认证的客户端ID
|
||||||
|
*
|
||||||
|
* 兼容两种方式获取Oauth2客户端信息(client_id、client_secret)
|
||||||
|
* 方式一:client_id、client_secret放在请求路径中
|
||||||
|
* 方式二:放在请求头(Request Headers)中的Authorization字段,且经过加密,例如 Basic Y2xpZW50OnNlY3JldA== 明文等于 client:secret
|
||||||
|
*/
|
||||||
String clientId = RequestUtils.getAuthClientId();
|
String clientId = RequestUtils.getAuthClientId();
|
||||||
switch (clientId) {
|
switch (clientId) {
|
||||||
case AuthConstants.WEAPP_CLIENT_ID: // 微信认证
|
case AuthConstants.WEAPP_CLIENT_ID: // 微信认证
|
||||||
|
Loading…
Reference in New Issue
Block a user