解决:Whitelabel Error Page This application has no explicit mapping for /error...UnknownHostException

2019-08-01 15:04:00 浏览数 (1)

1. 我的情况 :

springcloud 实践,启动 ribbon 工程后,请求接口报错:

代码语言:javascript复制
Whitelabel Error Page
This application has no explicit mapping for /error, 
so you are seeing this as a fallback.
Tue Jul 23 17:39:14 CST 2019
There was an unexpected error (type=Internal Server Error, status=500).
I/O error on GET request for "http://client-one/seeParam": client-one;
 nested exception is java.net.UnknownHostException: client-one

2. 原因 Language level 设置有误。

3. 项目 JDK 为1.8 ,故应该设置 Language level 为 8 :

4. 重启工程,重新注册,消费服务成功。请求接口正常。

0 人点赞