mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-04 08:01:39 +08:00
修改配置文件加载方式
This commit is contained in:
2
bookshelfplus/.gitignore
vendored
2
bookshelfplus/.gitignore
vendored
@@ -1 +1 @@
|
||||
src/main/resources/thirdparty.properties
|
||||
src/main/resources/application.properties
|
@@ -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 {
|
||||
|
||||
|
@@ -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=
|
@@ -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=
|
Reference in New Issue
Block a user