审查视图

src/main/java/com/tianbo/imfClient/ImfClientApplication.java 1.1 KB
朱兆平 authored
1 2 3 4 5 6 7 8 9
/**
 * @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;
朱兆平 authored
10 11 12 13 14
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;
朱兆平 authored
15 16
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
朱兆平 authored
17
import org.springframework.web.client.RestTemplate;
朱兆平 authored
18 19

@SpringBootApplication
朱兆平 authored
20
//@EnableScheduling
朱兆平 authored
21
@EnableDiscoveryClient
朱兆平 authored
22 23
@EnableTransactionManagement
@MapperScan("com.tianbo.imfClient.dao")
朱兆平 authored
24
public class ImfClientApplication {
朱兆平 authored
25 26

	public static void main(String[] args) {
朱兆平 authored
27
		SpringApplication.run(ImfClientApplication.class, args);
朱兆平 authored
28 29
	}
朱兆平 authored
30 31 32 33 34 35
	@Bean
	@LoadBalanced
	RestTemplate restTemplate(RestTemplateBuilder builder){

		return builder.build();
	}
朱兆平 authored
36 37
}