ManageAppApplication.java 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package com.energy.manage.service;
  2. import com.dtflys.forest.springboot.annotation.ForestScan;
  3. import com.energy.manage.common.mapper.MyMapper;
  4. import lombok.extern.slf4j.Slf4j;
  5. import org.springframework.boot.SpringApplication;
  6. import org.springframework.boot.autoconfigure.SpringBootApplication;
  7. import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
  8. import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
  9. import org.springframework.context.annotation.ComponentScan;
  10. import org.springframework.context.annotation.EnableAspectJAutoProxy;
  11. import org.springframework.kafka.annotation.EnableKafka;
  12. import org.springframework.scheduling.annotation.EnableAsync;
  13. import org.springframework.transaction.annotation.EnableTransactionManagement;
  14. import tk.mybatis.spring.annotation.MapperScan;
  15. @EnableKafka
  16. @EnableDiscoveryClient
  17. @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
  18. @EnableAspectJAutoProxy(exposeProxy = true)
  19. @EnableTransactionManagement
  20. @EnableAsync
  21. // com.energy.manage.common 中承载了与 energy-manage-healthcheck 共享的 CacheService 等组件
  22. @ComponentScan(basePackages = {"com.energy.manage.service", "com.energy.manage.common"})
  23. @ForestScan(basePackages = "com.energy.manage.service.client")
  24. @MapperScan(value = "com.energy.manage.service.mappers", markerInterface = MyMapper.class)
  25. @Slf4j
  26. public class ManageAppApplication {
  27. public static void main(String[] args) {
  28. SpringApplication.run(ManageAppApplication.class, args);
  29. log.info("============= ManageService Application Service Start Success =====>");
  30. }
  31. }