package com.zcxk.charge.xxl;

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.web.client.RestTemplate;
import springfox.documentation.swagger2.annotations.EnableSwagger2;


/**
 * @author Andy
 * @version V1.0
 **/
@EnableDiscoveryClient
@SpringBootApplication(scanBasePackages="com.zcxk")
@EnableSwagger2
@MapperScan("com.zcxk.charge.core.dao")
@EnableFeignClients
@Slf4j
public class ZoniotChargeXxlJobClientApplication {

	public static void main(String[] args) {
		log.info("=====================Zoniot-Charge-XXJOB客户端START==============");
		SpringApplication.run(ZoniotChargeXxlJobClientApplication.class, args);
		log.info("=====================Zoniot-Charge-XXJOB客户端END================");
	}

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

}
