.yml提交
Change-Id: Ia8a96bd55cfce31fed65f7e801f8cefcdba5c67e
diff --git a/.gitignore b/.gitignore
index 8a57676..e409640 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,7 +42,4 @@
/src/main/resources/application-db-vultr.yml
/public/
-application*.yml
-application.yml
-application-caching.yml
-application-test.yml
\ No newline at end of file
+
diff --git a/src/main/resources/application-caching.yml b/src/main/resources/application-caching.yml
new file mode 100644
index 0000000..972a688
--- /dev/null
+++ b/src/main/resources/application-caching.yml
@@ -0,0 +1,41 @@
+spring:
+ jpa:
+ properties:
+ redisson-config: classpath:conf/redisson.yaml
+ hibernate:
+ cache:
+ region:
+ factory_class: org.redisson.hibernate.RedissonRegionFactory
+ use_second_level_cache: true
+ use_query_cache: true
+ region_prefix: sapling
+ use_structured_entries: true
+ provider_configuration_file_resource_path: classpath:conf/hibernate-redis.properties
+ cache:
+ redis:
+ cache-null-values: true
+ key-prefix: sapling
+ time-to-live: 86400
+ enable-statistics: true
+ use-key-prefix: true
+jetcache:
+ statIntervalMinutes: 15
+ areaInCacheName: false
+ local:
+ default:
+ type: caffeine #other choose:caffeine
+ keyConvertor: jackson #other choose:fastjson/jackson
+ limit: 100
+ remote:
+ default:
+ type: redis
+ keyConvertor: jackson #other choose:fastjson/jackson
+ broadcastChannel: sapling
+ valueEncoder: java #other choose:kryo/kryo5
+ valueDecoder: java #other choose:kryo/kryo5
+ poolConfig:
+ minIdle: 5
+ maxIdle: 20
+ maxTotal: 50
+ host: ${redis.host}
+ port: ${redis.port}
\ No newline at end of file
diff --git a/src/main/resources/application-db.yml b/src/main/resources/application-db.yml
new file mode 100644
index 0000000..dc1a54b
--- /dev/null
+++ b/src/main/resources/application-db.yml
@@ -0,0 +1,13 @@
+spring:
+ datasource:
+ url: jdbc:mysql://127.0.0.1:3306/ppt?useSSL=false&serverTimezone=UTC
+ username: root
+ password: 204825
+ driver‑class‑name: com.mysql.cj.jdbc.Driver
+ jpa:
+ hibernate:
+ ddl-auto: update
+ database-platform: org.hibernate.dialect.MySQL8Dialect
+ show-sql: true
+ properties:
+ hibernate.format_sql: true
diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml
new file mode 100644
index 0000000..ece0b31
--- /dev/null
+++ b/src/main/resources/application-test.yml
@@ -0,0 +1,8 @@
+sa-token:
+ is-log: true
+logging:
+ level:
+ com.github.example.pt: debug
+#spring:
+# jpa:
+# show-sql: true
\ No newline at end of file
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
new file mode 100644
index 0000000..faca091
--- /dev/null
+++ b/src/main/resources/application.yml
@@ -0,0 +1,125 @@
+redis:
+ host: localhost
+ port: 6379
+ database: 3
+spring:
+ web:
+ resources:
+ static-locations: file:uploads/
+ profiles:
+ active: test,caching,db
+ jpa:
+ properties:
+ hibernate:
+ ddl-auto: update
+ generate-ddl: true
+ hbm2ddl:
+ auto: update
+ data:
+ redis:
+ database: ${redis.database}
+ timeout: 3000
+ port: ${redis.port}
+ host: ${redis.host}
+ jedis:
+ pool:
+ max-idle: 8
+ min-idle: 2
+ max-active: 8
+ max-wait: -1
+ quartz:
+ job-store-type: jdbc
+ wait-for-jobs-to-complete-on-shutdown: true
+ overwrite-existing-jobs: true
+ jdbc:
+ initialize-schema: always
+ properties:
+ org:
+ quartz:
+ scheduler:
+ instanceName: sapling_scheduler
+ instanceId: AUTO
+ jobStore:
+ class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
+ driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+ tablePrefix: QRTZ_
+ useProperties: false
+ clusterCheckinInterval: 10000
+ isClustered: true
+ threadPool:
+ class: org.quartz.simpl.SimpleThreadPool
+ threadCount: 10
+ threadPriority: 5
+ threadsInheritContextClassLoaderOfInitializingThread: true
+ servlet:
+ multipart:
+ enabled: true
+ max-request-size: 20MB
+ max-file-size: 20MB
+server:
+ port: 8081
+ servlet:
+ context-path: /api
+sa-token:
+ token-name: sapling-token
+ timeout: 2592000
+ activity-timeout: -1
+ is-concurrent: true
+ is-share: false
+ token-style: random-128
+#spring:
+# profiles:
+# active: test,db # 移除 caching 配置
+#
+# jpa:
+# properties:
+# hibernate:
+# ddl-auto: update
+# hbm2ddl.auto: update
+# cache:
+# use_second_level_cache: false
+# use_query_cache: false
+#
+# quartz:
+# job-store-type: jdbc
+# wait-for-jobs-to-complete-on-shutdown: true
+# overwrite-existing-jobs: true
+# jdbc:
+# initialize-schema: always
+# properties:
+# org:
+# quartz:
+# scheduler:
+# instanceName: sapling_scheduler
+# instanceId: AUTO
+# jobStore:
+# class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
+# driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+# tablePrefix: QRTZ_
+# useProperties: false
+# clusterCheckinInterval: 10000
+# isClustered: true
+# threadPool:
+# class: org.quartz.simpl.SimpleThreadPool
+# threadCount: 10
+# threadPriority: 5
+# threadsInheritContextClassLoaderOfInitializingThread: true
+#
+# servlet:
+# multipart:
+# enabled: true
+# max-request-size: 20MB
+# max-file-size: 20MB
+#
+#server:
+# port: 8081
+# servlet:
+# context-path: /api
+#
+#sa-token:
+# token-name: sapling-token
+# timeout: 2592000
+# activity-timeout: -1
+# is-concurrent: true
+# is-share: false
+# token-style: random-128
diff --git a/target/classes/application-caching.yml b/target/classes/application-caching.yml
new file mode 100644
index 0000000..972a688
--- /dev/null
+++ b/target/classes/application-caching.yml
@@ -0,0 +1,41 @@
+spring:
+ jpa:
+ properties:
+ redisson-config: classpath:conf/redisson.yaml
+ hibernate:
+ cache:
+ region:
+ factory_class: org.redisson.hibernate.RedissonRegionFactory
+ use_second_level_cache: true
+ use_query_cache: true
+ region_prefix: sapling
+ use_structured_entries: true
+ provider_configuration_file_resource_path: classpath:conf/hibernate-redis.properties
+ cache:
+ redis:
+ cache-null-values: true
+ key-prefix: sapling
+ time-to-live: 86400
+ enable-statistics: true
+ use-key-prefix: true
+jetcache:
+ statIntervalMinutes: 15
+ areaInCacheName: false
+ local:
+ default:
+ type: caffeine #other choose:caffeine
+ keyConvertor: jackson #other choose:fastjson/jackson
+ limit: 100
+ remote:
+ default:
+ type: redis
+ keyConvertor: jackson #other choose:fastjson/jackson
+ broadcastChannel: sapling
+ valueEncoder: java #other choose:kryo/kryo5
+ valueDecoder: java #other choose:kryo/kryo5
+ poolConfig:
+ minIdle: 5
+ maxIdle: 20
+ maxTotal: 50
+ host: ${redis.host}
+ port: ${redis.port}
\ No newline at end of file
diff --git a/target/classes/application-db.yml b/target/classes/application-db.yml
new file mode 100644
index 0000000..dc1a54b
--- /dev/null
+++ b/target/classes/application-db.yml
@@ -0,0 +1,13 @@
+spring:
+ datasource:
+ url: jdbc:mysql://127.0.0.1:3306/ppt?useSSL=false&serverTimezone=UTC
+ username: root
+ password: 204825
+ driver‑class‑name: com.mysql.cj.jdbc.Driver
+ jpa:
+ hibernate:
+ ddl-auto: update
+ database-platform: org.hibernate.dialect.MySQL8Dialect
+ show-sql: true
+ properties:
+ hibernate.format_sql: true
diff --git a/target/classes/application-test.yml b/target/classes/application-test.yml
new file mode 100644
index 0000000..ece0b31
--- /dev/null
+++ b/target/classes/application-test.yml
@@ -0,0 +1,8 @@
+sa-token:
+ is-log: true
+logging:
+ level:
+ com.github.example.pt: debug
+#spring:
+# jpa:
+# show-sql: true
\ No newline at end of file
diff --git a/target/classes/application.yml b/target/classes/application.yml
new file mode 100644
index 0000000..faca091
--- /dev/null
+++ b/target/classes/application.yml
@@ -0,0 +1,125 @@
+redis:
+ host: localhost
+ port: 6379
+ database: 3
+spring:
+ web:
+ resources:
+ static-locations: file:uploads/
+ profiles:
+ active: test,caching,db
+ jpa:
+ properties:
+ hibernate:
+ ddl-auto: update
+ generate-ddl: true
+ hbm2ddl:
+ auto: update
+ data:
+ redis:
+ database: ${redis.database}
+ timeout: 3000
+ port: ${redis.port}
+ host: ${redis.host}
+ jedis:
+ pool:
+ max-idle: 8
+ min-idle: 2
+ max-active: 8
+ max-wait: -1
+ quartz:
+ job-store-type: jdbc
+ wait-for-jobs-to-complete-on-shutdown: true
+ overwrite-existing-jobs: true
+ jdbc:
+ initialize-schema: always
+ properties:
+ org:
+ quartz:
+ scheduler:
+ instanceName: sapling_scheduler
+ instanceId: AUTO
+ jobStore:
+ class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
+ driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+ tablePrefix: QRTZ_
+ useProperties: false
+ clusterCheckinInterval: 10000
+ isClustered: true
+ threadPool:
+ class: org.quartz.simpl.SimpleThreadPool
+ threadCount: 10
+ threadPriority: 5
+ threadsInheritContextClassLoaderOfInitializingThread: true
+ servlet:
+ multipart:
+ enabled: true
+ max-request-size: 20MB
+ max-file-size: 20MB
+server:
+ port: 8081
+ servlet:
+ context-path: /api
+sa-token:
+ token-name: sapling-token
+ timeout: 2592000
+ activity-timeout: -1
+ is-concurrent: true
+ is-share: false
+ token-style: random-128
+#spring:
+# profiles:
+# active: test,db # 移除 caching 配置
+#
+# jpa:
+# properties:
+# hibernate:
+# ddl-auto: update
+# hbm2ddl.auto: update
+# cache:
+# use_second_level_cache: false
+# use_query_cache: false
+#
+# quartz:
+# job-store-type: jdbc
+# wait-for-jobs-to-complete-on-shutdown: true
+# overwrite-existing-jobs: true
+# jdbc:
+# initialize-schema: always
+# properties:
+# org:
+# quartz:
+# scheduler:
+# instanceName: sapling_scheduler
+# instanceId: AUTO
+# jobStore:
+# class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
+# driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+# tablePrefix: QRTZ_
+# useProperties: false
+# clusterCheckinInterval: 10000
+# isClustered: true
+# threadPool:
+# class: org.quartz.simpl.SimpleThreadPool
+# threadCount: 10
+# threadPriority: 5
+# threadsInheritContextClassLoaderOfInitializingThread: true
+#
+# servlet:
+# multipart:
+# enabled: true
+# max-request-size: 20MB
+# max-file-size: 20MB
+#
+#server:
+# port: 8081
+# servlet:
+# context-path: /api
+#
+#sa-token:
+# token-name: sapling-token
+# timeout: 2592000
+# activity-timeout: -1
+# is-concurrent: true
+# is-share: false
+# token-style: random-128