UriComponents(mailto:vs mailto://)

时间:2014-07-09 15:58:31

标签: email spring-mvc mailto url-scheme

这是" mailto"编码对你来说是正常的吗? (mailto:vs mailto://)

UriComponents uriComponents = UriComponentsBuilder.fromUriString("mailto://test.test@test.com?Subject=here we are ééé d'in").build();
String encodedUri = uriComponents.encode().toUriString();
System.out.println(encodedUri);

uriComponents = UriComponentsBuilder.fromUriString("mailto:test.test@test.com?Subject=here we are ééé d'in").build();
encodedUri = uriComponents.encode().toUriString();
System.out.println(encodedUri);

输出: 的

mailto://test.test@test.com?Subject=here%20we%20are%20%C3%A9%C3%A9%C3%A9%20d'in
mailto:test.test@test.com?Subject=here we are ééé d'in

spring version:4.0.5.RELEASE

0 个答案:

没有答案