1

如何在我的 Spring Web 应用程序中解决这个问题?它在 JDK 1.7、Spring 4.1.3 RELEASE 和 WebLogic 10 中运行,但是当我们升级 JDK 1.8、Spring 4.1.3 RELEASE 和 Weblogic 12.2 时它失败了。我们可以增加RestTemplate. 请告诉我

请找出以下错误

**<h1>Bad Message 431</h1><pre>reason: Request Header Fields Too Large</pre>"
2020-11-10 12:06:05.574 headers [DEBUG] http-outgoing-0 << HTTP/1.1 431 Request Header Fields Too Large
2020-11-10 12:06:05.574 headers [DEBUG] http-outgoing-0 << Content-Type: text/html;charset=iso-8859-1
2020-11-10 12:06:05.574 headers [DEBUG] http-outgoing-0 << Content-Length: 74
2020-11-10 12:06:05.590 headers [DEBUG] http-outgoing-0 << nnCoection: close
2020-11-10 12:06:05.590 MainClientExec [DEBUG] Connection can be kept alive indefinitely
2020-11-10 12:06:05.590 PoolingHttpClientConnectionManager [DEBUG] Connection [id: 0][route: {s}-> can be kept alive indefinitely
2020-11-10 12:06:05.590 DefaultManagedHttpClientConnection [DEBUG] http-outgoing-0: set socket timeout to 0
2020-11-10 12:06:05.590 PoolingHttpClientConnectionManager [DEBUG] Connection released: [id: 0][route: {s}->][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
2020-11-10 12:06:05.605 ServiceImpl [ERROR] ValidateToken Service failed with this exception: <h1>Bad Message 431</h1><pre>reason: Request Header Fields Too Large</pre>
2020-11-10 12:06:05.637 ExceptionControllerAdvice [ERROR] Unhandled exception.
java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
at com.agreement.rest.domain.Exception.fromJsonToException(Exception.java:78)**
4

1 回答 1

0

我已经使用 HTTPURLConnection 解决了这个问题

于 2021-04-22T07:05:06.097 回答