
java
chao2751021
这个作者很懒,什么都没留下…
展开
-
加载Properties静态文件
一、spring加载配置文件bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> property name="location"> value>classpath:ldap.原创 2014-12-19 17:44:56 · 528 阅读 · 0 评论 -
Java正确URL解码方式:URLDecoder.decode
Java调用 URLDecoder.decode(str, "UTF-8"); 抛出以上的异常,其主要原因是% 在URL中是特殊字符,需要特殊转义一下,解决办法:使用%25替换字符串中的%号url = url.replaceAll("%(?![0-9a-fA-F]{2})", "%25"); String urlStr = URLDecoder.decode(转载 2016-01-08 12:05:51 · 1798 阅读 · 0 评论