|
|
@@ -1,23 +1,13 @@
|
|
1
|
1
|
package com.unissoft;
|
|
2
|
2
|
|
|
3
|
|
-import com.fasterxml.jackson.annotation.PropertyAccessor;
|
|
4
|
3
|
import org.mybatis.spring.annotation.MapperScan;
|
|
5
|
4
|
import org.springframework.boot.SpringApplication;
|
|
6
|
5
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
7
|
6
|
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
|
|
7
|
+import org.springframework.cloud.client.loadbalancer.LoadBalanced;
|
|
8
|
8
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
|
9
|
9
|
import org.springframework.context.annotation.Bean;
|
|
10
|
|
-import org.springframework.data.redis.connection.RedisConnectionFactory;
|
|
11
|
|
-import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
|
12
|
|
-import org.springframework.data.redis.core.RedisTemplate;
|
|
13
|
|
-import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
|
|
14
|
|
-import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
|
|
15
|
|
-import org.springframework.data.redis.serializer.RedisSerializer;
|
|
16
|
|
-import org.springframework.data.redis.serializer.StringRedisSerializer;
|
|
17
|
|
-import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
|
18
|
|
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
|
19
|
|
-import com.fasterxml.jackson.annotation.PropertyAccessor;
|
|
20
|
|
-import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
10
|
+import org.springframework.web.client.RestTemplate;
|
|
21
|
11
|
|
|
22
|
12
|
|
|
23
|
13
|
@SpringBootApplication
|
|
|
@@ -26,6 +16,12 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
26
|
16
|
@MapperScan("com.unissoft.mapper")
|
|
27
|
17
|
public class BusinessStart {
|
|
28
|
18
|
|
|
|
19
|
+ @Bean
|
|
|
20
|
+ @LoadBalanced
|
|
|
21
|
+ public RestTemplate restTemplate() {
|
|
|
22
|
+ return new RestTemplate();
|
|
|
23
|
+ }
|
|
|
24
|
+
|
|
29
|
25
|
public static void main(String[] args) {
|
|
30
|
26
|
SpringApplication.run(BusinessStart.class, args);
|
|
31
|
27
|
}
|