审查视图

src/main/java/com/tianbo/analysis/BootApplication.java 1.2 KB
朱兆平 authored
1 2 3 4
/**
 * @author mrz
 * @email 17966059@qq.com
 */
朱兆平 authored
5
package com.tianbo.analysis;
朱兆平 authored
6 7 8 9

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
import org.springframework.scheduling.annotation.EnableScheduling;
朱兆平 authored
16
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
@EnableTransactionManagement
朱兆平 authored
23 24
@MapperScan("com.tianbo.analysis.dao")
@ComponentScan({"com.tianbo.analysis"})
朱兆平 authored
25
public class BootApplication {
朱兆平 authored
26 27

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

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