Hello, I’m Guide! This is the 6th issue of JavaGuide’s “Java High Quality Open Source Project Recommendations”. Each issue I will select five high quality Java open source projects to recommend to you.

Recommended portals for the first 5 projects:

  • A one-stop open source continuous testing platform based on Spring Boot + Vue.
  • Write a sandbox tower defense game in Java! Available on Steam,Apple Store
  • A Java-based visual HTTP API interface development artifact
  • A non – intrusive business code visual Java process management platform
  • A lighter Web framework than Spring!! Microsoft, Red Hat

These 5 open source projects have been included in awesome- Java.

  • Github address: github.com/CodingDocs/…
  • Gitee address: gitee.com/SnailClimb/…
  • Read online: javaguide.cn/open-source…

Guice: Lightweight dependency injection framework

Guice is a lightweight dependency injection framework from Google, which is equivalent to a lightweight Spring Boot with minimal functionality. This is useful in some cases, such as our project which only needs dependency injection and does not require features such as AOP.

An example of Guice’s Hello World is as follows:

Recommend a lighter Web framework than Spring in the 5th project!! Microsoft, Red Hat are used in the comment area, there is a foreign company friends said he used Guice framework.

Those of you doing Java backend development must not feel like you can’t do anything without Spring, and must not assume that Spring is the only choice for a Web framework. The Java ecosystem is excellent, especially in Web development, and Github has many excellent open source Web frameworks, which I will recommend later.

  • Project address: github.com/google/guic…
  • Use a: www.cnblogs.com/throwable/p…

JsonPath: JSON data processing

JsonPath is a simple and easy to use JSON data tool class library, provides JSON parsing API out of the box, built in a lot of operators and methods, support fluent API, it is very cool to use.

Suppose we have the following JSON data to work with.

If we need to read the authors of all the books, the following two lines will do the trick:

String json = "...";
List<String> authors = JsonPath.read(json, "$.store.book[*].author");
Copy the code

If we need to read books with withdrawals greater than 10, the following line should do the trick:

List<Map<String, Object>> expensiveBooks = JsonPath
                            .using(configuration)
                            .parse(json)
                            .read("$.store.book[?(@.price > 10)]", List.class);
Copy the code

Project address: github.com/json-path/J… .

Tianai-captcha: beautiful and easy to use slider verification code

Tianai-captcha is an open source Java slider verification code solution, out of the box, supporting behavior trajectory verification and obturation slider.

Project address: gitee.com/tianai/tian… .

Testcontainers: test tool libraries

Testcontainers is a junit-enabled testing tool library that provides lightweight, one-time support for common database testing, Selenium Web browser, or any other instance support that can run in a Docker container.

What is the use of the one-time common database testing support provided by Testcontainers? A quick example: Suppose we have a program that relies on Redis, and we need to write tests for it. If you test directly using locally installed Redis, this can cause a lot of trouble, which means that every developer and CI machine must have Redis installed. Also, to ensure that the tests run properly, Redis versions should be as consistent as possible. Obviously, this is not very realistic!

Thoughtworks Technical Radar Issue 26 writes:

Based on our long experience with Testcontainers, we believe it is the default option for creating a reliable environment to run automated tests. Testcontainers is a library available in multiple languages, and Docker implements common test dependencies — including different kinds of databases, queue technologies, cloud services, and UI test dependencies (such as web browsers), as well as the ability to run custom Dockerfiles on demand. It is compatible with junit-like testing frameworks and is flexible enough to allow users to manage the lifecycle and advanced networks of containers and quickly set up an integrated test environment

  • Project address: github.com/testcontain…
  • Website: www.testcontainers.org/

Libgdx:

Libgdx is a stable and mature cross-platform Java game development framework for Windows, Linux, macOS, Android, your browser, and iOS.

Also, the libgdx ecosystem has a great library of tools that can save us a lot of things.

If you want to develop games in Java, you should check this out.

Project address: github.com/libgdx/libg…

Afterword.

JavaGuide (” Java learning + Interview Guide “covers the core knowledge that most Java programmers need to master. Prepare for Java interviews, preferably JavaGuide!) , currently has 120K + Star.

Original is not easy, welcome to like to share, welcome to pay attention to my account in nuggets, I will continue to share original dry goods! Come on, rush