对比新文件 |
| | |
| | | package com.gk.firework; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.scheduling.TaskScheduler; |
| | | import org.springframework.scheduling.annotation.EnableAsync; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; |
| | | import org.springframework.stereotype.Repository; |
| | | import org.springframework.web.bind.annotation.CrossOrigin; |
| | | |
| | | @CrossOrigin |
| | | //@MapperScan(basePackages = "com.gk.electrical.Mapper",annotationClass = Repository.class) |
| | | @EnableAsync |
| | | @SpringBootApplication |
| | | public class FireworkApplication { |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(FireworkApplication.class, args); |
| | | } |
| | | |
| | | /** |
| | | * 分页插件 |
| | | */ |
| | | @Bean |
| | | public PaginationInterceptor paginationInterceptor() { |
| | | return new PaginationInterceptor(); |
| | | } |
| | | |
| | | /**多任务时间调度**/ |
| | | @Bean |
| | | public TaskScheduler taskScheduler() { |
| | | ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler(); |
| | | taskScheduler.setPoolSize(50); |
| | | return taskScheduler; |
| | | } |
| | | |
| | | } |