package com.ym; import lombok.extern.slf4j.Slf4j; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.loadbalancer.LoadBalanced; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.web.client.RestTemplate; @EnableAspectJAutoProxy @Slf4j @SpringBootApplication @EnableFeignClients("com.ym.mec") @MapperScan(basePackages = {"com.ym.mec.biz.dal.dao", "com.ym.mec.biz.dal.mapper"}) @ComponentScan(basePackages = {"com.ym", "com.mec.redisson", "com.yonge.log"}) @EnableScheduling @EnableDiscoveryClient @Configuration @EnableAsync public class SealClassApplication { public static void main(String[] args) { SpringApplication.run(SealClassApplication.class, args); log.info("SealClassApplication started"); } @Bean @LoadBalanced public RestTemplate restTemplate(){ return new RestTemplate(); } }