Tag: 代码

【原】spring-mvc的返回结果支持根据参数输出xml或者json格式配置

wiflish | 代码, 技术 | 2014-05-15
spring-mvc.xml配置 <mvc:message-converters register-defaults="true"> <bean class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter"> <property name="features"> <list> <value>WriteDateUseDateFormat</valu... [阅读全文]

判定字符串是否被URLEncode过

wiflish | 代码, 技术 | 2014-05-08
public static boolean isUrlEncoded(String value, String encode) { try { String theEncode = defaultEncode; if (encode != null && !"".equals(encode)) { theEncode = encode; } String decode = URLDecoder.decode(value, theEncode); if (!value.equals(decode)) { return true; } return false; } catch (Ex... [阅读全文]
Ɣ回顶部