SealClassApplication.java 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package com.ym;
  2. import lombok.extern.slf4j.Slf4j;
  3. import org.mybatis.spring.annotation.MapperScan;
  4. import org.springframework.boot.SpringApplication;
  5. import org.springframework.boot.autoconfigure.SpringBootApplication;
  6. import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
  7. import org.springframework.cloud.client.loadbalancer.LoadBalanced;
  8. import org.springframework.cloud.openfeign.EnableFeignClients;
  9. import org.springframework.context.annotation.Bean;
  10. import org.springframework.context.annotation.Configuration;
  11. import org.springframework.context.annotation.EnableAspectJAutoProxy;
  12. import org.springframework.scheduling.annotation.EnableAsync;
  13. import org.springframework.scheduling.annotation.EnableScheduling;
  14. import org.springframework.web.client.RestTemplate;
  15. @EnableAspectJAutoProxy
  16. @Slf4j
  17. @SpringBootApplication
  18. @EnableFeignClients("com.ym.mec")
  19. @MapperScan("com.ym.mec.biz.dal.dao")
  20. @EnableScheduling
  21. @EnableDiscoveryClient
  22. @Configuration
  23. @EnableAsync
  24. public class SealClassApplication {
  25. public static void main(String[] args) {
  26. SpringApplication.run(SealClassApplication.class, args);
  27. log.info("SealClassApplication started");
  28. }
  29. @Bean
  30. @LoadBalanced
  31. public RestTemplate restTemplate(){
  32. return new RestTemplate();
  33. }
  34. }