From dab99405c59a04b15e4401415c80a1981c2f22b5 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期五, 14 五月 2021 16:58:09 +0800
Subject: [PATCH] update springboot 升级 2.3.10 依赖全面升级适配
---
ruoyi-generator/src/main/resources/vm/java/queryBo.java.vm | 6
ruoyi-quartz/pom.xml | 4
ruoyi-framework/pom.xml | 6
ruoyi-admin/src/main/resources/application-prod.yml | 152 ++++++++--------
ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java | 50 -----
pom.xml | 3
ruoyi-admin/src/main/resources/application.yml | 140 +++++++++------
ruoyi-admin/src/main/resources/application-dev.yml | 152 ++++++++--------
8 files changed, 250 insertions(+), 263 deletions(-)
diff --git a/pom.xml b/pom.xml
index e5d7eb3..c67e066 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,6 +14,7 @@
<properties>
<ruoyi-vue-plus.version>1.0.2</ruoyi-vue-plus.version>
+ <spring-boot.version>2.3.10.RELEASE</spring-boot.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
@@ -41,7 +42,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
- <version>2.2.13.RELEASE</version>
+ <version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml
index 65f8805..e16a18d 100644
--- a/ruoyi-admin/src/main/resources/application-dev.yml
+++ b/ruoyi-admin/src/main/resources/application-dev.yml
@@ -1,79 +1,79 @@
# 鏁版嵁婧愰厤缃�
spring:
- datasource:
- type: com.alibaba.druid.pool.DruidDataSource
- driverClassName: com.mysql.cj.jdbc.Driver
- druid:
- # 涓诲簱鏁版嵁婧�
- master:
- url: jdbc:mysql://192.168.0.222:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
- username: root
- password: root
- # 浠庡簱鏁版嵁婧�
- slave:
- # 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴
- enabled: false
- url:
- username:
- password:
- # 鍒濆杩炴帴鏁�
- initialSize: 5
- # 鏈�灏忚繛鎺ユ睜鏁伴噺
- minIdle: 10
- # 鏈�澶ц繛鎺ユ睜鏁伴噺
- maxActive: 20
- # 閰嶇疆鑾峰彇杩炴帴绛夊緟瓒呮椂鐨勬椂闂�
- maxWait: 60000
- # 閰嶇疆闂撮殧澶氫箙鎵嶈繘琛屼竴娆℃娴嬶紝妫�娴嬮渶瑕佸叧闂殑绌洪棽杩炴帴锛屽崟浣嶆槸姣
- timeBetweenEvictionRunsMillis: 60000
- # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�灏忕敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣
- minEvictableIdleTimeMillis: 300000
- # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�澶х敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣
- maxEvictableIdleTimeMillis: 900000
- # 閰嶇疆妫�娴嬭繛鎺ユ槸鍚︽湁鏁�
- validationQuery: SELECT 1 FROM DUAL
- testWhileIdle: true
- testOnBorrow: false
- testOnReturn: false
- webStatFilter:
- enabled: true
- statViewServlet:
- enabled: true
- # 璁剧疆鐧藉悕鍗曪紝涓嶅~鍒欏厑璁告墍鏈夎闂�
- allow:
- url-pattern: /druid/*
- # 鎺у埗鍙扮鐞嗙敤鎴峰悕鍜屽瘑鐮�
- login-username: ruoyi
- login-password: 123456
- filter:
- stat:
- enabled: true
- # 鎱QL璁板綍
- log-slow-sql: true
- slow-sql-millis: 1000
- merge-sql: true
- wall:
- config:
- multi-statement-allow: true
- # redis 閰嶇疆
- redis:
- # 鍦板潃
- host: 192.168.0.222
- # 绔彛锛岄粯璁や负6379
- port: 6379
- # 鏁版嵁搴撶储寮�
- database: 0
- # 瀵嗙爜
+ datasource:
+ type: com.alibaba.druid.pool.DruidDataSource
+ driverClassName: com.mysql.cj.jdbc.Driver
+ druid:
+ # 涓诲簱鏁版嵁婧�
+ master:
+ url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
+ username: root
+ password: root
+ # 浠庡簱鏁版嵁婧�
+ slave:
+ # 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴
+ enabled: false
+ url:
+ username:
password:
- # 杩炴帴瓒呮椂鏃堕棿
- timeout: 10s
- lettuce:
- pool:
- # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺�
- min-idle: 0
- # 杩炴帴姹犱腑鐨勬渶澶х┖闂茶繛鎺�
- max-idle: 8
- # 杩炴帴姹犵殑鏈�澶ф暟鎹簱杩炴帴鏁�
- max-active: 8
- # #杩炴帴姹犳渶澶ч樆濉炵瓑寰呮椂闂达紙浣跨敤璐熷�艰〃绀烘病鏈夐檺鍒讹級
- max-wait: -1ms
\ No newline at end of file
+ # 鍒濆杩炴帴鏁�
+ initialSize: 5
+ # 鏈�灏忚繛鎺ユ睜鏁伴噺
+ minIdle: 10
+ # 鏈�澶ц繛鎺ユ睜鏁伴噺
+ maxActive: 20
+ # 閰嶇疆鑾峰彇杩炴帴绛夊緟瓒呮椂鐨勬椂闂�
+ maxWait: 60000
+ # 閰嶇疆闂撮殧澶氫箙鎵嶈繘琛屼竴娆℃娴嬶紝妫�娴嬮渶瑕佸叧闂殑绌洪棽杩炴帴锛屽崟浣嶆槸姣
+ timeBetweenEvictionRunsMillis: 60000
+ # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�灏忕敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣
+ minEvictableIdleTimeMillis: 300000
+ # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�澶х敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣
+ maxEvictableIdleTimeMillis: 900000
+ # 閰嶇疆妫�娴嬭繛鎺ユ槸鍚︽湁鏁�
+ validationQuery: SELECT 1 FROM DUAL
+ testWhileIdle: true
+ testOnBorrow: false
+ testOnReturn: false
+ webStatFilter:
+ enabled: true
+ statViewServlet:
+ enabled: true
+ # 璁剧疆鐧藉悕鍗曪紝涓嶅~鍒欏厑璁告墍鏈夎闂�
+ allow:
+ url-pattern: /druid/*
+ # 鎺у埗鍙扮鐞嗙敤鎴峰悕鍜屽瘑鐮�
+ login-username: ruoyi
+ login-password: 123456
+ filter:
+ stat:
+ enabled: true
+ # 鎱QL璁板綍
+ log-slow-sql: true
+ slow-sql-millis: 1000
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ # redis 閰嶇疆
+ redis:
+ # 鍦板潃
+ host: localhost
+ # 绔彛锛岄粯璁や负6379
+ port: 6379
+ # 鏁版嵁搴撶储寮�
+ database: 0
+ # 瀵嗙爜
+ password:
+ # 杩炴帴瓒呮椂鏃堕棿
+ timeout: 10s
+ lettuce:
+ pool:
+ # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺�
+ min-idle: 0
+ # 杩炴帴姹犱腑鐨勬渶澶х┖闂茶繛鎺�
+ max-idle: 8
+ # 杩炴帴姹犵殑鏈�澶ф暟鎹簱杩炴帴鏁�
+ max-active: 8
+ # #杩炴帴姹犳渶澶ч樆濉炵瓑寰呮椂闂达紙浣跨敤璐熷�艰〃绀烘病鏈夐檺鍒讹級
+ max-wait: -1ms
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml
index 8f81bbd..fbd01b3 100644
--- a/ruoyi-admin/src/main/resources/application-prod.yml
+++ b/ruoyi-admin/src/main/resources/application-prod.yml
@@ -1,79 +1,79 @@
# 鏁版嵁婧愰厤缃�
spring:
- datasource:
- type: com.alibaba.druid.pool.DruidDataSource
- driverClassName: com.mysql.cj.jdbc.Driver
- druid:
- # 涓诲簱鏁版嵁婧�
- master:
- url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
- username: root
- password: root
- # 浠庡簱鏁版嵁婧�
- slave:
- # 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴
- enabled: false
- url:
- username:
- password:
- # 鍒濆杩炴帴鏁�
- initialSize: 5
- # 鏈�灏忚繛鎺ユ睜鏁伴噺
- minIdle: 10
- # 鏈�澶ц繛鎺ユ睜鏁伴噺
- maxActive: 20
- # 閰嶇疆鑾峰彇杩炴帴绛夊緟瓒呮椂鐨勬椂闂�
- maxWait: 60000
- # 閰嶇疆闂撮殧澶氫箙鎵嶈繘琛屼竴娆℃娴嬶紝妫�娴嬮渶瑕佸叧闂殑绌洪棽杩炴帴锛屽崟浣嶆槸姣
- timeBetweenEvictionRunsMillis: 60000
- # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�灏忕敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣
- minEvictableIdleTimeMillis: 300000
- # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�澶х敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣
- maxEvictableIdleTimeMillis: 900000
- # 閰嶇疆妫�娴嬭繛鎺ユ槸鍚︽湁鏁�
- validationQuery: SELECT 1 FROM DUAL
- testWhileIdle: true
- testOnBorrow: false
- testOnReturn: false
- webStatFilter:
- enabled: true
- statViewServlet:
- enabled: true
- # 璁剧疆鐧藉悕鍗曪紝涓嶅~鍒欏厑璁告墍鏈夎闂�
- allow:
- url-pattern: /druid/*
- # 鎺у埗鍙扮鐞嗙敤鎴峰悕鍜屽瘑鐮�
- login-username: ruoyi
- login-password: 123456
- filter:
- stat:
- enabled: true
- # 鎱QL璁板綍
- log-slow-sql: true
- slow-sql-millis: 1000
- merge-sql: true
- wall:
- config:
- multi-statement-allow: true
- # redis 閰嶇疆
- redis:
- # 鍦板潃
- host: 192.168.0.222
- # 绔彛锛岄粯璁や负6379
- port: 6379
- # 鏁版嵁搴撶储寮�
- database: 0
- # 瀵嗙爜
+ datasource:
+ type: com.alibaba.druid.pool.DruidDataSource
+ driverClassName: com.mysql.cj.jdbc.Driver
+ druid:
+ # 涓诲簱鏁版嵁婧�
+ master:
+ url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
+ username: root
+ password: root
+ # 浠庡簱鏁版嵁婧�
+ slave:
+ # 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴
+ enabled: false
+ url:
+ username:
password:
- # 杩炴帴瓒呮椂鏃堕棿
- timeout: 10s
- lettuce:
- pool:
- # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺�
- min-idle: 0
- # 杩炴帴姹犱腑鐨勬渶澶х┖闂茶繛鎺�
- max-idle: 8
- # 杩炴帴姹犵殑鏈�澶ф暟鎹簱杩炴帴鏁�
- max-active: 8
- # #杩炴帴姹犳渶澶ч樆濉炵瓑寰呮椂闂达紙浣跨敤璐熷�艰〃绀烘病鏈夐檺鍒讹級
- max-wait: -1ms
\ No newline at end of file
+ # 鍒濆杩炴帴鏁�
+ initialSize: 5
+ # 鏈�灏忚繛鎺ユ睜鏁伴噺
+ minIdle: 10
+ # 鏈�澶ц繛鎺ユ睜鏁伴噺
+ maxActive: 20
+ # 閰嶇疆鑾峰彇杩炴帴绛夊緟瓒呮椂鐨勬椂闂�
+ maxWait: 60000
+ # 閰嶇疆闂撮殧澶氫箙鎵嶈繘琛屼竴娆℃娴嬶紝妫�娴嬮渶瑕佸叧闂殑绌洪棽杩炴帴锛屽崟浣嶆槸姣
+ timeBetweenEvictionRunsMillis: 60000
+ # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�灏忕敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣
+ minEvictableIdleTimeMillis: 300000
+ # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�澶х敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣
+ maxEvictableIdleTimeMillis: 900000
+ # 閰嶇疆妫�娴嬭繛鎺ユ槸鍚︽湁鏁�
+ validationQuery: SELECT 1 FROM DUAL
+ testWhileIdle: true
+ testOnBorrow: false
+ testOnReturn: false
+ webStatFilter:
+ enabled: true
+ statViewServlet:
+ enabled: true
+ # 璁剧疆鐧藉悕鍗曪紝涓嶅~鍒欏厑璁告墍鏈夎闂�
+ allow:
+ url-pattern: /druid/*
+ # 鎺у埗鍙扮鐞嗙敤鎴峰悕鍜屽瘑鐮�
+ login-username: ruoyi
+ login-password: 123456
+ filter:
+ stat:
+ enabled: true
+ # 鎱QL璁板綍
+ log-slow-sql: true
+ slow-sql-millis: 1000
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ # redis 閰嶇疆
+ redis:
+ # 鍦板潃
+ host: 192.168.0.222
+ # 绔彛锛岄粯璁や负6379
+ port: 6379
+ # 鏁版嵁搴撶储寮�
+ database: 0
+ # 瀵嗙爜
+ password:
+ # 杩炴帴瓒呮椂鏃堕棿
+ timeout: 10s
+ lettuce:
+ pool:
+ # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺�
+ min-idle: 0
+ # 杩炴帴姹犱腑鐨勬渶澶х┖闂茶繛鎺�
+ max-idle: 8
+ # 杩炴帴姹犵殑鏈�澶ф暟鎹簱杩炴帴鏁�
+ max-active: 8
+ # #杩炴帴姹犳渶澶ч樆濉炵瓑寰呮椂闂达紙浣跨敤璐熷�艰〃绀烘病鏈夐檺鍒讹級
+ max-wait: -1ms
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 6ab3030..a142ec6 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -26,7 +26,7 @@
# 寮�鍙戠幆澧冮厤缃�
server:
# 鏈嶅姟鍣ㄧ殑HTTP绔彛锛岄粯璁や负8080
- port: 8080
+ port: 8081
servlet:
# 搴旂敤鐨勮闂矾寰�
context-path: /
@@ -37,12 +37,13 @@
# 浠ヤ笅鐨勯厤缃細褰卞搷buffer,杩欎簺buffer浼氱敤浜庢湇鍔″櫒杩炴帴鐨処O鎿嶄綔,鏈夌偣绫讳技netty鐨勬睜鍖栧唴瀛樼鐞�
# 姣忓潡buffer鐨勭┖闂村ぇ灏�,瓒婂皬鐨勭┖闂磋鍒╃敤瓒婂厖鍒�
buffer-size: 512
- # 璁剧疆IO绾跨▼鏁�, 瀹冧富瑕佹墽琛岄潪闃诲鐨勪换鍔�,瀹冧滑浼氳礋璐e涓繛鎺�, 榛樿璁剧疆姣忎釜CPU鏍稿績涓�涓嚎绋�
- io-threads: 8
- # 闃诲浠诲姟绾跨▼姹�, 褰撴墽琛岀被浼約ervlet璇锋眰闃诲鎿嶄綔, undertow浼氫粠杩欎釜绾跨▼姹犱腑鍙栧緱绾跨▼,瀹冪殑鍊艰缃彇鍐充簬绯荤粺鐨勮礋杞�
- worker-threads: 256
# 鏄惁鍒嗛厤鐨勭洿鎺ュ唴瀛�
direct-buffers: true
+ threads:
+ # 璁剧疆IO绾跨▼鏁�, 瀹冧富瑕佹墽琛岄潪闃诲鐨勪换鍔�,瀹冧滑浼氳礋璐e涓繛鎺�, 榛樿璁剧疆姣忎釜CPU鏍稿績涓�涓嚎绋�
+ io: 8
+ # 闃诲浠诲姟绾跨▼姹�, 褰撴墽琛岀被浼約ervlet璇锋眰闃诲鎿嶄綔, undertow浼氫粠杩欎釜绾跨▼姹犱腑鍙栧緱绾跨▼,瀹冪殑鍊艰缃彇鍐充簬绯荤粺鐨勮礋杞�
+ worker: 256
# # tomcat 閰嶇疆
# tomcat:
# # tomcat鐨刄RI缂栫爜
@@ -65,15 +66,15 @@
messages:
# 鍥介檯鍖栬祫婧愭枃浠惰矾寰�
basename: i18n/messages
- profiles:
+ profiles:
active: @profiles.active@
# 鏂囦欢涓婁紶
servlet:
- multipart:
- # 鍗曚釜鏂囦欢澶у皬
- max-file-size: 10MB
- # 璁剧疆鎬讳笂浼犵殑鏂囦欢澶у皬
- max-request-size: 20MB
+ multipart:
+ # 鍗曚釜鏂囦欢澶у皬
+ max-file-size: 10MB
+ # 璁剧疆鎬讳笂浼犵殑鏂囦欢澶у皬
+ max-request-size: 20MB
# 鏈嶅姟妯″潡
devtools:
restart:
@@ -83,44 +84,17 @@
thymeleaf:
# 灏嗙郴缁熸ā鏉挎斁缃埌鏈�鍓嶉潰 鍚﹀垯浼氫笌 springboot-admin 椤甸潰鍐茬獊
template-resolver-order: 1
- application:
- name: ruoyi-vue-plus
- boot:
- admin:
- # Spring Boot Admin Client 瀹㈡埛绔殑鐩稿叧閰嶇疆
- client:
- # 璁剧疆 Spring Boot Admin Server 鍦板潃
- url: http://localhost:${server.port}${spring.boot.admin.context-path}
- instance:
- prefer-ip: true # 娉ㄥ唽瀹炰緥鏃讹紝浼樺厛浣跨敤 IP
-# username: ruoyi
-# password: 123456
- # Spring Boot Admin Server 鏈嶅姟绔殑鐩稿叧閰嶇疆
- context-path: /admin # 閰嶇疆 Spring
-
-# Actuator 鐩戞帶绔偣鐨勯厤缃」
-management:
- endpoints:
- web:
- # Actuator 鎻愪緵鐨� API 鎺ュ彛鐨勬牴鐩綍銆傞粯璁や负 /actuator
- base-path: /actuator
- exposure:
- # 闇�瑕佸紑鏀剧殑绔偣銆傞粯璁ゅ�煎彧鎵撳紑 health 鍜� info 涓や釜绔偣銆傞�氳繃璁剧疆 * 锛屽彲浠ュ紑鏀炬墍鏈夌鐐广��
- include: '*'
- endpoint:
- logfile:
- external-file: ./logs/sys-console.log
# token閰嶇疆
token:
- # 浠ょ墝鑷畾涔夋爣璇�
- header: Authorization
- # 浠ょ墝瀵嗛挜
- secret: abcdefghijklmnopqrstuvwxyz
- # 浠ょ墝鏈夋晥鏈燂紙榛樿30鍒嗛挓锛�
- expireTime: 30
-
-# MyBatis閰嶇疆
+ # 浠ょ墝鑷畾涔夋爣璇�
+ header: Authorization
+ # 浠ょ墝瀵嗛挜
+ secret: abcdefghijklmnopqrstuvwxyz
+ # 浠ょ墝鏈夋晥鏈燂紙榛樿30鍒嗛挓锛�
+ expireTime: 30
+
+# MyBatisPlus閰嶇疆
# https://baomidou.com/config/
mybatis-plus:
mapperPackage: com.ruoyi.**.mapper
@@ -209,13 +183,6 @@
# 瀛楁楠岃瘉绛栫暐涔� select,鍦� select 鐨勬椂鍊欑殑瀛楁楠岃瘉绛栫暐鏃� wrapper 鏍规嵁鍐呴儴 entity 鐢熸垚鐨� where 鏉′欢
selectStrategy: NOT_EMPTY
-# PageHelper鍒嗛〉鎻掍欢
-pagehelper:
- helperDialect: mysql
- reasonable: true
- supportMethodsArguments: true
- params: count=countSql
-
# Swagger閰嶇疆
swagger:
# 鏄惁寮�鍚痵wagger
@@ -230,7 +197,7 @@
version: '鐗堟湰鍙�: ${ruoyi-vue-plus.version}'
# 闃叉XSS鏀诲嚮
-xss:
+xss:
# 杩囨护寮�鍏�
enabled: true
# 鎺掗櫎閾炬帴锛堝涓敤閫楀彿鍒嗛殧锛�
@@ -238,6 +205,7 @@
# 鍖归厤閾炬帴
urlPatterns: /system/*,/monitor/*,/tool/*
+# 鍏ㄥ眬绾跨▼姹犵浉鍏抽厤缃�
threadPoolConfig:
# 鏄惁寮�鍚嚎绋嬫睜
enabled: false
@@ -256,6 +224,7 @@
# AbortPolicy 涓
rejectedExecutionHandler: CallerRunsPolicy
+# feign 鐩稿叧閰嶇疆
feign:
package: com.ruoyi.**.feign
# 寮�鍚帇缂�
@@ -267,4 +236,65 @@
okhttp:
enabled: true
hystrix:
- enabled: true
\ No newline at end of file
+ enabled: true
+
+--- # 瀹氭椂浠诲姟閰嶇疆
+spring:
+ quartz:
+ scheduler-name: RuoyiScheduler
+ startup-delay: 1s
+ overwrite-existing-jobs: true
+ auto-startup: true
+ job-store-type: jdbc
+ properties:
+ org:
+ quartz:
+ # Scheduler 鐩稿叧閰嶇疆
+ scheduler:
+ instanceName: RuoyiScheduler
+ instanceId: AUTO
+ # 绾跨▼姹犵浉鍏抽厤缃�
+ threadPool:
+ class: org.quartz.simpl.SimpleThreadPool
+ threadCount: 20
+ threadPriority: 5
+ # JobStore 闆嗙兢閰嶇疆
+ jobStore:
+ class: org.quartz.impl.jdbcjobstore.JobStoreTX
+ isClustered: true
+ clusterCheckinInterval: 15000
+ txIsolationLevelSerializable: true
+ misfireThreshold: 60000
+ tablePrefix: QRTZ_
+ # sqlserver 鍚敤
+ # selectWithLockSQL: SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?
+
+--- # 鐩戞帶閰嶇疆
+spring:
+ application:
+ name: ruoyi-vue-plus
+ boot:
+ admin:
+ # Spring Boot Admin Client 瀹㈡埛绔殑鐩稿叧閰嶇疆
+ client:
+ # 璁剧疆 Spring Boot Admin Server 鍦板潃
+ url: http://localhost:${server.port}${spring.boot.admin.context-path}
+ instance:
+ prefer-ip: true # 娉ㄥ唽瀹炰緥鏃讹紝浼樺厛浣跨敤 IP
+ # username: ruoyi
+ # password: 123456
+ # Spring Boot Admin Server 鏈嶅姟绔殑鐩稿叧閰嶇疆
+ context-path: /admin # 閰嶇疆 Spring
+
+# Actuator 鐩戞帶绔偣鐨勯厤缃」
+management:
+ endpoints:
+ web:
+ # Actuator 鎻愪緵鐨� API 鎺ュ彛鐨勬牴鐩綍銆傞粯璁や负 /actuator
+ base-path: /actuator
+ exposure:
+ # 闇�瑕佸紑鏀剧殑绔偣銆傞粯璁ゅ�煎彧鎵撳紑 health 鍜� info 涓や釜绔偣銆傞�氳繃璁剧疆 * 锛屽彲浠ュ紑鏀炬墍鏈夌鐐广��
+ include: '*'
+ endpoint:
+ logfile:
+ external-file: ./logs/sys-console.log
\ No newline at end of file
diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml
index a138044..e51b27f 100644
--- a/ruoyi-framework/pom.xml
+++ b/ruoyi-framework/pom.xml
@@ -49,6 +49,12 @@
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
+ <!-- SpringBoot 鏍¢獙妗嗘灦 -->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-validation</artifactId>
+ </dependency>
+
<!-- 闃块噷鏁版嵁搴撹繛鎺ユ睜 -->
<dependency>
<groupId>com.alibaba</groupId>
diff --git a/ruoyi-generator/src/main/resources/vm/java/queryBo.java.vm b/ruoyi-generator/src/main/resources/vm/java/queryBo.java.vm
index 89550fe..c7be089 100644
--- a/ruoyi-generator/src/main/resources/vm/java/queryBo.java.vm
+++ b/ruoyi-generator/src/main/resources/vm/java/queryBo.java.vm
@@ -6,7 +6,6 @@
import lombok.EqualsAndHashCode;
import java.util.Date;
-import javax.validation.constraints.*;
#foreach ($import in $importList)
import ${import};
@@ -55,11 +54,6 @@
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
#end
@ApiModelProperty("$column.columnComment")
-#if($column.javaType == 'String')
- @NotBlank(message = "$column.columnComment涓嶈兘涓虹┖")
-#else
- @NotNull(message = "$column.columnComment涓嶈兘涓虹┖")
-#end
private $column.javaType $column.javaField;
#end
#end
diff --git a/ruoyi-quartz/pom.xml b/ruoyi-quartz/pom.xml
index f29cea7..0a23e04 100644
--- a/ruoyi-quartz/pom.xml
+++ b/ruoyi-quartz/pom.xml
@@ -19,8 +19,8 @@
<!-- 瀹氭椂浠诲姟 -->
<dependency>
- <groupId>org.quartz-scheduler</groupId>
- <artifactId>quartz</artifactId>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-quartz</artifactId>
<exclusions>
<exclusion>
<groupId>com.mchange</groupId>
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java
index e466ed0..c6b8384 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java
@@ -1,57 +1,13 @@
package com.ruoyi.quartz.config;
-import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.scheduling.quartz.SchedulerFactoryBean;
-import javax.sql.DataSource;
-import java.util.Properties;
/**
* 瀹氭椂浠诲姟閰嶇疆
- *
- * @author ruoyi
+ *
+ * @author Lion Li
*/
@Configuration
-public class ScheduleConfig
-{
- @Bean
- public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource)
- {
- SchedulerFactoryBean factory = new SchedulerFactoryBean();
- factory.setDataSource(dataSource);
+public class ScheduleConfig {
- // quartz鍙傛暟
- Properties prop = new Properties();
- prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler");
- prop.put("org.quartz.scheduler.instanceId", "AUTO");
- // 绾跨▼姹犻厤缃�
- prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");
- prop.put("org.quartz.threadPool.threadCount", "20");
- prop.put("org.quartz.threadPool.threadPriority", "5");
- // JobStore閰嶇疆
- prop.put("org.quartz.jobStore.class", "org.quartz.impl.jdbcjobstore.JobStoreTX");
- // 闆嗙兢閰嶇疆
- prop.put("org.quartz.jobStore.isClustered", "true");
- prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000");
- prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1");
- prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true");
-
- // sqlserver 鍚敤
- // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?");
- prop.put("org.quartz.jobStore.misfireThreshold", "12000");
- prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
- factory.setQuartzProperties(prop);
-
- factory.setSchedulerName("RuoyiScheduler");
- // 寤舵椂鍚姩
- factory.setStartupDelay(1);
- factory.setApplicationContextSchedulerContextKey("applicationContextKey");
- // 鍙�夛紝QuartzScheduler
- // 鍚姩鏃舵洿鏂板繁瀛樺湪鐨凧ob锛岃繖鏍峰氨涓嶇敤姣忔淇敼targetObject鍚庡垹闄rtz_job_details琛ㄥ搴旇褰曚簡
- factory.setOverwriteExistingJobs(true);
- // 璁剧疆鑷姩鍚姩锛岄粯璁や负true
- factory.setAutoStartup(true);
-
- return factory;
- }
}
--
Gitblit v1.9.3