Files
gzh-server/src/main/java/com/guahao/GuahaoApplication.java

33 lines
1.4 KiB
Java
Raw Normal View History

package com.guahao;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import org.springframework.boot.SpringApplication;
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 tk.mybatis.spring.annotation.MapperScan;
@EnableAspectJAutoProxy(proxyTargetClass = true)
@SpringBootApplication(scanBasePackages = "com")
@MapperScan(basePackages = {"com.guahao.*.mapper"})
@ServletComponentScan(basePackages = {"com.guahao.common.filter", "com.guahao.common.listener"})
@ComponentScan(basePackages = {"com.guahao"})
@EnableScheduling
public class GuahaoApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(GuahaoApplication.class);
}
public static void main(String[] args) {
SpringApplication.run(GuahaoApplication.class, args);
}
}