Giter VIP home page Giter VIP logo

jax-rs2-guide-ii's Introduction

《Java Restful Web Service实战·第二版》示例源代码

codecov

book cover png

Build

git clone https://github.com/feuyeux/jax-rs2-guide-II.git
cd jax-rs2-guide-II
mvn clean install -DskipTests

源代码目录

  1. 1.5.my-first-service
  2. 1.5.my-first-webapp
  3. 1.6.1.myrest-servlet2-webxml
  4. 1.6.2.myrest-servlet3-webxml
  5. 1.6.3.myrest-subservlet
  6. 1.6.4.myrest-servlet3-application
  7. 1.6.5.myrest-servlet2-rc
  8. 1.6.6.myrest-servlet2-application
  9. 1.6.7.myrest-servlet3-application
  10. 2.simple-service-3
  11. 2.2.simple-service-jackson
  12. 2.3.6-1.simple-service-moxy
  13. 2.3.6-2.simple-service-jsonp
  14. 2.3.6-3.simple-service-jackson
  15. 2.3.6-4.simple-service-jettison
  16. 2.3.simple-service-jettison
  17. 2.simple-service-3
  18. 3.jaxrs2-handle
  19. 4.2 JAX-RS2的异步机制
  20. 4.4 基于HTML5的异步通信
  21. 5 REST 客户端
  22. 6.rest-test
  23. 7.2 Spring-boot基础
  24. 7.3.1 Spring Cloud Zookeeper示例
  25. 7.3.2 Spring Cloud Consul示例
  26. 7.3.3 Spring Cloud Etcd示例
  27. 8.2 REST服务的容器化
  28. 8.3 容器化微服务
  29. 9.simple-service
  30. 10.3.security-rest
  31. 10.5.oauth2-rest

Jersey官方文档

Jersey User Guide

Jersey问答

Jersey StackOverflow

Jersey Maven仓库

GlassFish Jersey Core

Jersey发布历史

https://projects.eclipse.org/projects/ee4j.jersey

版本号 发布日期 发版说明
Jakarta EE 11
Jakarta RESTful Web Services 4.0
4.0.0 2024-04-10 Jersey 4.0.0
Jakarta EE10
Jakarta RESTful Web Services 3.1
3.1.6 2024-04-05 Jersey 3.1.6
3.1.5 2023-12-12 Jersey 3.1.5
3.1.3 2023-07-19 Jersey 3.1.3
3.1.2 2023-05-17 Jersey 3.1.2
3.1.1 2023-01-31 Jersey 3.1.1
3.1.0 2022-06-22 Jersey 3.1.0
Jakarta EE9
Jakarta RESTful Web Services 3.0
3.0.11 2023-07-12 Jersey 3.0.11
3.0.10 2023-03-31 Jersey 3.0.10
3.0.9 2022-12-23 Jersey 3.0.9
3.0.8 2022-09-02 Jersey 3.0.8
3.0.5 2022-06-15 Jersey 3.0.5
3.0.4 2022-02-09 Jersey 3.0.4
3.0.2 23/Aug/21 Jersey 3.0.2
3.0.1 27Jan/21 Jersey 3.0.1
3.0.0 01/Dec/20 Jersey 3.0.0
Jakarta EE8
Jakarta RESTful Web Services 2.1
2.42 2024-03-19 Jersey 2.42
2.41 2023-10-20 Jersey 2.41
2.40 2023-06-23 Jersey 2.40
2.39 2023-02-17 Jersey 2.39
2.38 2022-12-22 Jersey 2.38
2.37 2022-09-06 Jersey 2.37
2.36 2022-06-13 Jersey 2.36
2.35 2021-09-03 Jersey 2.35
2.34 16/Aug/21 Jersey 2.34
2.33 18/Dec/20 Jersey 2.33
2.32 25/Sep/20 Jersey 2.32
2.31 22/May/20 Jersey 2.31
2.30.1 21/Feb/20 Jersey 2.30.1
2.30 10/Jan/20 Jersey 2.30
2.29.1 10/Sep/19 Jersey 2.29.1
2.29 12/Aug/19 Jersey 2.29
2.28 25/Jan/19 Jersey 2.27
2.27 13/Apr/18 Jersey 2.27
2.26 06/Sep/17 Jersey 2.26
2.25 08/Dec/16 Jersey 2.25
2.24.1 21/Nov/16 Jersey 2.24.1
2.24 27/Oct/16 Jersey 2.24
2.23.2 08/Aug/16 Jersey 2.23.2
2.23.1 07/Jun/16 Jersey 2.23.1
2.23 18/May/16 Jersey 2.23
2.22.2 16/Feb/16 Jersey 2.22.2
2.22.1 07/Oct/15 Jersey 2.22.1
2.22 23/Sep/15 Jersey 2.22
2.21.1 16/Sep/15 Jersey 2.21.1
2.21 15/Aug/15 Jersey 2.21
2.20 06/Aug/15 Jersey 2.20
2.19 29/Jun/15 Jersey 2.19
2.18 05/Jun/15 Jersey 2.18
2.17 11/Mar/15 Jersey 2.17
2.16 11/Feb/15 Jersey 2.16
2.15 03/Dec/14 Jersey 2.15
2.14 01/Oct/14 Jersey 2.14
2.13 30/Sep/14 Jersey 2.13
2.12 26/Aug/14 Jersey 2.12
2.11 23/Jul/14 Jersey 2.11
2.10.1 01/Jul/14 Jersey 2.10.1
2.10 24/Jun/14 Jersey 2.10
2.9.1 30/May/14 Jersey 2.9.1
2.9 23/May/14 Jersey 2.9
2.8 29/Apr/14 Jersey 2.8
2.7 13/Mar/14 Jersey 2.7
2.6 19/Feb/14 Jersey 2.6
2.5.1 02/Jan/14 Jersey 2.5.1
2.5 18/Dec/13 Jersey 2.5
2.4.1 08/Nov/13 Jersey 2.4.1
2.4 25/Oct/13 Jersey 2.4
2.3.1 27/Sep/13 Jersey 2.3.1
2.3 20/Sep/13 Jersey 2.3
2.2 14/Aug/13 Jersey 2.2
2.1 15/Jul/13 Jersey 2.1
2.0.1 03/Jan/14 Jersey 2.1
2.0 28/May/13 Jersey 2.0

