解决请求数据中的中文乱码问题
public static void main(String[] args) throws Exception { String hello = URLEncoder.encode("大家好才是真的好", "UTF-8"); System.out.println(hello); hello = URLDecoder.decode(hello, "UTF-8"); System.out.println(hello); }
public static void main(String[] args) throws Exception { String hello = URLEncoder.encode("大家好才是真的好", "UTF-8"); System.out.println(hello); hello = URLDecoder.decode(hello, "UTF-8"); System.out.println(hello); }