2022年8月22日

java将list转为逗号隔开字符串

摘要: 1.只要不为空,就在后面添加逗号,最后再用subString()函数截取,去掉最后一位的逗号 List<String> test = new ArrayList<>(); String testStrings = ""; test.add("test1"); test.add("test2"); t 阅读全文

posted @ 2022-08-22 14:53 何苦-> 阅读(16185) 评论(0) 推荐(0)

@FeignClient服务之间调用

摘要: 需要使用 feign 自己的 httpclient 发送协议,引入如下依赖,即可实现get请求方式传递对象 <!-- openfeign --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring- 阅读全文

posted @ 2022-08-22 14:20 何苦-> 阅读(5825) 评论(0) 推荐(0)

Java中FeignClient发送请求时参数的传递

摘要: 首先说说FeignClient发送请求时如何传递header中的值 创建配置类在使用RequestTemplate对象之前对header里面的内容进行赋值,也就是需要传递的请求头内容,具体如下: package com.dimp.mobile.report.feign.config; import 阅读全文

posted @ 2022-08-22 14:10 何苦-> 阅读(714) 评论(0) 推荐(0)

导航