parent
f7a96d5aa0
commit
11c0c0d52b
@ -1,50 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<parent>
|
|
||||||
<groupId>cn.iocoder.cloud</groupId>
|
|
||||||
<artifactId>yudao-framework</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</parent>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>yudao-spring-boot-starter-biz-social</artifactId>
|
|
||||||
<name>${project.artifactId}</name>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.iocoder.cloud</groupId>
|
|
||||||
<artifactId>yudao-common</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<!-- Spring 核心 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-aop</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<!-- Web 相关 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.iocoder.cloud</groupId>
|
|
||||||
<artifactId>yudao-spring-boot-starter-web</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<!-- spring boot 配置所需依赖 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
<!-- 三方云服务相关 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.xingyuv</groupId>
|
|
||||||
<artifactId>spring-boot-starter-justauth</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.iocoder.cloud</groupId>
|
|
||||||
<artifactId>yudao-spring-boot-starter-redis</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
|
|
||||||
</project>
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
package cn.iocoder.yudao.framework.social.config;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory;
|
|
||||||
import com.xingyuv.http.HttpUtil;
|
|
||||||
import com.xingyuv.http.support.hutool.HutoolImpl;
|
|
||||||
import com.xingyuv.jushauth.cache.AuthStateCache;
|
|
||||||
import com.xingyuv.justauth.autoconfigure.JustAuthProperties;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Primary;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社交自动装配类
|
|
||||||
*
|
|
||||||
* @author timfruit
|
|
||||||
* @date 2021-10-30
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@AutoConfiguration
|
|
||||||
@EnableConfigurationProperties(JustAuthProperties.class)
|
|
||||||
public class YudaoSocialAutoConfiguration {
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
@Primary
|
|
||||||
@ConditionalOnProperty(prefix = "justauth", value = "enabled", havingValue = "true", matchIfMissing = true)
|
|
||||||
public YudaoAuthRequestFactory yudaoAuthRequestFactory(JustAuthProperties properties, AuthStateCache authStateCache) {
|
|
||||||
// 需要修改 HttpUtil 使用的实现,避免类报错
|
|
||||||
HttpUtil.setHttp(new HutoolImpl());
|
|
||||||
// 创建 YudaoAuthRequestFactory
|
|
||||||
return new YudaoAuthRequestFactory(properties, authStateCache);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
cn.iocoder.yudao.framework.social.config.YudaoSocialAutoConfiguration
|
|
||||||
Loading…
Reference in new issue