共 10 篇文章 |
|
常使用的类如下: org.apache.log4j.HTMLLayout(以HTML表格形式布局) org.apache.log4j.PatternLayout(可以灵活地指定布局模式) org.apache.log4j.SimpleLayout(包含日志信息的级别和信息字符串) org.apache.log4j.TTCCLayout(包含日志产生的时间、线程、类别等信息) 配置模式: log4j.appender.appenderName.layout =className log4j.... 阅23 转1 评0 公众公开 15-06-18 17:31 |
@Produces(“application/json”)此三种请求的content-type均为“application/x-www-form-urlencoded”,使用UTF-8编码会变成“application/x-www-form-urlencoded; UTF-8”。= null) { //如果content-type以"application/x-www-form-urlencoded"开头,则处理 if (headerString.startsWith(MediaType.APPLICATION_FORM_URLENCODED)) ... 阅12560 转45 评0 公众公开 15-03-20 09:33 |
int sendNo , String imei ,String msgTitle ,String msgContent, String msgContentType (消息内容类型,原样返回),Map<String, Object> extra.int sendNo , String tag ,String msgTitle ,String msgContent ,String msgContentType ,Map<String, Object> extra.int sendNo , String alias ,String msgTitle , String msgConten... 阅343 转1 评0 公众公开 15-02-27 19:47 |
Map<String, Map<String, String>> map = Maps.newHashMap();List<Person> personList=Lists.newArrayList(new Person(1, 1, "a", "46546", 1, 20), new Person(2, 1, "ab", "46546", 0, 30), new Person(3, 1, "abc", "46546", 0, 25), new Person(4, 1, &quo... 阅3144 转11 评0 公众公开 15-02-20 11:57 |
阅33 转0 评0 公众公开 14-10-13 18:36 |
阅42 转0 评0 公众公开 14-10-12 10:02 |
使用Dom4j实现XML字符串与Docment对象的相互转换。import org.dom4j.import org.w3c.dom.//字符串转为Document对象。public org.dom4j.Document StrToXMLDocment(String xmlStr) {//Str是传入的一段XML内容的字符串。org.dom4j.//DocumentHelper.parseText(str)这个方法将传入的XML字符串转换处理后返回一个Document对象。//Document对象转为字... 阅3865 转7 评0 公众公开 14-09-04 09:53 |
JAVA中的XML文件操作组件Dom4j.jar的使用DOM4J是dom4j.org出品的一个开源XML解析包,它的网站中这样定义:Dom4j is an easy to use, open source library for working with XML, XPath and XSLT on the Java platform using the Java Collections Framework and with full support for DOM, SAX and JAXP.Dom4j是一个易用的、开源的库,用于XML... 阅53 转0 评0 公众公开 14-09-04 09:42 |
public ComboPooledDataSource ds;ds.setInitialPoolSize(Integer.parseInt(p.getProperty("initialPoolSize")));ds.setMinPoolSize(Integer.parseInt(p.getProperty("minPoolSize")));ds.setMaxPoolSize(Integer.parseInt(p.getProperty("maxPoolSize")));ds.setMaxStatements(Integer.parseInt(p.getProperty(... 阅1671 转11 评0 公众公开 14-08-24 22:35 |
for(Object obj:list){//这种遍历方式,是jdk1.5以上的版本支持的遍历方式 Element row = (Element)obj; List list_row = row.elements("ENAME");//获取ENAME节点下所有的内容,存入list_row容器中 for(Object objempno:list_row){ Element el_empno = (Element)objempno; System.out.println(el_empno.getNa... 阅52 转0 评0 公众公开 14-08-24 13:26 |