URI is not absolute

在调用restTemplate.postForObject的时候报错URI is not absolute

URI is not absolute
	at java.net.URI.toURL(URI.java:1088) ~[na:1.8.0_301]
	at org.springframework.http.client.SimpleClientHttpRequestFactory.createRequest(SimpleClientHttpRequestFactory.java:145) ~[spring-web-5.2.12.RELEASE.jar:5.2.12.RELEASE]
	at org.springframework.http.client.support.HttpAccessor.createRequest(HttpAccessor.java:124) ~[spring-web-5.2.12.RELEASE.jar:5.2.12.RELEASE]

需要使用完整路径,在url前面加上http://

posted @ 2021-11-29 16:21  张三丰学Java  阅读(5931)  评论(0编辑  收藏  举报