feat: 微信公众号扫码登录完成

This commit is contained in:
landaiqing
2024-06-27 23:46:31 +08:00
parent 67362ad6b9
commit 77bba1a754
87 changed files with 2764 additions and 534 deletions

View File

@@ -20,6 +20,10 @@
</properties>
<dependencies>
<dependency>
<groupId>com.schisandra.system</groupId>
<artifactId>schisandra-cloud-storage-system-domain</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

View File

@@ -69,5 +69,15 @@
<artifactId>schisandra-cloud-storage-system-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.27</version>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,78 @@
package com.schisandra.system.domain.config;
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* xxl-job config
*
* @author xuxueli 2017-04-28
*/
@Configuration
public class XxlJobConfig {
private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
@Value("${xxl.job.admin.addresses}")
private String adminAddresses;
@Value("${xxl.job.accessToken}")
private String accessToken;
@Value("${xxl.job.executor.appname}")
private String appname;
@Value("${xxl.job.executor.address}")
private String address;
@Value("${xxl.job.executor.ip}")
private String ip;
@Value("${xxl.job.executor.port}")
private int port;
@Value("${xxl.job.executor.logpath}")
private String logPath;
@Value("${xxl.job.executor.logretentiondays}")
private int logRetentionDays;
@Bean
public XxlJobSpringExecutor xxlJobExecutor() {
logger.info(">>>>>>>>>>> xxl-job config init.");
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
xxlJobSpringExecutor.setAppname(appname);
xxlJobSpringExecutor.setAddress(address);
xxlJobSpringExecutor.setIp(ip);
xxlJobSpringExecutor.setPort(port);
xxlJobSpringExecutor.setAccessToken(accessToken);
xxlJobSpringExecutor.setLogPath(logPath);
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
return xxlJobSpringExecutor;
}
/**
* 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP
*
* 1、引入依赖
* <dependency>
* <groupId>org.springframework.cloud</groupId>
* <artifactId>spring-cloud-commons</artifactId>
* <version>${version}</version>
* </dependency>
*
* 2、配置文件或者容器启动变量
* spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
*
* 3、获取IP
* String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
*/
}

View File

@@ -8,7 +8,7 @@ import org.springframework.context.annotation.Configuration;
/**
* @Classname MyBatisFlexConfiguration
* @BelongsProject: schisandra-cloud-storage
* @BelongsPackage: com.schisandra.oss.infra.config
* @BelongsPackage: com.schisandra.oss.infra.common
* @Author: landaiqing
* @CreateTime: 2024-05-31 16:14
* @Description: Mybatis flex 配置类

View File

@@ -58,6 +58,11 @@
<artifactId>schisandra-cloud-storage-system-infra</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.schisandra.system</groupId>
<artifactId>schisandra-cloud-storage-system-application-job</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<dependencyManagement>

View File

@@ -82,4 +82,17 @@ mybatis-flex:
mapper-locations:
- "classpath*:/mapper/**/*.xml"
# xxl-job配置
xxl:
job:
admin:
addresses: http://1.95.0.111:8088/xxl-job-admin
accessToken: default_token
executor:
appname: schisandra-cloud-storage-system
address:
ip: 1.95.0.111
port: 9999
logpath: /data/applogs/xxl-job/jobhandler
logretentiondays: 30