forked from opentiny/tiny-engine-backend-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication-dev.yml
More file actions
68 lines (62 loc) · 2.72 KB
/
application-dev.yml
File metadata and controls
68 lines (62 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
server:
port: 9090
spring:
servlet:
multipart:
max-file-size: 10MB
max-request-size: 10MB
jackson:
date-format: yyyy-MM-dd HH:mm:ss
datasource:
driver-class-name: org.mariadb.jdbc.Driver
username: root
password: 111111
url: jdbc:mariadb://localhost:3306/tiny_engine_data_java?useUnicode=true&useSSL=false&characterEncoding=utf8
type: com.alibaba.druid.pool.DruidDataSource
druid:
initial-size: 5 # 连接池初始化时建立的连接数,默认值为 0。
min-idle: 5 # 连接池中最小的空闲连接数,默认值为 0。
max-active: 20 # 连接池中最大活动连接数(即同时可以被请求的连接数),默认值为 8。
test-on-borrow: true # 在从连接池获取连接时,是否进行有效性检查,默认值为 false。
validation-query: SELECT 1 # 用于检测连接是否有效的 SQL 查询语句,通常为简单的查询,比如 `SELECT 1`。如果连接不可用,会被关闭并重新建立。
max-wait: 60000 # 获取连接的最大等待时间(单位:毫秒),超时会抛出异常,默认值为 30000。
time-between-eviction-runs-millis: 60000 # 空闲连接检测线程运行的时间间隔(单位:毫秒)。空闲连接检测线程会定期检查空闲连接,默认值为 30000。
min-evictable-idle-time-millis: 300000 # 连接在池中保持空闲的最小时间(单位:毫秒)。如果空闲时间超过这个值,连接将被回收,默认值为 1800000。
pool-prepared-statements: true # 是否缓存 PreparedStatement 对象,默认值为 true。
max-open-prepared-statements: 20 # 最大缓存的 PreparedStatement 数量,默认值为 -1,表示无限制。如果 `pool-prepared-statements` 设置为 true,设置此值以限制缓存数量。
config:
activate:
on-profile: dev
#切面启用
aop:
proxy-target-class: true #默认为false
auto: true #默认为false
springdoc:
api-docs:
#是否开启文档功能
enabled: true
#swagger后端请求地址
path: /api-docs
swagger-ui:
enabled: true
path: /swagger-ui.html #自定义swagger-ui HTML文档路径
#包扫描路径
packages-to-scan: com.tinyengine.it.controller
mybatis-plus:
mapper-locations: classpath:mappers/*.xml
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
map-underscore-to-camel-case: true
auto-mapping-behavior: full
com.tinyengine.it.mapper: debug
type-handlers-package: com.tinyengine.it.common.handler
logging:
level:
ROOT: INFO
druid.sql.Statement: INFO
pattern:
file: "%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
file:
name: /logs
cors:
allowed-origins: "*"