mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 07:23:01 +08:00
换用jdk7自带charset常量类
This commit is contained in:
parent
2923512a83
commit
065156e81b
@ -51,6 +51,7 @@ import java.io.InputStream;
|
|||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
@ -526,7 +527,7 @@ public class WxMpServiceImpl implements WxMpService {
|
|||||||
String url = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=%s";
|
String url = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=%s";
|
||||||
try {
|
try {
|
||||||
String resultUrl = String.format(url,
|
String resultUrl = String.format(url,
|
||||||
URLEncoder.encode(ticket, Charsets.UTF_8.name()));
|
URLEncoder.encode(ticket, StandardCharsets.UTF_8.name()));
|
||||||
if(needShortUrl){
|
if(needShortUrl){
|
||||||
return this.shortUrl(resultUrl);
|
return this.shortUrl(resultUrl);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user