37 lines
1.3 KiB
Java
37 lines
1.3 KiB
Java
package com.accompany.scheduler;
|
|
|
|
import cn.hippo4j.core.enable.EnableDynamicThreadPool;
|
|
import io.micrometer.core.instrument.MeterRegistry;
|
|
import org.mybatis.spring.annotation.MapperScan;
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.SpringBootConfiguration;
|
|
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.ComponentScan;
|
|
import org.springframework.scheduling.annotation.EnableAsync;
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
|
|
/**
|
|
* @author PaperCut
|
|
* @date 2018/6/11
|
|
*/
|
|
@EnableDynamicThreadPool
|
|
@SpringBootApplication
|
|
@ComponentScan({"com.accompany","com.xuanyin"})
|
|
@EnableScheduling
|
|
@EnableAsync(proxyTargetClass = true)
|
|
@MapperScan({"com.accompany.*.mapper","com.accompany.*.mybatismapper", "com.xuanyin.*.mapper"})
|
|
@SpringBootConfiguration
|
|
public class JobApplication {
|
|
|
|
public static void main(String[] args) {
|
|
SpringApplication.run(JobApplication.class, args);
|
|
}
|
|
|
|
@Bean
|
|
MeterRegistryCustomizer<MeterRegistry> configurer() {
|
|
return (registry) -> registry.config().commonTags("application", "pk_admin");
|
|
}
|
|
}
|