123456789101112131415161718192021222324252627282930313233343536 |
- package com.keao.edu.task;
- import org.mybatis.spring.annotation.MapperScan;
- import org.springframework.boot.SpringApplication;
- import org.springframework.boot.autoconfigure.SpringBootApplication;
- import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
- import org.springframework.cloud.client.loadbalancer.LoadBalanced;
- import org.springframework.cloud.openfeign.EnableFeignClients;
- import org.springframework.context.annotation.Bean;
- import org.springframework.context.annotation.ComponentScan;
- import org.springframework.context.annotation.Configuration;
- import org.springframework.scheduling.annotation.EnableAsync;
- import org.springframework.web.client.RestTemplate;
- import com.spring4all.swagger.EnableSwagger2Doc;
- @SpringBootApplication
- @EnableDiscoveryClient
- @EnableFeignClients("com.keao.edu")
- @MapperScan({"com.keao.edu.task.dal.dao","com.keao.edu.common.dao"})
- @ComponentScan("com.keao.edu")
- @Configuration
- @EnableSwagger2Doc
- @EnableAsync
- public class TaskApplication {
- public static void main(String[] args) {
- SpringApplication.run(TaskApplication.class, args);
- }
-
- @Bean
- @LoadBalanced
- public RestTemplate restTemplate(){
- return new RestTemplate();
- }
- }
|