package cn.com.goldenwater.dcproj; import cn.com.goldenwater.dcproj.filter.XssFilter; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.transaction.annotation.EnableTransactionManagement; @EnableTransactionManagement @SpringBootApplication @EnableScheduling @EnableCaching @ServletComponentScan @EnableFeignClients(basePackages = {"com.workflow.bpm.api.bpmservices"}) @ComponentScan(basePackages={"com.workflow.bpm.api.bpmservices","cn.com.goldenwater"}) public class GwCloudPlatformDcprojServiceApplication { //打war包时使用 //public class GwCloudPlatformDcprojServiceApplication extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication.run(GwCloudPlatformDcprojServiceApplication.class,args); } @Bean public XssFilter getXssFilter() { return new XssFilter(); } // 打war包时使用 // @Override // protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { // return builder.sources(GwCloudPlatformDcprojServiceApplication.class); // } }