Commit 3b4ba159 by 黄明步

druid

parent 718b32b8
......@@ -20,6 +20,7 @@
<java.version>8</java.version>
<spring-cloud.version>Hoxton.SR11</spring-cloud.version>
<elasticsearch.version>8.9.1</elasticsearch.version>
<alibaba.druid.version>1.1.22</alibaba.druid.version>
</properties>
<dependencyManagement>
<dependencies>
......@@ -189,6 +190,13 @@
<artifactId>jakarta.json-api</artifactId>
<version>2.0.1</version>
</dependency>
<!-- druid数据源驱动 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${alibaba.druid.version}</version>
</dependency>
</dependencies>
<build>
......
......@@ -24,7 +24,7 @@ public class OcrResult {
}
public static OcrResult error(String message) {
return new OcrResult("500", message, "", DateUtil.current());
return new OcrResult("007500", message, "", DateUtil.current());
}
......
spring:
datasource:
username: root
password: Docimax@123
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://147.1.5.77:3306/yuntu_ofs?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: Docimax@123
url: jdbc:mysql://147.1.5.77:3306/yuntu_ofs?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
initial-size: 3 # 初始化时建立物理连接的个数
min-idle: 5 # 最小连接池数量
max-active: 200 # 最大连接池数量
max-wait: 5000 # 获取连接时最大等待时间,单位毫秒
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
min-evictable-idle-time-millis: 100000 # 连接保持空闲而不被驱逐的最小时间
max-evictable-idle-time-millis: 300000 # 连接保持空闲而不被驱逐的最大时间
test-while-idle: true
test-on-borrow: false
test-on-return: false
validation-query: select 1
webStatFilter:
enabled: true
#安全配置
stat-view-servlet:
enabled: true
url-pattern: /druid/*
reset-enable: false
login-username: admin
login-password: GXfy!2023
filter:
stat:
enabled: true
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
redis:
cluster:
nodes:
......
spring:
datasource:
username: root
password: Dk2019!23456
# password: Docimax@123
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://119.45.183.210:13308/ocr_cloud?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
# url: jdbc:mysql://147.1.5.77:3306/yuntu_ofs?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
# redis:
# cluster:
# nodes:
# - 147.1.5.79:6379
# - 147.1.5.79:6389
# - 147.1.5.80:6379
# - 147.1.5.80:6389
# - 147.1.5.81:6379
# - 147.1.5.81:6389
# database: 0
# password: Docimax
# jedis:
# pool:
# max-active: 128
# max-wait: 60s
# max-idle: 64
# min-idle: 0
# timeout: 5000
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: Dk2019!23456
url: jdbc:mysql://119.45.183.210:13308/ocr_cloud?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
initial-size: 3 # 初始化时建立物理连接的个数
min-idle: 5 # 最小连接池数量
max-active: 200 # 最大连接池数量
max-wait: 5000 # 获取连接时最大等待时间,单位毫秒
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
min-evictable-idle-time-millis: 100000 # 连接保持空闲而不被驱逐的最小时间
max-evictable-idle-time-millis: 300000 # 连接保持空闲而不被驱逐的最大时间
test-while-idle: true
test-on-borrow: false
test-on-return: false
validation-query: select 1
webStatFilter:
enabled: true
#安全配置
stat-view-servlet:
enabled: true
url-pattern: /druid/*
reset-enable: false
login-username: admin
login-password: GXfy!2023
filter:
stat:
enabled: true
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
redis:
host: 127.0.0.1
port: 6379
......@@ -36,9 +47,6 @@ spring:
max-idle: 64
min-idle: 0
timeout: 5000
#eureka:
# client:
# enabled: false
ocr:
api: http://147.2.4.2:9001
......
spring:
profiles:
active: 147prod
active: dev
servlet:
multipart:
max-file-size: 1024MB
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment