package com.ym.mec.education;

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.scheduling.annotation.EnableAsync;
import org.springframework.web.client.RestTemplate;

import com.spring4all.swagger.EnableSwagger2Doc;

@MapperScan({"com.ym.mec.education.mapper", "com.ym.mec.biz.dal.dao","com.ym.mec.biz.config.mybatis"})
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients("com.ym.mec")
@ComponentScan(basePackages = {"com.ym.mec", "org.snaker"})
@Configuration
@EnableSwagger2Doc
@EnableAsync
public class EducationApplication {

    public static void main(String[] args) {
        SpringApplication.run(EducationApplication.class, args);
    }

    @Bean
    @LoadBalanced
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

}
