使用多环境配置文件

master
toesbieya 6 years ago
parent 4451ce478c
commit 1ec13ce029
  1. 4
      java/local/.gitignore
  2. 17
      java/local/src/main/resources/application-local.yml
  3. 15
      java/local/src/main/resources/application.yml

@ -3,4 +3,6 @@
*.iml
.mvn
mvnw
*.cmd
*.cmd
*.jks
application-prod.yml

@ -0,0 +1,17 @@
spring:
datasource:
url: jdbc:mysql://localhost:3306/my?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true
username: root
password: root
redis:
host: localhost
port: 6379
socket:
hostname: localhost
port: 12580
qiniu:
access-key:
secret-key:
bucket:

@ -5,15 +5,11 @@ server:
basedir: C:\static
spring:
profiles:
active: local
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/repo?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true
username:
password:
redis:
host: localhost
port: 6379
password:
timeout: 3000
lettuce:
pool:
@ -49,17 +45,10 @@ pagehelper:
params: count=countSql
socket:
#hostname: 172.24.52.184
port: 12580
max-frame-payload-length: 1048576
max-http-content-length: 1048576
#key-store: classpath:toesbieya.cn.jks
#key-store-password: PS17wnkE
qiniu:
access-key:
secret-key:
bucket:
#七牛的临时上传凭证的有效期,单位秒
token-expire: 3600
#七牛的临时上传凭证的redis键名

Loading…
Cancel
Save