Commit 3b4ba159 by 黄明步

druid

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