ImfClientApplication.java
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* @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")
public class ImfClientApplication {
public static void main(String[] args) {
SpringApplication.run(ImfClientApplication.class, args);
}
@Bean
@LoadBalanced
RestTemplate restTemplate(RestTemplateBuilder builder){
return builder.build();
}
}