Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
FleyX committed Sep 24, 2022
2 parents 8ab7d0c + 866ce22 commit 35ee930
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bookMarkService/business/bookmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.14.3</version>
<version>1.15.3</version>
</dependency>
<dependency>
<groupId>com.github.houbb</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.fanxb.bookmark.common.configuration;

import com.fanxb.bookmark.common.factory.CustomThreadFactory;
import com.fanxb.bookmark.common.factory.ThreadPoolFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;

Expand All @@ -11,15 +14,15 @@
* Created with IntelliJ IDEA
*
* @author fanxb
* @date 2020/1/26
*/
@Configuration
@Slf4j
public class ScheduleConfig implements SchedulingConfigurer {

@Override
public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {

ScheduledExecutorService service = new ScheduledThreadPoolExecutor(5, new CustomThreadFactory("schedule"));
scheduledTaskRegistrar.setScheduler(service);
scheduledTaskRegistrar.setScheduler(ThreadPoolFactory.createPool("schedule"));
log.info("自定义schedule线程池成功");
}

}

0 comments on commit 35ee930

Please sign in to comment.