![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring cloud
冥冥之外
冥冥之外,鸿鹄之灾
展开
-
feign序列化子类反序列化只得到父类
情况是这样的,我要传的数据Trade包含很多的子类。我存的时候放的子类,接收到却是只有父类的数据。feign默认使用jackson进行序列化。使用完全限定类名做识别。需要在父类上加上注解。原创 2022-07-29 18:34:52 · 1044 阅读 · 4 评论 -
服务容错保护:springcloud Hystrix
pom.xml中添加Hystrix的引用 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-hystrix</artifactId> </dependency&g...原创 2018-10-22 21:53:44 · 144 阅读 · 0 评论 -
eureka搭建服务注册中心
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.6.RELEASE</version> <rel原创 2018-10-20 21:26:29 · 162 阅读 · 0 评论 -
eureka注册服务提供者
在pom.xml中引入 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.6.RELEASE</version>原创 2018-10-20 23:03:37 · 163 阅读 · 0 评论 -
eureka服务消费者
pom.xml<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> &原创 2018-10-21 14:34:20 · 422 阅读 · 0 评论 -
Ribbon RestTemplate GET 请求
ResponseEntity<String> responseEntity = restTemplate.getForEntity("http://USER-SERVICE/user?name={1}", String.class,"lgt"); String body = responseEntity.getBody();其中{1}为占位符,若希望返回user对象可以这...原创 2018-10-21 23:15:27 · 548 阅读 · 0 评论