Explore Dromara’s Top Java Open‑Source Tools: Sa‑Token, Forest, LiteFlow & JPom
This article introduces four powerful Java open‑source projects from the Dromara community—Sa‑Token for lightweight permission authentication, Forest as an elegant HTTP client, LiteFlow for component‑based workflow orchestration, and JPom for lightweight DevOps—detailing their core features, usage examples, and how they boost developer productivity.
In the open‑source community, Dromara is a Java organization founded by the author of Apache ShenYu (formerly Soul Gateway) that unites multiple Java open‑source authors to share resources and promote Chinese Java open‑source development.
Sa‑Token
Sa‑Token is a lightweight Java permission authentication framework that claims to be the most feature‑complete. It provides simple APIs for login authentication, permission checks, session handling, single‑sign‑on, OAuth2.0, and micro‑service gateway authentication.
Official website: http://sa-token.dev33.cn/
Typical usage for login authentication:
// Write the current session's account id during login
StpUtil.login(10001);
// Check login status; throws NotLoginException if not logged in
StpUtil.checkLogin();Additional one‑line API examples include:
StpUtil.login(10001); // mark login
StpUtil.getLoginId(); // retrieve login id
StpUtil.isLogin(); // boolean login status
StpUtil.logout(); // logout current session
StpUtil.logoutByLoginId(10001); // force logout a specific account
StpUtil.hasRole("super-admin"); // role check
StpUtil.hasPermission("user:add"); // permission check
StpUtil.getSession(); // obtain session
StpUtil.openSafe(120); // enable secondary authentication for 120 seconds
StpUtil.checkSafe(); // verify secondary authenticationForest
Forest is a powerful Java HTTP client framework that greatly simplifies HTTP integration work. It binds HTTP request parameters to Java interfaces, allowing developers to call a Java method as if sending an HTTP request.
Official website: http://forest.dtflyx.com
Example of declaring a high‑precision map service client:
/**
* Amap service client interface
*/
@BaseRequest(baseURL = "http://ditu.amap.com")
public interface Amap {
@Get("/service/regeo")
Map getLocation(@Query("longitude") String longitude, @Query("latitude") String latitude);
}
Amap amap = Forest.client(Amap.class);
Map locationInfo = amap.getLocation("32.1242832", "56.3290434");Forest automatically assembles URL, headers, body, and supports JSON/XML conversion via annotations such as @JSONBody. Compared with Retrofit and Feign, Forest offers flexible backend selection (OkHttp or HttpClient), richer annotations (e.g., @HTTPProxy), and lightweight, non‑Spring dependencies.
LiteFlow
LiteFlow is an ultra‑lightweight, fast, stable component‑based workflow/rule engine. It decouples complex business logic into small components and orchestrates them via configurable rules (XML, YAML, JSON).
Official website: https://yomahub.com/liteflow
Component definition example:
// Ordinary component
@LiteflowComponent(id = "a", name = "Component A")
public class ACmp extends NodeComponent {
@Override
public void process() {
// business logic
}
}
// Conditional component
@LiteflowComponent(id = "b", name = "Component B")
public class BCondCmp extends NodeCondComponent {
@Override
public String processCond() {
// business logic
return "e";
}
}Rule definition (XML example):
<?xml version="1.0" encoding="UTF-8"?>
<flow>
<chain name="chain1">
<then value="a,b(c|d|e)"/>
<then value="sub_chain"/>
</chain>
<chain name="sub_chain">
<when value="f,g,h"/>
<then value="j,k"/>
</chain>
</flow>LiteFlow also supports script nodes (Groovy or QLExpress) and hot‑loading of rule files from various sources, enabling real‑time workflow updates.
JPom
JPom is a lightweight, low‑invasion DevOps tool for online building, automatic deployment, daily operations, and project monitoring, targeting small‑to‑medium teams.
Official website: https://jpom.io/
Key features include project/JAR management, real‑time console logs, one‑click online builds, multi‑node distribution, online SSH terminal with command restrictions, automatic alerts for abnormal project states, resource monitoring (CPU, RAM), Nginx/SSL management, and fine‑grained user permissions.
Create, modify, delete projects and manage JAR packages
View, backup, delete, and export console logs
One‑click online build and deployment
Multi‑node management and automatic distribution
Online SSH terminal with logging and command disabling
Real‑time project status monitoring with auto‑alert
CPU/RAM monitoring, heap dump export, process/port view, server health checks
User‑based project permission control and comprehensive operation logs
Whitelist‑based system path protection
Online Nginx configuration and SSL certificate management
Installation scripts for Linux agents and servers are provided, supporting automatic JDK, Maven, and JDK+Maven environment setup. After installation, the agent runs on port 2123 and the server on port 2122.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Programmer DD
A tinkering programmer and author of "Spring Cloud Microservices in Action"
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
