做校园文化的网站,小说网站怎么做词,学做网站 软件,网站推广该怎么做客户端使用的Content-Type为application/x-www-form-urlencoded时#xff0c;字符串中出现了空格#xff0c;base64解码时出错了#xff0c;因为原来的字符有号#xff0c;
Spring Boot 对于Content-Type为application/x-www-form-urlencoded的HTTP请求#xff0c;默认情…客户端使用的Content-Type为application/x-www-form-urlencoded时字符串中出现了空格base64解码时出错了因为原来的字符有号
Spring Boot 对于Content-Type为application/x-www-form-urlencoded的HTTP请求默认情况下会自动进行URL解码所以导致变成空格了
public static void main(String[] args) throws Exception {String decode URLDecoder.decode(, StandardCharsets.UTF_8.toString());System.out.println(decode);// 输出空格
}
让客户端进行url编码或者服务器自己处理将空格替换为号都可以的