从spring-boot-admin-server 1.4.6升级到1.5.2之后的RestClientException

时间:2017-07-03 13:55:00

标签: java spring spring-mvc spring-boot spring-boot-admin

我遇到从spring-boot-admin 1.4.6迁移到1.5.2的问题。我得到了这个例外:

org.springframework.web.client.RestClientException: Could not extract response: no suitable HttpMessageConverter found for response type [interface java.util.Map] and content type [text/html;charset=UTF-8]
at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:110)
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:917)
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:901)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:655)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:628)
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:549)
at de.codecentric.boot.admin.web.client.ApplicationOperations.doGet(ApplicationOperations.java:68)
at de.codecentric.boot.admin.web.client.ApplicationOperations.getInfo(ApplicationOperations.java:53)
at de.codecentric.boot.admin.registry.StatusUpdater.queryInfo(StatusUpdater.java:85)
at de.codecentric.boot.admin.registry.StatusUpdater.updateStatus(StatusUpdater.java:71)
at de.codecentric.boot.admin.registry.StatusUpdateApplicationListener$1.run(StatusUpdateApplicationListener.java:47)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

我在整个春天的世界里都很新鲜。所以我在这里没有错误。谷歌没有帮助。

在我的application.properties中,我设置了这个信息。有一个text / html标签。

server.compression.compressableMimeTypes=application/json,application/xml,text/html,text/xml,text/plain,application/javascript,text/css

有人知道我的问题吗?管理页面工作正常。但是我的日志中有这个例外。它看起来不太好......

感谢您的帮助! : - )

1 个答案:

答案 0 :(得分:0)

如果有人有同样的错误......我自己解决了。 SecurityConfig中的某些端点被阻止。我打开它们,现在它可以工作了! :-)