问题
Spring deprecated APPLICATION_JSON_UTF8 (application/json;charset=UTF-8
) annotation as they said:
/**
* A String equivalent of {@link MediaType#APPLICATION_JSON_UTF8}.
* @deprecated as of 5.2 in favor of {@link #APPLICATION_JSON_VALUE}
* since major browsers like Chrome
* <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=438464">
* now comply with the specification</a> and interpret correctly UTF-8 special
* characters without requiring a {@code charset=UTF-8} parameter.
*/
@Deprecated
public static final String APPLICATION_JSON_UTF8_VALUE = "application/json;charset=UTF-8";
When I sent a request to API from Chrome or command line, encoding works correctly. But, Postman is not showing correct response unless I use application/json;charset=UTF-8
for producing.
Is there any way to fix that issue on Postman?
回答1:
this has been solved in newer versions, upgrade if you still encounter the issue
来源:https://stackoverflow.com/questions/59480399/postman-utf-8-encoding-issue-when-charset-utf-8-is-not-provided-by-server