Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
74f991b8
Unverified
Commit
74f991b8
authored
Jan 18, 2022
by
若依
Committed by
Gitee
Jan 18, 2022
Browse files
!414 优化任务队列满时任务拒绝策略
Merge pull request !414 from root/master
parents
d7ca248b
15f05b60
Changes
2
Hide whitespace changes
Inline
Side-by-side
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java
View file @
74f991b8
...
...
@@ -3,6 +3,7 @@ package com.ruoyi.common.core.domain.entity;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
...
@@ -30,7 +31,7 @@ public class SysMenu extends BaseEntity
private
Long
parentId
;
/** 显示顺序 */
private
String
orderNum
;
private
Integer
orderNum
;
/** 路由地址 */
private
String
path
;
...
...
@@ -107,13 +108,13 @@ public class SysMenu extends BaseEntity
this
.
parentId
=
parentId
;
}
@Not
Blank
(
message
=
"显示顺序不能为空"
)
public
String
getOrderNum
()
@Not
Null
(
message
=
"显示顺序不能为空"
)
public
Integer
getOrderNum
()
{
return
orderNum
;
}
public
void
setOrderNum
(
String
orderNum
)
public
void
setOrderNum
(
Integer
orderNum
)
{
this
.
orderNum
=
orderNum
;
}
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/config/ThreadPoolConfig.java
View file @
74f991b8
package
com.ruoyi.framework.config
;
import
java.util.concurrent.ScheduledExecutorService
;
import
java.util.concurrent.ScheduledThreadPoolExecutor
;
import
java.util.concurrent.ThreadPoolExecutor
;
import
com.ruoyi.common.utils.Threads
;
import
org.apache.commons.lang3.concurrent.BasicThreadFactory
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
;
import
com.ruoyi.common.utils.Threads
;
import
java.util.concurrent.ScheduledExecutorService
;
import
java.util.concurrent.ScheduledThreadPoolExecutor
;
import
java.util.concurrent.ThreadPoolExecutor
;
/**
* 线程池配置
...
...
@@ -49,7 +50,8 @@ public class ThreadPoolConfig
protected
ScheduledExecutorService
scheduledExecutorService
()
{
return
new
ScheduledThreadPoolExecutor
(
corePoolSize
,
new
BasicThreadFactory
.
Builder
().
namingPattern
(
"schedule-pool-%d"
).
daemon
(
true
).
build
())
new
BasicThreadFactory
.
Builder
().
namingPattern
(
"schedule-pool-%d"
).
daemon
(
true
).
build
(),
new
ThreadPoolExecutor
.
CallerRunsPolicy
())
{
@Override
protected
void
afterExecute
(
Runnable
r
,
Throwable
t
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment