Closed chenshukun7 closed 6 years ago
map.put("nonce_str", UUID.randomUUID().toString().replace("-", "")); replace("-", "")方法只能替换一次字符"-",UUID其他的字符"-"没有被替换成"",导致nonce_str长度过长。 应将replace()改为replaceAll("-", "")
有这种情况发生!确认使用的jdk 版本是 1.7 以上吗?
1.6
map.put("nonce_str", UUID.randomUUID().toString().replace("-", "")); replace("-", "")方法只能替换一次字符"-",UUID其他的字符"-"没有被替换成"",导致nonce_str长度过长。 应将replace()改为replaceAll("-", "")