dd8fa986a48aa90881bacb6b4c84fcd03fb5e2f8.svn-base 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package cn.com.goldenwater.dcproj;
  2. import cn.com.goldenwater.dcproj.filter.XssFilter;
  3. import org.springframework.boot.SpringApplication;
  4. import org.springframework.boot.autoconfigure.SpringBootApplication;
  5. import org.springframework.boot.web.servlet.ServletComponentScan;
  6. import org.springframework.cache.annotation.EnableCaching;
  7. import org.springframework.cloud.openfeign.EnableFeignClients;
  8. import org.springframework.context.annotation.Bean;
  9. import org.springframework.context.annotation.ComponentScan;
  10. import org.springframework.scheduling.annotation.EnableScheduling;
  11. import org.springframework.transaction.annotation.EnableTransactionManagement;
  12. @EnableTransactionManagement
  13. @SpringBootApplication
  14. @EnableScheduling
  15. @EnableCaching
  16. @ServletComponentScan
  17. @EnableFeignClients(basePackages = {"com.workflow.bpm.api.bpmservices"})
  18. @ComponentScan(basePackages={"com.workflow.bpm.api.bpmservices","cn.com.goldenwater"})
  19. public class GwCloudPlatformDcprojServiceApplication {
  20. //打war包时使用
  21. //public class GwCloudPlatformDcprojServiceApplication extends SpringBootServletInitializer {
  22. public static void main(String[] args) {
  23. SpringApplication.run(GwCloudPlatformDcprojServiceApplication.class,args);
  24. }
  25. @Bean
  26. public XssFilter getXssFilter() {
  27. return new XssFilter();
  28. }
  29. // 打war包时使用
  30. // @Override
  31. // protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
  32. // return builder.sources(GwCloudPlatformDcprojServiceApplication.class);
  33. // }
  34. }