码迷,mamicode.com
首页 > 其他好文 > 详细

Restful note

时间:2014-07-28 00:46:39      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:http   java   os   io   ar   new   amp   res   

dependencies {
    compile files(‘/home/cmwin/glassfish4/glassfish/modules/javax.ws.rs-api.jar‘)
    compile files(‘/home/cmwin/glassfish4/glassfish/modules/javax.batch-api.jar‘)
    compile files(‘/home/cmwin/glassfish4/glassfish/modules/jersey-client.jar‘)
    compile files(‘/home/cmwin/glassfish4/glassfish/modules/jersey-common.jar‘)
    compile files(‘/home/cmwin/glassfish4/glassfish/modules/jersey-container-servlet.jar‘)
    compile files(‘/home/cmwin/glassfish4/glassfish/modules/hk2-api.jar‘)
    compile files(‘/home/cmwin/glassfish4/glassfish/modules/hk2.jar‘)
    compile files(‘/home/cmwin/glassfish4/glassfish/modules/guava.jar‘)
}

public class ClientTest {    
    public static void main(String[] args) throws IOException {
          Client client = ClientBuilder.newClient();
          WebTarget target = client.target("http://localhost:8080/CssBatch/rest/sample");
          target.request().buildGet().invoke();
          System.out.println("======finished======");
    }
}


Restful note,布布扣,bubuko.com

Restful note

标签:http   java   os   io   ar   new   amp   res   

原文地址:http://my.oschina.net/u/1453451/blog/295374

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!