ImfClientApplication.java 1.2 KB
/**
 * @author mrz
 * @email 17966059@qq.com
 */
package com.tianbo.imfClient;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
//@EnableScheduling
@EnableDiscoveryClient
@EnableTransactionManagement
@MapperScan("com.tianbo.imfClient.dao")
@ComponentScan({"com.tianbo.imfClient"})
public class ImfClientApplication {

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

	@Bean
	@LoadBalanced
	RestTemplate restTemplate(RestTemplateBuilder builder){

		return builder.build();
	}
}