springMvc乱码问题

Optional.ofNullable(orderName)
                        .map(e-> {
                            try {
                                return new String(e.getBytes("iso8859-1"),"utf-8");
                            } catch (UnsupportedEncodingException ex) {
                                return null;
                            }
                        })
                        .orElse(null),

也就是Optional.ofNullable(strName).map(e -> return new String(e.getBytes("iso8859-1"),"utf-8")).orElse(null);

 

相关链接

https://blog.csdn.net/qq_34160679/article/details/80207299?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-1

你可能感兴趣的:(spring,boot)