腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(1325)
视频
沙龙
1
回答
在
使用
SimpleClientHttpRequestFactory
时
,
如何
使用
标准
Spring
Boot
的
普罗米修斯
RestTemplate
指标
定制
RestTemplate
?
java
、
spring-boot
、
prometheus
、
resttemplate
、
spring-boot-actuator
根据docs,如果
使用
RestTemplateBuilder创建
RestTemplate
,然后注入,则会获取
标准
的
http客户端
指标
。但是,我们有一个自定义
的
RestTemplate
bean初始化,它不
使用
RestTeplateBuilder,而是
使用
RestTemplate
初始化,并将
SimpleClientHttpRequestFactory
);
simpleClien
浏览 320
提问于2020-11-10
得票数 1
回答已采纳
1
回答
是否存在从http.client.requests中获取AsyncResttemplate
指标
的问题?
java
、
spring-boot
、
spring-boot-actuator
、
spring-micrometer
我正试图通过微米& prometheus来监视我
的
spring
引导应用程序
的
rest模板度量。当我
使用
用ResttemplateBuilder构建
的
Resttemplate
并
使用
它调用另一个api
时
,它确实得到了预期
的
http.client.requests
指标
。但是对于AsyncResttemplate,当我用AsyncResttemplate创建并
使用
它调用另一个api
时</em
浏览 3
提问于2019-10-30
得票数 6
10
回答
弹簧
RestTemplate
超时
spring
、
rest
、
timeout
、
resttemplate
我想为我
的
web应用程序
使用
的
rest服务设置连接超时。我正在
使用
Spring
的
RestTemplate
与我
的
服务对话。我做了一些研究,我发现并
使用
了下面的xml (
在
我
的
应用程序xml中),我认为它是用来设置超时
的
。我正在
使用
Spring
3.0。我在这里也看到了同样
的
问题-- ,但是解决方案似乎没有那么干净,我更喜欢通过<em
浏览 10
提问于2012-12-12
得票数 167
回答已采纳
3
回答
Spring
RestTemplate
和代理身份验证
java
、
spring
、
spring-mvc
、
proxy
我正在尝试用
Spring
做REST调用。据我所知,正确
的
方法是
使用
RestTemplate
(?)。问题是,我
在
代理后面。这是我现在
的
代码:InetSocketAddressInetSocketAddress(host, 3128); Proxy proxy = new Proxy(Proxy.T
浏览 0
提问于2015-07-07
得票数 25
回答已采纳
1
回答
restTemplate
BufferingClientHttpRequestFactory破坏cookies
spring-boot
、
resttemplate
、
spring-resttemplate
我正在
使用
spring
boot
调用另一个服务。当我进行如下配置
时
,它没有添加从我调用
的
服务返回
的
jsessionid(cookie)。public
RestTemplate
restTemplate
(RestTemplateBuilder restTemplateBuilder) { .build();
浏览 143
提问于2021-01-22
得票数 0
4
回答
RestTemplate
--默认超时值
java
、
web-services
、
spring
、
http
、
rest
使用
Spring
的
RestTemplate
时
,默认
的
超时值是多少
RestTemplate
restTemplate
= new
RestTemplate
(); Stringresponse =
restTemplate
.getForObject("http://webservice.com/item/3455", Strin
浏览 3
提问于2012-07-18
得票数 38
回答已采纳
2
回答
Spring
RestTemplate
处理异常
java
、
spring
、
rest
、
spring-web
我正在
使用
Spring
发出
RestTemplate
请求 这是我
的
代码: public static ResponseEntity<String> makeRequest() { try { }
浏览 68
提问于2019-01-08
得票数 1
3
回答
如何
用
RestTemplate
转发大文件?
java
、
spring
、
groovy
、
resttemplate
现在,文件存储
在
文件系统上,然后构建FileSystemResource。Resource zipFile = new FileSystemResource(tempFile.getAbsolutePath());
使用
RestTemplate
转发文件而不出现OutOfMemor
浏览 0
提问于2013-04-03
得票数 41
回答已采纳
6
回答
如何
使用
注释自动连接
RestTemplate
java
、
spring
、
spring-mvc
、
resttemplate
当我尝试自动连接
Spring
RestTemplate
时
,我得到了以下错误:<context:component-scan base-package="in.myproject&qu
浏览 4
提问于2015-01-19
得票数 69
2
回答
如何
在
Spring
Boot
中获取传出http调用
的
指标
?
java
、
spring
、
metrics
我
的
Spring
Boot
应用程序调用其他提供程序,我希望测量响应所用
的
时间,但也希望测量其他东西。有没有一种干净
的
方法来做这件事,比如一些库或包?我需要与现有应用程序无缝集成
的
东西,而且我不需要用System.getCurrentTimeMillis()等包装调用。
浏览 2
提问于2018-10-02
得票数 0
2
回答
无法检索远程JWK集合: login.microsoftonline.com
spring-boot
、
spring-security
、
azure-active-directory
、
azure-ad-b2c
我正在尝试将azure广告集成到
spring
boot
应用程序中。这是我
的
WebSecurityConfig类。(UserPrincipalManager.java:86) ~[azure-
spring
-
boot
-2.2.0.jar:?]:78) [azure-
spring
-
boot
-2.2.0.jar:?](WebMvcMetricsFilter.java:117) [
spring
-
boot
-actuator-2.1.3.RELEA
浏览 87
提问于2019-12-24
得票数 0
回答已采纳
2
回答
如何
在
使用
RestTemplate
调用接口
时
捕获超时异常
java
、
spring-boot
、
resttemplate
我有函数调用api,
使用
RestTemplate
。我希望
在
超时返回null
时
捕获异常,这是我
的
代码:public List<String> getRoleUser(String username) {try{
RestTemplate
restTemplate
= new
RestTemplate
(getClientHttpRequestFa
浏览 2
提问于2019-05-06
得票数 0
1
回答
在
系统A->B->C之间发送文件,而不将整个文件存储
在
B中
java
、
spring
、
spring-mvc
我有三个独立
的
spring
应用程序 我
的
问题是,能否以这样
的
方式设置B,以便B不会将整个文件存储在内存中,而是读取传入流并将其转发给Cpublic void
浏览 3
提问于2015-12-07
得票数 14
2
回答
为OAuth2流配置
Spring
client_credentials客户端
spring-boot
、
spring-security-oauth2
我们已经为我们
的
oauth2客户端配置了以下客户机,这些配置
在
spring
1.4.0中运行得很好:@ConfigurationProperties(prefix = "(); return
restTemplate
;}
在
更新到
Spring
-
Boot
1.4.1之后,我注意到
在
自动加载OA
浏览 4
提问于2016-11-03
得票数 1
回答已采纳
1
回答
如何
让Android可以访问HTTPS请求?
android
、
spring
、
http
、
https
各位专业人士大家好,我知道
在
Android上有两个原生HTTP客户端,一个是
标准
的
J2SE工具,另一个是HttpComponents HttpClient。
标准
JS2SE功能通过
SimpleClientHttpReque
浏览 0
提问于2013-05-09
得票数 0
回答已采纳
3
回答
如何
从
RestTemplate
获取重定向url?
java
、
spring
、
url
、
redirect
、
resttemplate
我想用http GET调用
RestTemplate
,并检索状态码和重定向
的
url (如果有)。
如何
做到这一点呢?
浏览 0
提问于2016-08-05
得票数 3
回答已采纳
1
回答
一次性基本身份验证
java
、
spring
、
spring-boot
、
resttemplate
我开发了一个
spring
-
boot
应用程序。当我需要做REST请求
时
(POST,PUT...)我每次都
使用
这样
的
基本身份验证 ResponseEntity<IssueDataWrapper> response =
restTemplate
.exchange(urlJ
浏览 0
提问于2016-12-02
得票数 0
2
回答
OAuth2
RestTemplate
中
的
代理配置
proxy
、
spring-security-oauth2
、
oauth-2.0
、
oauth2client
我需要
使用
一个由OAuth2保护
的
API。为此,我正在
使用
OAuth2
RestTemplate
。我知道
如何
在
RestTemplate
中设置代理:
SimpleClientHttpRequestFactory
clientHttpRequestFactory = new
SimpleClientHttpRequestFactory
restTemplate
=新
RestTemplate
(clientHttp
浏览 4
提问于2016-08-10
得票数 8
2
回答
无法
使用
带有自定义拦截器
的
spring
rest模板发布大文件
java
、
spring
、
large-files
、
resttemplate
我尝试
使用
spring
rest模板POST和自定义拦截器将一个大文件从一个微服务发布到另一个微服务,如下所示:requestFactory.setBufferRequestBody(false);
restTemp
浏览 0
提问于2017-06-27
得票数 4
1
回答
在内存中保留
RestTemplate
是否比为每个请求创建新
的
RestTemplate
更好?
java
在内存中保留
RestTemplate
是否比为每个请求创建新
的
RestTemplate
更好?exampleMethod() {
restTemplate
.getForObje
浏览 47
提问于2021-06-02
得票数 0
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
Spring RestTemplate终极使用归纳总结
Spring Cloud 与 K8s 的微服务设计
Consul 初步实现服务注册发现,配置中心,负载均衡
Ribbon 基础学习
Spring Cloud Hystrix项目展望:为云原生 Java 项目提供持续支持
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券