Commit 7e49db77 by mergen

Fix

parent acdde426
...@@ -124,6 +124,12 @@ ...@@ -124,6 +124,12 @@
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>
......
...@@ -6,10 +6,12 @@ import org.springframework.boot.SpringApplication; ...@@ -6,10 +6,12 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;
@SpringBootApplication @SpringBootApplication
@ComponentScan({"com.alibaba.fastjson.support.spring", "com.orhon.smartcampus.material"}) @ComponentScan({"com.alibaba.fastjson.support.spring", "com.orhon.smartcampus.material"})
...@@ -21,4 +23,10 @@ public class MaterialApplication { ...@@ -21,4 +23,10 @@ public class MaterialApplication {
SpringApplication.run(MaterialApplication.class, args); SpringApplication.run(MaterialApplication.class, args);
} }
@LoadBalanced
@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
} }
...@@ -10,7 +10,7 @@ server: ...@@ -10,7 +10,7 @@ server:
spring: spring:
application: application:
name: smartcampus-material-112233 name: smartcampus-material
profiles: profiles:
active: testenv active: testenv
jackson: jackson:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment