解决请求数据中的中文乱码问题

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);
}

 

 

posted @ 2017-09-05 15:18  BINGJJFLY  阅读(361)  评论(0编辑  收藏  举报