初探RESTful——使用Grizzly和Jersey搭建RESTful環境


Grizzly:輕量級Web容器,用來運行RESTful服務,類似於Tomcat


Jersey:是一個開源的、產品級別的JAVA框架,支持JAX-RS API並且是一個JAX-RS(JSR 311和 JSR 339)的參考實現,簡單的說,就是寫RESTful服務用的。


Grizzly的相關的依賴:

<dependency>
    <groupId>org.glassfish.grizzly</groupId>
    <artifactId>grizzly-framework</artifactId>
    <version>2.4.0</version>
</dependency>

<dependency>
     <groupId>org.glassfish.grizzly</groupId>
     <artifactId>grizzly-http</artifactId>
     <version>2.4.0</version>
</dependency>

<dependency>
     <groupId>org.glassfish.grizzly</groupId>
     <artifactId>grizzly-http-server</artifactId>
     <version>2.4.0</version>
</dependency>

<dependency>
     <groupId>org.glassfish.grizzly</groupId>
     <artifactId>grizzly-http-servlet</artifactId>
     <version>2.4.0</version>
</dependency>


<dependency>
     <groupId>org.glassfish.jersey.core</groupId>
     <artifactId>jersey-server</artifactId>
     <version>2.5.1</version>
</dependency>


<dependency>
     <groupId>org.glassfish.jersey.containers</groupId>
     <artifactId>jersey-container-servlet-core</artifactId>
     <version>2.5.1</version>
</dependency>


<dependency>
     <groupId>org.glassfish.jersey.containers</groupId>
     <artifactId>jersey-container-servlet</artifactId>
     <version>2.5.1</version>
</dependency>


<dependency>
     <groupId>org.glassfish.jersey.containers</groupId>
     <artifactId>jersey-container-grizzly2-http</artifactId>
     <version>2.11</version>
</dependency>


Jersey相關的依賴

<dependency>
     <groupId>org.glassfish.jersey.core</groupId>
     <artifactId>jersey-common</artifactId>
     <version>2.5.1</version>
</dependency>


<dependency>
     <groupId>org.glassfish.jersey.core</groupId>
     <artifactId>jersey-client</artifactId>
     <version>2.5.1</version>
</dependency>


<dependency>
     <groupId>org.glassfish.jersey.bundles.repackaged</groupId>
     <artifactId>jersey-guava</artifactId>
     <version>2.25.1</version>
</dependency>


<dependency>
     <groupId>org.glassfish.jersey.core</groupId>
     <artifactId>jersey-server</artifactId>
     <version>2.5.1</version>
</dependency>  



待續。。。。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章