package com.keao.edu.cms;

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.web.client.RestTemplate;

import com.spring4all.swagger.EnableSwagger2Doc;

@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients("com.keao.edu")
@ComponentScan("com.keao.edu")
@MapperScan({"com.keao.edu.cms.dal.dao", "com.keao.edu.common.dao"})
@Configuration
@EnableSwagger2Doc
public class CmsServerApplication {

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

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