From 698b529726b2863e42b6573f41bf8d87aee3a46a Mon Sep 17 00:00:00 2001 From: hui Date: Wed, 20 Nov 2024 08:58:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=94=B9=E4=B8=BAyml?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- servers/boe-server-basic/pom.xml | 6 +- .../main/resources/application-dev.properties | 53 --------------- .../src/main/resources/application-dev.yml | 56 ++++++++++++++++ .../main/resources/application-pre.properties | 54 --------------- .../src/main/resources/application-pre.yml | 60 +++++++++++++++++ .../main/resources/application-pro.properties | 55 ---------------- .../src/main/resources/application-pro.yml | 63 ++++++++++++++++++ .../resources/application-test.properties | 34 ---------- .../src/main/resources/application-test.yml | 43 ++++++++++++ .../src/main/resources/application.properties | 62 ------------------ .../src/main/resources/application.yml | 65 +++++++++++++++++++ 11 files changed, 290 insertions(+), 261 deletions(-) delete mode 100644 servers/boe-server-basic/src/main/resources/application-dev.properties create mode 100644 servers/boe-server-basic/src/main/resources/application-dev.yml delete mode 100644 servers/boe-server-basic/src/main/resources/application-pre.properties create mode 100644 servers/boe-server-basic/src/main/resources/application-pre.yml delete mode 100644 servers/boe-server-basic/src/main/resources/application-pro.properties create mode 100644 servers/boe-server-basic/src/main/resources/application-pro.yml delete mode 100644 servers/boe-server-basic/src/main/resources/application-test.properties create mode 100644 servers/boe-server-basic/src/main/resources/application-test.yml delete mode 100644 servers/boe-server-basic/src/main/resources/application.properties create mode 100644 servers/boe-server-basic/src/main/resources/application.yml diff --git a/servers/boe-server-basic/pom.xml b/servers/boe-server-basic/pom.xml index cce55208..e7ee1f9b 100644 --- a/servers/boe-server-basic/pom.xml +++ b/servers/boe-server-basic/pom.xml @@ -107,15 +107,15 @@ true src/main/resources - application-${profileActive}.properties - application.properties + application-${profileActive}.yml + application.yml false src/main/resources - *.properties + *.yml diff --git a/servers/boe-server-basic/src/main/resources/application-dev.properties b/servers/boe-server-basic/src/main/resources/application-dev.properties deleted file mode 100644 index 52ee6eb6..00000000 --- a/servers/boe-server-basic/src/main/resources/application-dev.properties +++ /dev/null @@ -1,53 +0,0 @@ -# redis -spring.redis.database=2 -spring.redis.port=6379 -spring.redis.host=192.168.0.101 -spring.redis.password=boe@123 - - -# datasource config -# basic数据库 -#spring.jpa.hibernate.ddl-auto=update -spring.jpa.hibernate.ddl-auto=none -spring.jpa.open-in-view=false -spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true - -spring.datasource.driverClassName=com.mysql.jdbc.Driver -# spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver -# 当前数据库 basic 对应的数据库 -spring.datasource.db1.driverClassName=com.mysql.jdbc.Driver -spring.datasource.db1.jdbc-url=jdbc:mysql://192.168.0.101:3306/boe_basic?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull -spring.datasource.db1.username=root -spring.datasource.db1.password=boe#1234A - - - -# 主数据库 all 对应的数据库 -spring.datasource.db2.driverClassName=com.mysql.jdbc.Driver -# spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver -spring.datasource.db2.jdbc-url=jdbc:mysql://192.168.0.101:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull -spring.datasource.db2.username=root -spring.datasource.db2.password=boe#1234A - - -logging.level.org.hibernate.SQL=DEBUG -logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE - -# 设置logback.xml位置 -logging.config=classpath:log/logback-dev.xml - -## 静态文件目录,默认是在static下面,以后独立到nginx下面配置 -spring.web.resources.static-locations=file:E:/Projects/BOE/java/static - -## 上传相磁的路径配置 -xboe.upload.file.temp_path=E:/Projects/BOE/java/static/temp -xboe.upload.file.save_path=E:/Projects/BOE/java/static/upload -xboe.upload.file.http_path=http://localhost:9090/cdn/upload - -## 新系统的内部地址,可以不通过nginx调用 -xboe.inner.data.sync.baseurl=http://localhost:9090 - -#加密盐 -#jasypt.encryptor.password=jasypt -jasypt.encryptor.algorithm=PBEWithMD5AndDES -jasypt.encryptor.iv-generator-classname=org.jasypt.iv.NoIvGenerator \ No newline at end of file diff --git a/servers/boe-server-basic/src/main/resources/application-dev.yml b/servers/boe-server-basic/src/main/resources/application-dev.yml new file mode 100644 index 00000000..04d4eaaf --- /dev/null +++ b/servers/boe-server-basic/src/main/resources/application-dev.yml @@ -0,0 +1,56 @@ +# application-dev.yml +spring: + redis: + database: 2 + port: 6379 + host: 192.168.0.101 + password: boe@123 + jpa: + hibernate: + ddl-auto: none + open-in-view: false + properties: + hibernate: + enable_lazy_load_no_trans: true + datasource: + driverClassName: com.mysql.jdbc.Driver + db1: + driverClassName: com.mysql.jdbc.Driver + jdbc-url: jdbc:mysql://192.168.0.101:3306/boe_basic?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull + username: root + password: boe#1234A + db2: + driverClassName: com.mysql.jdbc.Driver + jdbc-url: jdbc:mysql://192.168.0.101:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull + username: root + password: boe#1234A + web: + resources: + static-locations: file:E:/Projects/BOE/java/static + +logging: + level: + org: + hibernate: + SQL: DEBUG + type: + descriptor: + sql: + BasicBinder: TRACE + config: classpath:log/logback-dev.xml + +xboe: + upload: + file: + temp_path: E:/Projects/BOE/java/static/temp + save_path: E:/Projects/BOE/java/static/upload + http_path: http://localhost:9090/cdn/upload + inner: + data: + sync: + baseurl: http://localhost:9090 + +jasypt: + encryptor: + algorithm: PBEWithMD5AndDES + iv-generator-classname: org.jasypt.iv.NoIvGenerator diff --git a/servers/boe-server-basic/src/main/resources/application-pre.properties b/servers/boe-server-basic/src/main/resources/application-pre.properties deleted file mode 100644 index 8b395662..00000000 --- a/servers/boe-server-basic/src/main/resources/application-pre.properties +++ /dev/null @@ -1,54 +0,0 @@ -## redis -spring.redis.database=3 -spring.redis.host=10.251.129.122 -spring.redis.password=qwert!W588 -spring.redis.port=6379 - -# datasource config -# basic数据库 -spring.jpa.hibernate.ddl-auto=update -spring.jpa.open-in-view=false -spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true - -spring.datasource.driverClassName=com.mysql.jdbc.Driver -# spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver -# 当前数据库 basic 对应的数据库 -spring.datasource.db1.driverClassName=com.mysql.jdbc.Driver -spring.datasource.db1.jdbc-url=jdbc:mysql://10.251.129.126:3306/boe_basic?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull -spring.datasource.db1.username=admin -spring.datasource.db1.password=boeRds01 - - - -# 主数据库 all 对应的数据库 -spring.datasource.db2.driverClassName=com.mysql.jdbc.Driver -# spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver -spring.datasource.db2.jdbc-url=jdbc:mysql://10.251.129.126:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull -spring.datasource.db2.username=admin -spring.datasource.db2.password=boeRds01 - - -logging.level.org.hibernate.SQL=ERROR -# logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE - -## 静态文件目录,默认是在static下面,以后独立到nginx下面配置 -spring.web.resources.static-locations=file:E:/Projects/BOE/java/static - -# 设置logback.xml位置 -logging.config=classpath:log/logback-pro.xml - -## xboe config -xboe.api.cross_filter=true - -## 上传相磁的路径配置 -xboe.upload.file.temp_path=/tmp -xboe.upload.file.save_path=/home/www/elearning/upload -xboe.upload.file.http_path=https://u.boe.com/upload - -## 新系统的内部地址,可以不通过nginx调用 -xboe.inner.data.sync.baseurl=http://127.0.0.1:9090 - -#加密盐 -#jasypt.encryptor.password=jasypt -jasypt.encryptor.algorithm=PBEWithMD5AndDES -jasypt.encryptor.iv-generator-classname=org.jasypt.iv.NoIvGenerator \ No newline at end of file diff --git a/servers/boe-server-basic/src/main/resources/application-pre.yml b/servers/boe-server-basic/src/main/resources/application-pre.yml new file mode 100644 index 00000000..5c3316e8 --- /dev/null +++ b/servers/boe-server-basic/src/main/resources/application-pre.yml @@ -0,0 +1,60 @@ +# application-pre.yml +spring: + redis: + database: 3 + host: 10.251.129.122 + password: qwert!W588 + port: 6379 + jpa: + hibernate: + ddl-auto: update + open-in-view: false + properties: + hibernate: + enable_lazy_load_no_trans: true + datasource: + driverClassName: com.mysql.jdbc.Driver + db1: + driverClassName: com.mysql.jdbc.Driver + jdbc-url: jdbc:mysql://10.251.129.126:3306/boe_basic?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull + username: admin + password: boeRds01 + db2: + driverClassName: com.mysql.jdbc.Driver + jdbc-url: jdbc:mysql://10.251.129.126:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull + username: admin + password: boeRds01 + + web: + resources: + static-locations: file:E:/Projects/BOE/java/static + +logging: + level: + org: + hibernate: + SQL: ERROR + # type: + # descriptor: + # sql: + # BasicBinder: TRACE + config: classpath:log/logback-pro.xml + + +xboe: + api: + cross_filter: true + upload: + file: + temp_path: /tmp + save_path: /home/www/elearning/upload + http_path: https://u.boe.com/upload + inner: + data: + sync: + baseurl: http://127.0.0.1:9090 + +jasypt: + encryptor: + algorithm: PBEWithMD5AndDES + iv-generator-classname: org.jasypt.iv.NoIvGenerator diff --git a/servers/boe-server-basic/src/main/resources/application-pro.properties b/servers/boe-server-basic/src/main/resources/application-pro.properties deleted file mode 100644 index cd1a52f9..00000000 --- a/servers/boe-server-basic/src/main/resources/application-pro.properties +++ /dev/null @@ -1,55 +0,0 @@ -## redis -spring.redis.database=3 -spring.redis.host=10.251.88.213 -spring.redis.password=qwert!W588 -spring.redis.port=6379 - -# datasource config -# basic数据库 -spring.jpa.hibernate.ddl-auto=update -spring.jpa.open-in-view=false -spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true - -spring.datasource.driverClassName=com.mysql.jdbc.Driver -# spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver -# 当前数据库 basic 对应的数据库 -spring.datasource.db1.driverClassName=com.mysql.jdbc.Driver -spring.datasource.db1.jdbc-url=jdbc:mysql://10.251.88.216:3306/boe_basic?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull -spring.datasource.db1.username=admin -spring.datasource.db1.password=boeRds01 - - - -# 主数据库 all 对应的数据库 -spring.datasource.db2.driverClassName=com.mysql.jdbc.Driver -# spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver -spring.datasource.db2.jdbc-url=jdbc:mysql://10.251.88.216:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull -spring.datasource.db2.username=admin -spring.datasource.db2.password=boeRds01 - - -logging.level.org.hibernate.SQL=ERROR -# logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE - -## 静态文件目录,默认是在static下面,以后独立到nginx下面配置 -spring.web.resources.static-locations=file:E:/Projects/BOE/java/static - -# 设置logback.xml位置 -logging.config=classpath:log/logback-dev.xml - -## xboe config -xboe.api.cross_filter=true - -## 上传相磁的路径配置 -xboe.upload.file.temp_path=/tmp -xboe.upload.file.save_path=/home/www/elearning/upload -xboe.upload.file.http_path=https://u.boe.com/upload - -## 新系统的内部地址,可以不通过nginx调用 -xboe.inner.data.sync.baseurl=http://127.0.0.1:9090 - - -#加密盐 -#jasypt.encryptor.password=jasypt -jasypt.encryptor.algorithm=PBEWithMD5AndDES -jasypt.encryptor.iv-generator-classname=org.jasypt.iv.NoIvGenerator \ No newline at end of file diff --git a/servers/boe-server-basic/src/main/resources/application-pro.yml b/servers/boe-server-basic/src/main/resources/application-pro.yml new file mode 100644 index 00000000..58c210dc --- /dev/null +++ b/servers/boe-server-basic/src/main/resources/application-pro.yml @@ -0,0 +1,63 @@ +# application-pro.yml +spring: + profiles: + active: pro + redis: + database: 3 + host: 10.251.88.213 + password: qwert!W588 + port: 6379 + jpa: + hibernate: + ddl-auto: update + open-in-view: false + properties: + hibernate: + enable_lazy_load_no_trans: true + datasource: + driverClassName: com.mysql.jdbc.Driver + db1: + driverClassName: com.mysql.jdbc.Driver + jdbc-url: jdbc:mysql://10.251.88.216:3306/boe_basic?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull + username: admin + password: boeRds01 + db2: + driverClassName: com.mysql.jdbc.Driver + jdbc-url: jdbc:mysql://10.251.88.216:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull + username: admin + password: boeRds01 + + web: + resources: + static-locations: file:E:/Projects/BOE/java/static + +logging: + level: + org: + hibernate: + SQL: ERROR + # type: + # descriptor: + # sql: + # BasicBinder: TRACE + config: classpath:log/logback-dev.xml + + + +xboe: + api: + cross_filter: true + upload: + file: + temp_path: /tmp + save_path: /home/www/elearning/upload + http_path: https://u.boe.com/upload + inner: + data: + sync: + baseurl: http://127.0.0.1:9090 + +jasypt: + encryptor: + algorithm: PBEWithMD5AndDES + iv-generator-classname: org.jasypt.iv.NoIvGenerator \ No newline at end of file diff --git a/servers/boe-server-basic/src/main/resources/application-test.properties b/servers/boe-server-basic/src/main/resources/application-test.properties deleted file mode 100644 index 75f39d6f..00000000 --- a/servers/boe-server-basic/src/main/resources/application-test.properties +++ /dev/null @@ -1,34 +0,0 @@ -## redis -spring.redis.database=2 -spring.redis.host=127.0.0.1 -spring.redis.password=ENC(zA5LNV8xw3yEx6LMwdGGBGgNsOaD3Cg+) -spring.redis.port=6379 - -## datasource config -spring.datasource.driverClassName=com.mysql.jdbc.Driver -# spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver -spring.datasource.url=jdbc:mysql://127.0.0.1:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull -spring.datasource.username=boe_base -spring.datasource.password=ENC(MaC28GJw2JcbH8Lil0CrqSDTYxX49FJ0rxcmHH2pX0k=) - -logging.level.org.hibernate.SQL=DEBUG -logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE - -# 设置logback.xml位置 -logging.config=classpath:log/logback-test.xml - -## xboe config -xboe.api.cross_filter=true - -## 上传相磁的路径配置 -xboe.upload.file.temp_path=/www/wwwroot/file/temp -xboe.upload.file.save_path=/www/wwwroot/file/upload -xboe.upload.file.http_path=http://114.115.162.187/file/upload - -## 新系统的内部地址,可以不通过nginx调用 -xboe.inner.data.sync.baseurl=http://localhost:9090 - -#加密盐 -#jasypt.encryptor.password=jasypt -jasypt.encryptor.algorithm=PBEWithMD5AndDES -jasypt.encryptor.iv-generator-classname=org.jasypt.iv.NoIvGenerator \ No newline at end of file diff --git a/servers/boe-server-basic/src/main/resources/application-test.yml b/servers/boe-server-basic/src/main/resources/application-test.yml new file mode 100644 index 00000000..3b4c1c42 --- /dev/null +++ b/servers/boe-server-basic/src/main/resources/application-test.yml @@ -0,0 +1,43 @@ +# application-test.yml +spring: + profiles: + active: test + redis: + database: 2 + host: 127.0.0.1 + password: ENC(zA5LNV8xw3yEx6LMwdGGBGgNsOaD3Cg+) + port: 6379 + datasource: + driverClassName: com.mysql.jdbc.Driver + url: jdbc:mysql://127.0.0.1:3306/boe_base?useSSL=false&useUnicode=true&characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull + username: boe_base + password: ENC(MaC28GJw2JcbH8Lil0CrqSDTYxX49FJ0rxcmHH2pX0k=) + +logging: + level: + org: + hibernate: + SQL: DEBUG + type: + descriptor: + sql: + BasicBinder: TRACE + config: classpath:log/logback-test.xml + +xboe: + api: + cross_filter: true + upload: + file: + temp_path: /www/wwwroot/file/temp + save_path: /www/wwwroot/file/upload + http_path: http://114.115.162.187/file/upload + inner: + data: + sync: + baseurl: http://localhost:9090 + +jasypt: + encryptor: + algorithm: PBEWithMD5AndDES + iv-generator-classname: org.jasypt.iv.NoIvGenerator \ No newline at end of file diff --git a/servers/boe-server-basic/src/main/resources/application.properties b/servers/boe-server-basic/src/main/resources/application.properties deleted file mode 100644 index c9d1907c..00000000 --- a/servers/boe-server-basic/src/main/resources/application.properties +++ /dev/null @@ -1,62 +0,0 @@ -spring.profiles.active=@profileActive@ -spring.application.name=boe-server-basic -server.port=9095 -server.servlet.session.timeout=30m - - -server.servlet.encoding.charset=UTF-8 -server.servlet.encoding.enabled=true -server.servlet.encoding.force=true - -server.tomcat.uri-encoding=UTF-8 - - - -ok.http.connect-timeout=30 -ok.http.read-timeout=30 -ok.http.write-timeout=30 - -# 连接池中整体的空闲连接的最大数量 -ok.http.max-idle-connections=200 -# 连接空闲时间最多为 300 秒 -ok.http.keep-alive-duration=300 - -#spring.jackson.locale= -#spring.jackson.date-format=yyyy-MM-dd HH:mm:ss -# spring.jackson.default-property-inclusion=NON_NULL -spring.jackson.time-zone=GMT+8 - -spring.servlet.multipart.max-file-size=1024MB -spring.servlet.multipart.max-request-size=1024MB - -## 静态文件目录,默认是在static下面,以后独立到nginx下面配置 -spring.mvc.static-path-pattern=/cdn/** - -spring.redis.lettuce.pool.max-active=8 -spring.redis.lettuce.pool.min-idle=0 -spring.redis.lettuce.pool.max-idle=30 -spring.redis.lettuce.pool.max-wait=10000ms -spring.redis.lettuce.shutdown-timeout=100ms - -# 上传的临时目录,部署到服务器必须指定 -# spring.servlet.multipart.location= - -# jpa config -spring.jpa.database = MYSQL -spring.jpa.show-sql = true -# spring.jpa.properties.hibernate.cache.use_second_level_cache=true -# spring.jpa.properties.hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.EhCacheRegionFactory - -spring.jpa.properties.hibernate.naming_strategy=org.hibernate.cfg.EJB3NamingStrategy -spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect -spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect -#spring.transaction -# spring.jpa.properties.hibernate.allow_update_outside_transaction=true -# spring.jpa.properties.hibernate.current_session_context_class=org.springframework.orm.hibernate5.SpringSessionContext -spring.jpa.properties.hibernate.current_session_context_class=org.springframework.orm.hibernate5.SpringSessionContext - - -# 设置logback.xml位置 -logging.config=classpath:log/logback-@profileActive@.xml - - diff --git a/servers/boe-server-basic/src/main/resources/application.yml b/servers/boe-server-basic/src/main/resources/application.yml new file mode 100644 index 00000000..4d04d8ae --- /dev/null +++ b/servers/boe-server-basic/src/main/resources/application.yml @@ -0,0 +1,65 @@ +# application.yml +spring: + profiles: + active: @profileActive@ + application: + name: boe-server-basic + jackson: + time-zone: GMT+8 + # default-property-inclusion: NON_NULL + servlet: + multipart: + max-file-size: 1024MB + max-request-size: 1024MB + # location: + encoding: + charset: UTF-8 + enabled: true + force: true + redis: + lettuce: + pool: + max-active: 8 + min-idle: 0 + max-idle: 30 + max-wait: 10000ms + shutdown-timeout: 100ms + jpa: + database: MYSQL + show-sql: true + properties: + hibernate: + naming_strategy: org.hibernate.cfg.EJB3NamingStrategy + dialect: org.hibernate.dialect.MySQL5InnoDBDialect + current_session_context_class: org.springframework.orm.hibernate5.SpringSessionContext + # allow_update_outside_transaction: true + # cache: + # use_second_level_cache: true + # region: + # factory_class: org.hibernate.cache.ehcache.EhCacheRegionFactory + mvc: + static-path-pattern: /cdn/** + +server: + port: 9095 + servlet: + session: + timeout: 30m + encoding: + charset: UTF-8 + enabled: true + force: true + tomcat: + uri-encoding: UTF-8 + +ok: + http: + connect-timeout: 30 + read-timeout: 30 + write-timeout: 30 + max-idle-connections: 200 + keep-alive-duration: 300 + +# 设置logback.xml位置 +logging: + config: classpath:log/logback-@profileActive@.xml \ No newline at end of file