mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-29 18:51:53 +08:00
回退 'Pull Request !518 : 添加华为云 maven 升级依赖'
This commit is contained in:
parent
6b42efd786
commit
11c4c950b7
@ -249,9 +249,9 @@ ps:核心功能已经实现,正在对接微信小程序中...
|
|||||||
|
|
||||||
| 框架 | 说明 | 版本 | 学习指南 |
|
| 框架 | 说明 | 版本 | 学习指南 |
|
||||||
|---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------|
|
|---------------------------------------------------------------------------------------------|------------------|-------------|----------------------------------------------------------------|
|
||||||
| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.13 | [文档](https://github.com/YunaiV/SpringBoot-Labs) |
|
| [Spring Boot](https://spring.io/projects/spring-boot) | 应用开发框架 | 2.7.12 | [文档](https://github.com/YunaiV/SpringBoot-Labs) |
|
||||||
| [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | |
|
| [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | |
|
||||||
| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.18 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
|
| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.16 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
|
||||||
| [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) |
|
| [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) |
|
||||||
| [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 3.6.1 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
|
| [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 3.6.1 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
|
||||||
| [Redis](https://redis.io/) | key-value 数据库 | 5.0 / 6.0 | |
|
| [Redis](https://redis.io/) | key-value 数据库 | 5.0 / 6.0 | |
|
||||||
@ -267,7 +267,7 @@ ps:核心功能已经实现,正在对接微信小程序中...
|
|||||||
| [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 2.7.10 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) |
|
| [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 2.7.10 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) |
|
||||||
| [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.13.3 | |
|
| [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.13.3 | |
|
||||||
| [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.5.5.Final | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao) |
|
| [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.5.5.Final | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao) |
|
||||||
| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.18.28 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) |
|
| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.18.26 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) |
|
||||||
| [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.8.2 | - |
|
| [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.8.2 | - |
|
||||||
| [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 4.8.0 | - |
|
| [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 4.8.0 | - |
|
||||||
|
|
||||||
|
11
pom.xml
11
pom.xml
@ -38,8 +38,8 @@
|
|||||||
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
|
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
|
||||||
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||||
<!-- 看看咋放到 bom 里 -->
|
<!-- 看看咋放到 bom 里 -->
|
||||||
<lombok.version>1.18.28</lombok.version>
|
<lombok.version>1.18.26</lombok.version>
|
||||||
<spring.boot.version>2.7.13</spring.boot.version>
|
<spring.boot.version>2.7.12</spring.boot.version>
|
||||||
<mapstruct.version>1.5.5.Final</mapstruct.version>
|
<mapstruct.version>1.5.5.Final</mapstruct.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
@ -96,13 +96,8 @@
|
|||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<!-- 使用 huawei / aliyun 的 Maven 源,提升下载速度 -->
|
<!-- 使用 aliyun 的 Maven 源,提升下载速度 -->
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
|
||||||
<id>huaweicloud</id>
|
|
||||||
<name>huawei</name>
|
|
||||||
<url>https://mirrors.huaweicloud.com/repository/maven/</url>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
<repository>
|
||||||
<id>aliyunmaven</id>
|
<id>aliyunmaven</id>
|
||||||
<name>aliyun</name>
|
<name>aliyun</name>
|
||||||
|
@ -16,17 +16,17 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<revision>1.7.3-snapshot</revision>
|
<revision>1.7.3-snapshot</revision>
|
||||||
<!-- 统一依赖管理 -->
|
<!-- 统一依赖管理 -->
|
||||||
<spring.boot.version>2.7.13</spring.boot.version>
|
<spring.boot.version>2.7.12</spring.boot.version>
|
||||||
<!-- Web 相关 -->
|
<!-- Web 相关 -->
|
||||||
<springdoc.version>1.6.15</springdoc.version>
|
<springdoc.version>1.6.15</springdoc.version>
|
||||||
<knife4j.version>4.1.0</knife4j.version>
|
<knife4j.version>4.1.0</knife4j.version>
|
||||||
<servlet.versoin>2.5</servlet.versoin>
|
<servlet.versoin>2.5</servlet.versoin>
|
||||||
<!-- DB 相关 -->
|
<!-- DB 相关 -->
|
||||||
<druid.version>1.2.18</druid.version>
|
<druid.version>1.2.16</druid.version>
|
||||||
<mybatis-plus.version>3.5.3.1</mybatis-plus.version>
|
<mybatis-plus.version>3.5.3.1</mybatis-plus.version>
|
||||||
<mybatis-plus-generator.version>3.5.3.1</mybatis-plus-generator.version>
|
<mybatis-plus-generator.version>3.5.3.1</mybatis-plus-generator.version>
|
||||||
<dynamic-datasource.version>3.6.1</dynamic-datasource.version>
|
<dynamic-datasource.version>3.6.1</dynamic-datasource.version>
|
||||||
<mybatis-plus-join-boot-starter.version>1.4.5</mybatis-plus-join-boot-starter.version>
|
<mybatis-plus-join-boot-starter.version>1.4.3.2</mybatis-plus-join-boot-starter.version>
|
||||||
<redisson.version>3.18.0</redisson.version>
|
<redisson.version>3.18.0</redisson.version>
|
||||||
<dm8.jdbc.version>8.1.2.141</dm8.jdbc.version>
|
<dm8.jdbc.version>8.1.2.141</dm8.jdbc.version>
|
||||||
<!-- 服务保障相关 -->
|
<!-- 服务保障相关 -->
|
||||||
@ -43,16 +43,16 @@
|
|||||||
<!-- Bpm 工作流相关 -->
|
<!-- Bpm 工作流相关 -->
|
||||||
<flowable.version>6.8.0</flowable.version>
|
<flowable.version>6.8.0</flowable.version>
|
||||||
<!-- 工具类相关 -->
|
<!-- 工具类相关 -->
|
||||||
<captcha-plus.version>1.0.5</captcha-plus.version>
|
<captcha-plus.version>1.0.2</captcha-plus.version>
|
||||||
<jsoup.version>1.15.4</jsoup.version>
|
<jsoup.version>1.15.4</jsoup.version>
|
||||||
<lombok.version>1.18.28</lombok.version>
|
<lombok.version>1.18.26</lombok.version>
|
||||||
<mapstruct.version>1.5.5.Final</mapstruct.version>
|
<mapstruct.version>1.5.5.Final</mapstruct.version>
|
||||||
<hutool.version>5.8.20</hutool.version>
|
<hutool.version>5.8.18</hutool.version>
|
||||||
<easyexcel.verion>3.3.2</easyexcel.verion>
|
<easyexcel.verion>3.3.1</easyexcel.verion>
|
||||||
<velocity.version>2.3</velocity.version>
|
<velocity.version>2.3</velocity.version>
|
||||||
<screw.version>1.0.5</screw.version>
|
<screw.version>1.0.5</screw.version>
|
||||||
<fastjson.version>1.2.83</fastjson.version>
|
<fastjson.version>1.2.83</fastjson.version>
|
||||||
<guava.version>32.0.1-jre</guava.version>
|
<guava.version>32.0.0-jre</guava.version>
|
||||||
<guice.version>5.1.0</guice.version>
|
<guice.version>5.1.0</guice.version>
|
||||||
<transmittable-thread-local.version>2.14.2</transmittable-thread-local.version>
|
<transmittable-thread-local.version>2.14.2</transmittable-thread-local.version>
|
||||||
<commons-net.version>3.9.0</commons-net.version>
|
<commons-net.version>3.9.0</commons-net.version>
|
||||||
@ -64,14 +64,14 @@
|
|||||||
<okio.version>3.0.0</okio.version>
|
<okio.version>3.0.0</okio.version>
|
||||||
<okhttp3.version>4.10.0</okhttp3.version>
|
<okhttp3.version>4.10.0</okhttp3.version>
|
||||||
<commons-io.version>2.11.0</commons-io.version>
|
<commons-io.version>2.11.0</commons-io.version>
|
||||||
<minio.version>8.5.4</minio.version>
|
<minio.version>8.5.2</minio.version>
|
||||||
<aliyun-java-sdk-core.version>4.6.3</aliyun-java-sdk-core.version>
|
<aliyun-java-sdk-core.version>4.6.3</aliyun-java-sdk-core.version>
|
||||||
<aliyun-java-sdk-dysmsapi.version>2.2.1</aliyun-java-sdk-dysmsapi.version>
|
<aliyun-java-sdk-dysmsapi.version>2.2.1</aliyun-java-sdk-dysmsapi.version>
|
||||||
<tencentcloud-sdk-java.version>3.1.758</tencentcloud-sdk-java.version>
|
<tencentcloud-sdk-java.version>3.1.758</tencentcloud-sdk-java.version>
|
||||||
<justauth.version>1.0.1</justauth.version>
|
<justauth.version>1.4.0</justauth.version>
|
||||||
<jimureport.version>1.5.8</jimureport.version>
|
<jimureport.version>1.5.6</jimureport.version>
|
||||||
<xercesImpl.version>2.12.2</xercesImpl.version>
|
<xercesImpl.version>2.12.2</xercesImpl.version>
|
||||||
<wx-java-mp.version>4.5.0</wx-java-mp.version>
|
<wx-java-mp.version>4.3.0</wx-java-mp.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
@ -589,8 +589,8 @@
|
|||||||
<!-- SMS SDK end -->
|
<!-- SMS SDK end -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.xingyuv</groupId>
|
<groupId>com.xkcoding.justauth</groupId>
|
||||||
<artifactId>spring-boot-starter-justauth</artifactId> <!-- 社交登陆(例如说,个人微信、企业微信等等) -->
|
<artifactId>justauth-spring-boot-starter</artifactId> <!-- 社交登陆(例如说,个人微信、企业微信等等) -->
|
||||||
<version>${justauth.version}</version>
|
<version>${justauth.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<maven.compiler.target>8</maven.compiler.target>
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<!-- 统一依赖管理 -->
|
<!-- 统一依赖管理 -->
|
||||||
<spring.boot.version>2.7.13</spring.boot.version>
|
<spring.boot.version>2.7.12</spring.boot.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.hutool</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
<artifactId>hutool-all</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
<version>5.8.20</version>
|
<version>5.8.18</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<maven.compiler.target>8</maven.compiler.target>
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<!-- 统一依赖管理 -->
|
<!-- 统一依赖管理 -->
|
||||||
<spring.boot.version>2.7.13</spring.boot.version>
|
<spring.boot.version>2.7.12</spring.boot.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.hutool</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
<artifactId>hutool-all</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
<version>5.8.20</version>
|
<version>5.8.18</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.binarywang</groupId>
|
<groupId>com.github.binarywang</groupId>
|
||||||
<artifactId>weixin-java-pay</artifactId>
|
<artifactId>weixin-java-pay</artifactId>
|
||||||
<version>4.5.0</version>
|
<version>4.4.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- TODO 芋艿:清理 -->
|
<!-- TODO 芋艿:清理 -->
|
||||||
|
|
||||||
|
@ -36,8 +36,8 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<!-- 三方云服务相关 -->
|
<!-- 三方云服务相关 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.xingyuv</groupId>
|
<groupId>com.xkcoding.justauth</groupId>
|
||||||
<artifactId>spring-boot-starter-justauth</artifactId>
|
<artifactId>justauth-spring-boot-starter</artifactId>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>cn.hutool</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package cn.iocoder.yudao.framework.social.config;
|
package cn.iocoder.yudao.framework.social.config;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory;
|
import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory;
|
||||||
import com.xingyuv.http.HttpUtil;
|
import com.xkcoding.http.HttpUtil;
|
||||||
import com.xingyuv.http.support.hutool.HutoolImpl;
|
import com.xkcoding.http.support.hutool.HutoolImpl;
|
||||||
import com.xingyuv.jushauth.cache.AuthStateCache;
|
import com.xkcoding.justauth.autoconfigure.JustAuthProperties;
|
||||||
import com.xingyuv.justauth.autoconfigure.JustAuthProperties;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import me.zhyd.oauth.cache.AuthStateCache;
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
|
@ -4,12 +4,12 @@ import cn.hutool.core.util.EnumUtil;
|
|||||||
import cn.hutool.core.util.ReflectUtil;
|
import cn.hutool.core.util.ReflectUtil;
|
||||||
import cn.iocoder.yudao.framework.social.core.enums.AuthExtendSource;
|
import cn.iocoder.yudao.framework.social.core.enums.AuthExtendSource;
|
||||||
import cn.iocoder.yudao.framework.social.core.request.AuthWeChatMiniAppRequest;
|
import cn.iocoder.yudao.framework.social.core.request.AuthWeChatMiniAppRequest;
|
||||||
import com.xingyuv.jushauth.cache.AuthStateCache;
|
import com.xkcoding.justauth.AuthRequestFactory;
|
||||||
import com.xingyuv.jushauth.config.AuthConfig;
|
import com.xkcoding.justauth.autoconfigure.JustAuthProperties;
|
||||||
import com.xingyuv.jushauth.config.AuthSource;
|
import me.zhyd.oauth.cache.AuthStateCache;
|
||||||
import com.xingyuv.jushauth.request.AuthRequest;
|
import me.zhyd.oauth.config.AuthConfig;
|
||||||
import com.xingyuv.justauth.AuthRequestFactory;
|
import me.zhyd.oauth.config.AuthSource;
|
||||||
import com.xingyuv.justauth.autoconfigure.JustAuthProperties;
|
import me.zhyd.oauth.request.AuthRequest;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
package cn.iocoder.yudao.framework.social.core.enums;
|
package cn.iocoder.yudao.framework.social.core.enums;
|
||||||
|
|
||||||
import com.xingyuv.jushauth.config.AuthSource;
|
import me.zhyd.oauth.config.AuthSource;
|
||||||
import com.xingyuv.jushauth.request.AuthDefaultRequest;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拓展 JustAuth 各 api 需要的 url, 用枚举类分平台类型管理
|
* 拓展 JustAuth 各 api 需要的 url, 用枚举类分平台类型管理
|
||||||
*
|
*
|
||||||
* 默认配置 {@link com.xingyuv.jushauth.config.AuthDefaultSource}
|
* 默认配置 {@link me.zhyd.oauth.config.AuthDefaultSource}
|
||||||
*
|
*
|
||||||
* @author timfruit
|
* @author timfruit
|
||||||
*/
|
*/
|
||||||
@ -35,11 +34,6 @@ public enum AuthExtendSource implements AuthSource {
|
|||||||
// 参见 https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html 文档
|
// 参见 https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html 文档
|
||||||
throw new UnsupportedOperationException("不支持获取用户信息 url,请使用小程序内置函数 wx.getUserProfile() 获取用户信息");
|
throw new UnsupportedOperationException("不支持获取用户信息 url,请使用小程序内置函数 wx.getUserProfile() 获取用户信息");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Class<? extends AuthDefaultRequest> getTargetClass() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,16 +3,16 @@ package cn.iocoder.yudao.framework.social.core.request;
|
|||||||
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||||
import cn.iocoder.yudao.framework.social.core.enums.AuthExtendSource;
|
import cn.iocoder.yudao.framework.social.core.enums.AuthExtendSource;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.xingyuv.jushauth.cache.AuthStateCache;
|
|
||||||
import com.xingyuv.jushauth.config.AuthConfig;
|
|
||||||
import com.xingyuv.jushauth.exception.AuthException;
|
|
||||||
import com.xingyuv.jushauth.model.AuthCallback;
|
|
||||||
import com.xingyuv.jushauth.model.AuthToken;
|
|
||||||
import com.xingyuv.jushauth.model.AuthUser;
|
|
||||||
import com.xingyuv.jushauth.request.AuthDefaultRequest;
|
|
||||||
import com.xingyuv.jushauth.utils.HttpUtils;
|
|
||||||
import com.xingyuv.jushauth.utils.UrlBuilder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import me.zhyd.oauth.cache.AuthStateCache;
|
||||||
|
import me.zhyd.oauth.config.AuthConfig;
|
||||||
|
import me.zhyd.oauth.exception.AuthException;
|
||||||
|
import me.zhyd.oauth.model.AuthCallback;
|
||||||
|
import me.zhyd.oauth.model.AuthToken;
|
||||||
|
import me.zhyd.oauth.model.AuthUser;
|
||||||
|
import me.zhyd.oauth.request.AuthDefaultRequest;
|
||||||
|
import me.zhyd.oauth.utils.HttpUtils;
|
||||||
|
import me.zhyd.oauth.utils.UrlBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信小程序登陆 Request 请求
|
* 微信小程序登陆 Request 请求
|
||||||
@ -32,7 +32,7 @@ public class AuthWeChatMiniAppRequest extends AuthDefaultRequest {
|
|||||||
protected AuthToken getAccessToken(AuthCallback authCallback) {
|
protected AuthToken getAccessToken(AuthCallback authCallback) {
|
||||||
// 参见 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/login/auth.code2Session.html 文档
|
// 参见 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/login/auth.code2Session.html 文档
|
||||||
// 使用 code 获取对应的 openId、unionId 等字段
|
// 使用 code 获取对应的 openId、unionId 等字段
|
||||||
String response = new HttpUtils(config.getHttpConfig()).get(accessTokenUrl(authCallback.getCode())).getBody();
|
String response = new HttpUtils(config.getHttpConfig()).get(accessTokenUrl(authCallback.getCode()));
|
||||||
JSCode2SessionResponse accessTokenObject = JsonUtils.parseObject(response, JSCode2SessionResponse.class);
|
JSCode2SessionResponse accessTokenObject = JsonUtils.parseObject(response, JSCode2SessionResponse.class);
|
||||||
assert accessTokenObject != null;
|
assert accessTokenObject != null;
|
||||||
checkResponse(accessTokenObject);
|
checkResponse(accessTokenObject);
|
||||||
@ -73,7 +73,7 @@ public class AuthWeChatMiniAppRequest extends AuthDefaultRequest {
|
|||||||
return UrlBuilder.fromBaseUrl(source.accessToken())
|
return UrlBuilder.fromBaseUrl(source.accessToken())
|
||||||
.queryParam("appid", config.getClientId())
|
.queryParam("appid", config.getClientId())
|
||||||
.queryParam("secret", config.getClientSecret())
|
.queryParam("secret", config.getClientSecret())
|
||||||
.queryParam("js_code", code)
|
.queryParam("js_code", code) // 和父类不同,所以需要重写该方法
|
||||||
.queryParam("grant_type", "authorization_code")
|
.queryParam("grant_type", "authorization_code")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
@ -34,13 +34,14 @@
|
|||||||
<!-- 三方云服务相关 -->
|
<!-- 三方云服务相关 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.binarywang</groupId>
|
<groupId>com.github.binarywang</groupId>
|
||||||
|
<!-- <artifactId>weixin-java-mp</artifactId>-->
|
||||||
<artifactId>wx-java-mp-spring-boot-starter</artifactId>
|
<artifactId>wx-java-mp-spring-boot-starter</artifactId>
|
||||||
<version>4.5.0</version>
|
<version>4.4.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.binarywang</groupId>
|
<groupId>com.github.binarywang</groupId>
|
||||||
<artifactId>wx-java-miniapp-spring-boot-starter</artifactId>
|
<artifactId>wx-java-miniapp-spring-boot-starter</artifactId>
|
||||||
<version>4.5.0</version>
|
<version>4.4.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- TODO 芋艿:清理 -->
|
<!-- TODO 芋艿:清理 -->
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -127,7 +127,7 @@ public class MemberAuthServiceImpl implements MemberAuthService {
|
|||||||
// 获得对应的手机号信息
|
// 获得对应的手机号信息
|
||||||
WxMaPhoneNumberInfo phoneNumberInfo;
|
WxMaPhoneNumberInfo phoneNumberInfo;
|
||||||
try {
|
try {
|
||||||
phoneNumberInfo = wxMaService.getUserService().getPhoneNoInfo(reqVO.getPhoneCode());
|
phoneNumberInfo = wxMaService.getUserService().getNewPhoneNoInfo(reqVO.getPhoneCode());
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
throw exception(AUTH_WEIXIN_MINI_APP_PHONE_CODE_ERROR);
|
throw exception(AUTH_WEIXIN_MINI_APP_PHONE_CODE_ERROR);
|
||||||
}
|
}
|
||||||
|
@ -10,12 +10,12 @@ import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserDO;
|
|||||||
import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserBindMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserBindMapper;
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserMapper;
|
||||||
import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum;
|
import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum;
|
||||||
import com.xingyuv.jushauth.model.AuthCallback;
|
|
||||||
import com.xingyuv.jushauth.model.AuthResponse;
|
|
||||||
import com.xingyuv.jushauth.model.AuthUser;
|
|
||||||
import com.xingyuv.jushauth.request.AuthRequest;
|
|
||||||
import com.xingyuv.jushauth.utils.AuthStateUtils;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import me.zhyd.oauth.model.AuthCallback;
|
||||||
|
import me.zhyd.oauth.model.AuthResponse;
|
||||||
|
import me.zhyd.oauth.model.AuthUser;
|
||||||
|
import me.zhyd.oauth.request.AuthRequest;
|
||||||
|
import me.zhyd.oauth.utils.AuthStateUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
@ -9,12 +9,12 @@ import cn.iocoder.yudao.module.system.dal.dataobject.social.SocialUserDO;
|
|||||||
import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserBindMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserBindMapper;
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.social.SocialUserMapper;
|
||||||
import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum;
|
import cn.iocoder.yudao.module.system.enums.social.SocialTypeEnum;
|
||||||
import com.xingyuv.jushauth.enums.AuthResponseStatus;
|
import me.zhyd.oauth.enums.AuthResponseStatus;
|
||||||
import com.xingyuv.jushauth.model.AuthCallback;
|
import me.zhyd.oauth.model.AuthCallback;
|
||||||
import com.xingyuv.jushauth.model.AuthResponse;
|
import me.zhyd.oauth.model.AuthResponse;
|
||||||
import com.xingyuv.jushauth.model.AuthUser;
|
import me.zhyd.oauth.model.AuthUser;
|
||||||
import com.xingyuv.jushauth.request.AuthRequest;
|
import me.zhyd.oauth.request.AuthRequest;
|
||||||
import com.xingyuv.jushauth.utils.AuthStateUtils;
|
import me.zhyd.oauth.utils.AuthStateUtils;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.mockito.MockedStatic;
|
import org.mockito.MockedStatic;
|
||||||
import org.springframework.boot.test.mock.mockito.MockBean;
|
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<version>2.7.13</version> <!-- 如果 spring.boot.version 版本修改,则这里也要跟着修改 -->
|
<version>2.7.12</version> <!-- 如果 spring.boot.version 版本修改,则这里也要跟着修改 -->
|
||||||
<configuration>
|
<configuration>
|
||||||
<fork>true</fork>
|
<fork>true</fork>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
Loading…
Reference in New Issue
Block a user