朱杰兵blog

jonhney'blog
posts - 140, comments - 1, trackbacks - 0, articles - 0

     摘要: package com.what21.service.demo02; import java.io.BufferedReader;import java.io.InputStreamReader;import java.io.OutputStream;import java.net.HttpURLConnection;import java.net.URL; public cl...  阅读全文

posted @ 2016-04-26 13:06 朱杰兵 阅读(255) | 评论 (0)编辑 收藏

http://www.cnblogs.com/siqi/p/3475222.html
import java.io.InputStream; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; /**  * 通过UrlConnection调用Webservice服务  *  */ public class App {      public static void main(String[] args) throws Exception {         //服务的地址         URL wsUrl = new URL("http://192.168.1.100:6789/hello");                  HttpURLConnection conn = (HttpURLConnection) wsUrl.openConnection();                  conn.setDoInput(true);         conn.setDoOutput(true);         conn.setRequestMethod("POST");         conn.setRequestProperty("Content-Type", "text/xml;charset=UTF-8");                  OutputStream os = conn.getOutputStream();                  //请求体         String soap = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:q0=\"http://ws.itcast.cn/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" +                        "<soapenv:Body> <q0:sayHello><arg0>aaa</arg0>  </q0:sayHello> </soapenv:Body> </soapenv:Envelope>";                  os.write(soap.getBytes());                  InputStream is = conn.getInputStream();                  byte[] b = new byte[1024];         int len = 0;         String s = "";         while((len = is.read(b)) != -1){             String ss = new String(b,0,len,"UTF-8");             s += ss;         }         System.out.println(s);                  is.close();         os.close();         conn.disconnect();     } }

posted @ 2016-04-25 17:14 朱杰兵 阅读(105) | 评论 (0)编辑 收藏

isNotNull和isEmpty区别
<= 和>=需要关键字替代

posted @ 2016-04-14 10:13 朱杰兵 阅读(69) | 评论 (0)编辑 收藏

String time = DateUtils.formatDate(date, "yyyy-MM-dd HH:mm:ss");
月MM大写,分钟mm小写,HH小时大写

posted @ 2016-04-13 14:50 朱杰兵 阅读(93) | 评论 (0)编辑 收藏

t.dpt_time between to_date('2015/01/01','yyyy/mm/dd') and   
  to_date('2015/12/31','yyyy/mm/dd')
将取不到12月31日0点以后的数据
解决办法 trunc一下trunc(t.dpt_time)


posted @ 2016-04-13 13:23 朱杰兵 阅读(97) | 评论 (0)编辑 收藏

select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
select to_char(sysdate,'yyyy-mm-dd hh24:mm:ss') from dual;

'yyyy-mm-dd hh24:mi:ss':mi 分钟  'yyyy-mm-dd hh24:mm:ss':mm 月份 其中两个都是月份


posted @ 2016-03-07 11:12 朱杰兵 阅读(91) | 评论 (0)编辑 收藏

window-preference-java-code style-clean up 和formatter     导入
见worksoftware formate by eclipse plugin

posted @ 2016-01-14 16:39 朱杰兵 阅读(111) | 评论 (0)编辑 收藏

// File file=new File("F:\\top50.png");D:\worksoftware\apache-tomcat-7.0.27\apache-tomcat-7.0.27\webapps\jzbz\
File file=new File(path+"\\images\\ceairLogo.png");

HttpServletRequest request = (HttpServletRequest) Executions.getCurrent().getNativeRequest();
String path = request.getSession().getServletContext().getRealPath("/");

posted @ 2016-01-14 10:53 朱杰兵 阅读(92) | 评论 (0)编辑 收藏

varchar2(10) 可以存5个中文,10个字母

posted @ 2015-12-15 15:31 朱杰兵 阅读(107) | 评论 (0)编辑 收藏

如果让eclipse识别*.zul是xml格式文件呢:Window -->Preferences -->Generals --> Content Type -->Text --> xml --> 点击add按钮 -->输入*.zul -->Ok      这样*.zul扩展的文件eclipse会识别其为xml文件格式

posted @ 2015-10-22 09:41 朱杰兵 阅读(410) | 评论 (0)编辑 收藏

仅列出标题
共14页: First 上一页 4 5 6 7 8 9 10 11 12 下一页 Last