审查视图

src/main/java/com/tianbo/warehouse/WarehouseApplication.java 1.2 KB
1 2 3 4
/**
 * @author mrz
 * @email 17966059@qq.com
 */
朱兆平 authored
5 6
package com.tianbo.warehouse;
7
import org.mybatis.spring.annotation.MapperScan;
朱兆平 authored
8 9
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
10 11
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
朱兆平 authored
12
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
13
import org.springframework.context.annotation.Bean;
朱兆平 authored
14
import org.springframework.scheduling.annotation.EnableScheduling;
15
import org.springframework.transaction.annotation.EnableTransactionManagement;
16 17 18
import org.springframework.web.client.RestTemplate;

import java.time.Duration;
19
朱兆平 authored
20 21
@SpringBootApplication
@EnableScheduling
zhangFan authored
22
@EnableEurekaClient
23
@EnableTransactionManagement
24
@MapperScan("com.tianbo.warehouse.dao")
朱兆平 authored
25 26 27 28 29 30
public class WarehouseApplication {

	public static void main(String[] args) {
		SpringApplication.run(WarehouseApplication.class, args);
	}
31 32 33 34 35
	@Bean
	RestTemplate restTemplate(RestTemplateBuilder builder){
		return builder.setConnectTimeout(Duration.ofSeconds(15)).setReadTimeout(Duration.ofSeconds(15))
				.build();
	}
朱兆平 authored
36 37
}