1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-04 08:01:39 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

修改配置文件加载方式

This commit is contained in:
2022-04-04 10:55:15 +08:00
parent 3497772ea7
commit 3af1b80d2a
4 changed files with 45 additions and 20 deletions

View File

@@ -1 +1 @@
src/main/resources/thirdparty.properties
src/main/resources/application.properties

View File

@@ -2,13 +2,9 @@ package plus.bookshelf.Common.ThirdParty;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
@Component
@ConfigurationProperties(prefix = "thirdparty")
@PropertySource("thirdparty.properties")
@Data
public class ThirdPartyConfig {

View File

@@ -0,0 +1,44 @@
# 服务监听端口
server.port=8090
# api基础路径
server.servlet.context-path=/api
# mybatis
mybatis.mapperLocations=classpath:mapping/*.xml
# 数据库配置
spring.datasource.name=bookshelfplus
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/bookshelfplus?useSSL=false&serverTimezone=Asia/Shanghai
spring.datasource.username=root
spring.datasource.password=
# 使用druid数据源
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driverClassName=com.mysql.jdbc.Driver
## 配置SpringBoot对Redis的依赖
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.database=10
##spring.redis.password=
#
## 设置jedis连接池
#spring.redis.jedis.pool.max-active=50
#spring.redis.jedis.pool.max-idle=20
# 第三方登录 Client ID 和 Client Secret
# Gitee
thirdparty.gitee.clientid=
thirdparty.gitee.clientsecret=
thirdparty.gitee.redirecturi=
# GitHub
thirdparty.github.clientid=
thirdparty.github.clientsecret=
thirdparty.github.redirecturi=
# QQ
thirdparty.qq.clientid=
thirdparty.qq.clientsecret=
thirdparty.qq.redirecturi=

View File

@@ -1,15 +0,0 @@
# 第三方登录 Client ID 和 Client Secret
# Gitee
thirdparty.gitee.clientid=
thirdparty.gitee.clientsecret=
thirdparty.gitee.redirecturi=
# GitHub
thirdparty.github.clientid=
thirdparty.github.clientsecret=
thirdparty.github.redirecturi=
# QQ
thirdparty.qq.clientid=
thirdparty.qq.clientsecret=
thirdparty.qq.redirecturi=