Star History

Star History Chart

jax-rs2-guide-ii's People

Contributors

celebrate-future avatar dependabot[bot] avatar feuyeux avatar slimming-fat avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jax-rs2-guide-ii's Issues

the issues of 4.4.sse->src->test/java/com/examples/sse->SseBroadcaseTest.java

There may be some issues because the "for loop" does not call the method "doneLatch.countDown", and the main thread will be suspended forever. In a word, it seems that the callback function has been losted. Should it be like this:
for (int i = 0; i < MAX_COUNT; i++) { final WebTarget endpoint = target().path("broadcast/book").queryParam("clientId", i + 1); readerEventSources[i] = EventSource.target(endpoint).build(); readerEventSources[i].register(new EventListener(){ @Override public void onEvent(InboundEvent inboundEvent) { try{ String data = inboundEvent.readData(String.class); System.out.println("What the server response: " + inboundEvent.getId() + " : " +inboundEvent.getName() + " : " + data); Assert.assertEquals(newBookName,data); doneLatch.countDown(); }catch (ProcessingException e){ System.out.println(e.getMessage()); } } }); }

同学,您这个项目引入了261个开源组件,存在59个漏洞,辛苦升级一下

检测到 feuyeux/jax-rs2-guide-II 一共引入了261个开源组件,存在59个漏洞

漏洞标题:Vmware VMware Spring Security 权限许可和访问控制问题漏洞
缺陷组件:org.springframework.security:[email protected]
漏洞编号:CVE-2021-22112
漏洞描述:Vmware VMware Spring Security是美国威睿(Vmware)公司的一套为基于Spring的应用程序提供说明性安全保护的安全框架。
VMware Spring Security 中存在权限许可和访问控制问题漏洞。该漏洞源于攻击者可以通过Spring Security的多个SecurityContext更改绕过限制,以提升其权限。以下产品及版本受到影响:Spring Security 5.4.0 至 5.4.3 版本, Spring Security 5.3.0.RELEASE 至 5.3.7.RELEASE 版本, Spring Security 5.2.0.RELEASE 至 5.2.8.RELEASE 版本。
影响范围:(∞, 5.2.9.RELEASE)
最小修复版本:5.2.9.RELEASE
缺陷组件引入路径:org.feuyeux.restful:[email protected]>org.springframework.security:[email protected]>org.springframework.security:[email protected]
org.feuyeux.restful:[email protected]>org.springframework.security:[email protected]>org.springframework.security:[email protected]>org.springframework.security:[email protected]
org.feuyeux.restful:[email protected]>org.springframework.security:[email protected]>org.springframework.security:[email protected]>org.springframework.security:[email protected]

另外还有59个漏洞,详细报告:https://mofeisec.com/jr?p=i759e1

broken dependency reference

The file (5.jaxrs2-client/pom.xml) includes broken dependency reference.

  <dependency>
      <groupId>com.example</groupId>
      <artifactId>example-common</artifactId>
      <version>1.0-SNAPSHOT</version>
  </dependency>

Also redundant import (import org.springframework.boot.actuate.system.ApplicationPidFileWriter; and import javax.ws.rs.container.PreMatching;) in file (com.example.BootConsulApplication).
And redundant import (import javax.persistence.*;) in file (com.example.client.entity.Book).

rest() 封装不应该每次都创建client.

jax-rs2-guide-II/5.jaxrs2-client/src/main/java/com/example/client/PoolingClient.java

读书的时候看到这块感觉很奇怪, 因为Client是要尽量重用的, 而且这里的程序里PoolingClient 构造函数明明创建了一个支持connection pool 的client 实例变量.

下面的 "//关注点1:构造Client" 应该删掉吧?

public T rest(String method, String requestUrl,
                  Set<Pair<String, Object>> headParams, Set<Pair<String, Object>> queryParams,
                  MediaType requestDataType, Class<T> returnType, T requestData) {
        //关注点1:构造Client
        if (clientConfig == null) {
            clientConfig = new ClientConfig();
        }
        Client client = ClientBuilder.newClient(clientConfig);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.