Files
peko-java/accompany-business/accompany-business-web/src/main/java/com/accompany/business/BusinessApplication.java
2024-04-19 16:40:27 +08:00

39 lines
1.6 KiB
Java

package com.accompany.business;
import cn.hippo4j.core.enable.EnableDynamicThreadPool;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableDynamicThreadPool
@SpringBootApplication
@EnableTransactionManagement
@EnableAspectJAutoProxy(proxyTargetClass = true)
@ComponentScan({"com.accompany","com.xuanyin"})
@ServletComponentScan(value = {"com.accompany", "com.xuanyin"})
@EnableAsync(proxyTargetClass = true)
@EnableScheduling
@MapperScan({"com.accompany.*.mybatismapper","com.accompany.*.mapper", "com.xuanyin.*.mapper"})
@SpringBootConfiguration
public class BusinessApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(BusinessApplication.class);
}
public static void main(String[] args) {
SpringApplication.run(BusinessApplication.class, args);
}
}