增加环境配置例子 spring.profiles.active: prod
This commit is contained in:
35
web/src/main/resources/config/application-prod.yml
Normal file
35
web/src/main/resources/config/application-prod.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
# 使用环境配置,只需 JVM 参数里加:-Dspring.profiles.active=prod
|
||||
|
||||
#======================================#
|
||||
#========== Server settings ===========#
|
||||
#======================================#
|
||||
|
||||
server:
|
||||
|
||||
port: 8980
|
||||
servlet:
|
||||
context-path: /js
|
||||
|
||||
#======================================#
|
||||
#========== Database sttings ==========#
|
||||
#======================================#
|
||||
|
||||
# 数据库连接
|
||||
jdbc:
|
||||
|
||||
# Mysql 数据库配置
|
||||
type: mysql
|
||||
driver: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/jeesite_v5?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: 123456
|
||||
testSql: SELECT 1
|
||||
|
||||
#======================================#
|
||||
#========== Spring settings ===========#
|
||||
#======================================#
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
config: classpath:config/logback-spring-prod.xml
|
||||
Reference in New Issue
Block a user