diff --git a/pom.xml b/pom.xml index 227db54..f22a3cc 100644 --- a/pom.xml +++ b/pom.xml @@ -149,6 +149,9 @@ config/application-prod.yml config/application-test.yml config/application.yml.public + config/application-dev.yml.public + config/application-prod.yml.public + config/application-test.yml.public config/settings.json.public config/README.md diff --git a/src/main/resources/config/application-dev.yml.public b/src/main/resources/config/application-dev.yml.public new file mode 100644 index 0000000..5c92a2c --- /dev/null +++ b/src/main/resources/config/application-dev.yml.public @@ -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: <你的发件密码> \ No newline at end of file diff --git a/src/main/resources/config/application-prod.yml.public b/src/main/resources/config/application-prod.yml.public new file mode 100644 index 0000000..5c92a2c --- /dev/null +++ b/src/main/resources/config/application-prod.yml.public @@ -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: <你的发件密码> \ No newline at end of file diff --git a/src/main/resources/config/application-test.yml.public b/src/main/resources/config/application-test.yml.public new file mode 100644 index 0000000..5c92a2c --- /dev/null +++ b/src/main/resources/config/application-test.yml.public @@ -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: <你的发件密码> \ No newline at end of file diff --git a/src/main/resources/config/application.yml.public b/src/main/resources/config/application.yml.public index f6e75e9..7acdcbe 100644 --- a/src/main/resources/config/application.yml.public +++ b/src/main/resources/config/application.yml.public @@ -1,61 +1,4 @@ -server: - port: 8080 spring: - datasource: - driver-class-name: com.mysql.cj.jdbc.Driver - username: root - password: - url: jdbc:mysql://:/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: - confdir: /etc/nginx/conf.d/tools - temp: /config/nginx.temp - -redis: - host: - port: - 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: - nickname: - password: - \ No newline at end of file + profiles: + active: @profileActive@ +jsonconfig: /config/settings.json \ No newline at end of file