首页 > 其他 > 详细

Restful note

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

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://my.oschina.net/u/1453451/blog/295374

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!