summaryrefslogtreecommitdiff
path: root/src/main/resources/application.yml
diff options
context:
space:
mode:
authorfangshunjian <[email protected]>2024-06-21 11:00:58 +0800
committerfangshunjian <[email protected]>2024-06-21 11:00:58 +0800
commit0f9fff2f41d16a32c3c95606ca192ad2c33b810e (patch)
tree3fb53ec3cd9103d2bde87b53a2bc25fc6dacd207 /src/main/resources/application.yml
初始化项目HEADmain
Diffstat (limited to 'src/main/resources/application.yml')
-rw-r--r--src/main/resources/application.yml61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
new file mode 100644
index 0000000..1300f30
--- /dev/null
+++ b/src/main/resources/application.yml
@@ -0,0 +1,61 @@
+
+spring:
+ banner:
+ location: classpath:static/banner.txt
+ web:
+ resources:
+ static-locations: ./public/
+ cache:
+ cachecontrol:
+ no-cache: true
+# max-age: 30d
+# cache-public: true
+ profiles:
+ active: prod
+ include: magic-api
+ datasource:
+ driver-class-name: org.mariadb.jdbc.Driver
+ url: jdbc:mariadb://${database.host}:${database.port}/${database.name}?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
+ username: ${database.user}
+ password: ENC(${database.pin})
+ flyway:
+ enabled: true # 是否开启
+ encoding: UTF-8 # 编码
+ sql-migration-prefix: V # 脚本文件的前缀,默认为V
+ sql-migration-separator: __ # 双下划线
+ baseline-on-migrate: true # 连接数据库中存在表时设置为true
+ locations: classpath:db/migration # 脚本路径
+ clean-disabled: false # flyway 的 clean 命令会删除指定 schema 下的所有 table, 生产务必禁掉。这个默认值是 false 理论上作为默认配置是不科学的
+ validate-on-migrate: true # 执行迁移时是否自动调用验证 当你的 版本不符合逻辑 比如 你先执行了 DML 而没有 对应的DDL 会抛出异常
+ placeholder-replacement: false # 不做取值替换 默认替换为 ${} ,初始化sql中有sql语句存在freemarker替换,所以禁用此项
+ servlet:
+ multipart:
+ max-file-size: 200MB
+ max-request-size: 200MB
+ enabled: true
+ main:
+ allow-circular-references: true
+
+server:
+# port: 2023
+ servlet:
+ context-path: /
+ tomcat:
+ uri-encoding: UTF-8
+ max-threads: 1000
+ min-spare-threads: 5
+ connection-timeout: 60000
+ keep-alive-timeout: 600000
+ compression:
+ enabled: true
+ mime-types: text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml
+
+mybatis-plus:
+ mapper-locations: classpath:db/mapper/*Mapper.xml
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+ global-config:
+ banner: false
+
+logging:
+ config: ./config/logback-spring.xml \ No newline at end of file