Skip to content

Commit

Permalink
update configure file
Browse files Browse the repository at this point in the history
  • Loading branch information
GCS-ZHN committed May 16, 2021
1 parent 94c4fc5 commit 3aa8817
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 60 deletions.
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@
<exclude>config/application-prod.yml</exclude>
<exclude>config/application-test.yml</exclude>
<exclude>config/application.yml.public</exclude>
<exclude>config/application-dev.yml.public</exclude>
<exclude>config/application-prod.yml.public</exclude>
<exclude>config/application-test.yml.public</exclude>
<exclude>config/settings.json.public</exclude>
<exclude>config/README.md</exclude>
</excludes>
Expand Down
58 changes: 58 additions & 0 deletions src/main/resources/config/application-dev.yml.public
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
server:
port: 8080
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
username: <你的数据库系统账号>
password: <你的数据库系统密码>
url: jdbc:mysql://<你的IP>:<你的数据库服务端口>/<你的数据库名>?characterEncoding=utf-8&serverTimezone=Asia/Shanghai
# 修改默认的javax.sql.DataSource为阿里天池提供的
type: com.alibaba.druid.pool.DruidDataSource
# 用户信息数据表名
table: <你的用户表>
# druid 数据源专有配置
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
filters: stat,wall,log4j
maxPoolPreparedStatementPerConnectionSize: 20
useGlobalDataSourceStat: true
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500

nginx:
host: <你的Nginx服务IP>
confdir: /etc/nginx/conf.d/tools
temp: nginx.vm

redis:
host: <你的REDIS服务IP>
port: <你的REDIS服务端口>
password: <你的REDIS服务密码>

mail:
transport:
protocol: smtp
store:
protocol: imap
smtp:
class: com.sun.mail.smtp.SMTPSSLTransport
host: <你的SMTP服务器>
port: <你的SMTP服务端口>
ssl:
enable: true
auth: true
imap:
class: com.sun.mail.imap.IMAPSSLStore
port: <你的IMAP服务端口>
auth:
username: <你的发件地址>
nickname: <你的发件昵称>
password: <你的发件密码>
58 changes: 58 additions & 0 deletions src/main/resources/config/application-prod.yml.public
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
server:
port: 8080
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
username: <你的数据库系统账号>
password: <你的数据库系统密码>
url: jdbc:mysql://<你的IP>:<你的数据库服务端口>/<你的数据库名>?characterEncoding=utf-8&serverTimezone=Asia/Shanghai
# 修改默认的javax.sql.DataSource为阿里天池提供的
type: com.alibaba.druid.pool.DruidDataSource
# 用户信息数据表名
table: <你的用户表>
# druid 数据源专有配置
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
filters: stat,wall,log4j
maxPoolPreparedStatementPerConnectionSize: 20
useGlobalDataSourceStat: true
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500

nginx:
host: <你的Nginx服务IP>
confdir: /etc/nginx/conf.d/tools
temp: nginx.vm

redis:
host: <你的REDIS服务IP>
port: <你的REDIS服务端口>
password: <你的REDIS服务密码>

mail:
transport:
protocol: smtp
store:
protocol: imap
smtp:
class: com.sun.mail.smtp.SMTPSSLTransport
host: <你的SMTP服务器>
port: <你的SMTP服务端口>
ssl:
enable: true
auth: true
imap:
class: com.sun.mail.imap.IMAPSSLStore
port: <你的IMAP服务端口>
auth:
username: <你的发件地址>
nickname: <你的发件昵称>
password: <你的发件密码>
58 changes: 58 additions & 0 deletions src/main/resources/config/application-test.yml.public
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
server:
port: 8080
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
username: <你的数据库系统账号>
password: <你的数据库系统密码>
url: jdbc:mysql://<你的IP>:<你的数据库服务端口>/<你的数据库名>?characterEncoding=utf-8&serverTimezone=Asia/Shanghai
# 修改默认的javax.sql.DataSource为阿里天池提供的
type: com.alibaba.druid.pool.DruidDataSource
# 用户信息数据表名
table: <你的用户表>
# druid 数据源专有配置
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
filters: stat,wall,log4j
maxPoolPreparedStatementPerConnectionSize: 20
useGlobalDataSourceStat: true
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500

nginx:
host: <你的Nginx服务IP>
confdir: /etc/nginx/conf.d/tools
temp: nginx.vm

redis:
host: <你的REDIS服务IP>
port: <你的REDIS服务端口>
password: <你的REDIS服务密码>

mail:
transport:
protocol: smtp
store:
protocol: imap
smtp:
class: com.sun.mail.smtp.SMTPSSLTransport
host: <你的SMTP服务器>
port: <你的SMTP服务端口>
ssl:
enable: true
auth: true
imap:
class: com.sun.mail.imap.IMAPSSLStore
port: <你的IMAP服务端口>
auth:
username: <你的发件地址>
nickname: <你的发件昵称>
password: <你的发件密码>
63 changes: 3 additions & 60 deletions src/main/resources/config/application.yml.public
Original file line number Diff line number Diff line change
@@ -1,61 +1,4 @@
server:
port: 8080
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: <PASSWORD>
url: jdbc:mysql://<HOST>:<PORT>/idrb_platform?characterEncoding=utf-8&serverTimezone=Asia/Shanghai
# 修改默认的javax.sql.DataSource为阿里天池提供的
type: com.alibaba.druid.pool.DruidDataSource
# 用户信息数据表名
table: account
# druid 数据源专有配置
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
filters: stat,wall,log4j
maxPoolPreparedStatementPerConnectionSize: 20
useGlobalDataSourceStat: true
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500

nginx:
host: <HOST>
confdir: /etc/nginx/conf.d/tools
temp: /config/nginx.temp

redis:
host: <HOST>
port: <PORT>
password: <PASSWORD>

jsonconfig: /config/settings.json

mail:
transport:
protocol: smtp
store:
protocol: imap
smtp:
class: com.sun.mail.smtp.SMTPSSLTransport
host: smtp.zju.edu.cn
port: 994
ssl:
enable: true
auth: true
imap:
class: com.sun.mail.imap.IMAPSSLStore
port: 993
auth:
username: <SEND ADDRESS>
nickname: <NICK ADDRESS>
password: <SEND PASSWORD>

profiles:
active: @profileActive@
jsonconfig: /config/settings.json

0 comments on commit 3aa8817

Please sign in to comment.