DEV Community

Solon Framework
Solon Framework

Posted on

Getting Started with Solon 4.0: A Modern Java Framework That Puts Performance First

Getting Started with Solon 4.0: A Modern Java Framework That Puts Performance First

I've been working with Java frameworks for a while — started with Spring Boot back in the 1.x days, watched it grow into the ecosystem it is today. But lately, I've been exploring alternatives, and one that genuinely surprised me is Solon.

Solon isn't new (it's been around since 2018), but version 4.0, released just a couple of weeks ago, marks a significant milestone. I wanted to share a practical walkthrough — what Solon is, why it's worth your attention, and how to get started in under 5 minutes.


What Is Solon?

Solon is a next-generation Java application development framework. It's built from scratch (not a wrapper around existing specs), and follows four core principles:

  • 克制 (Restraint) — A tiny kernel of ~0.3MB. No bloat, no compromises.
  • 高效 (Efficiency) — 300%–700% higher concurrency, 50% less memory, 10x faster startup, 90% smaller packages.
  • 开放 (Openness) — Own specification standard, compatible with Java 8 through Java 26, GraalVM Native Image support.
  • 生态 (Ecosystem) — 300+ plugins covering Web, Cloud, AI, Data, Security, Scheduling, and more.

It's Apache 2.0 licensed, developed by the Noear team (Hangzhou, China), and backed by 90+ enterprise users including Meituan, Kuaishou (快手), Gree, China Life Insurance, and CETC.


The Numbers That Got My Attention

Let's be honest — performance claims are cheap without benchmarks. Here's what I verified:

TechEmpower Benchmarks

Solon consistently ranks competitively in the TechEmpower Web Framework Benchmarks. But what's more concrete is the head-to-head comparison from the official docs:

Server Size QPS (Requests/sec)
Solon (SmartHTTP - AIO) 0.7MB ~166,000
Solon (JDK HTTP - BIO) 0.2MB ~64,000
Solon (Jetty - NIO) 2.2MB ~123,000
Solon (Undertow - NIO) 4.5MB ~120,000
Spring Boot (Tomcat) 16.1MB ~32,000
Spring Boot (Jetty) 16MB ~37,000
Spring Boot (Undertow) 16.8MB ~44,000

Source: Solon official feature page

That's not a small difference — we're talking 3-5x the throughput with 1/20th the package size. In containerized and serverless environments, this translates directly to cost savings.

Community Growth

Metric Value
GitHub + Gitee Stars 6,800+
Contributors 124
Commits 17,000+
Maven Releases 984
Downloads (last 6 months) 12,000,000+
Enterprise Users 90+

These aren't vanity metrics — 12 million downloads in half a year suggests real production usage.


5-Minute Quickstart

Enough with the numbers. Let's write some code.

Step 1: Create a Project

The fastest way is to download a Maven template from the Solon Initializr, or just use this minimal pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
         http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example</groupId>
    <artifactId>solon-demo</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>

    <parent>
        <groupId>org.noear</groupId>
        <artifactId>solon-parent</artifactId>
        <version>4.0.2</version>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.noear</groupId>
            <artifactId>solon-web</artifactId>
        </dependency>
    </dependencies>
</project>
Enter fullscreen mode Exit fullscreen mode

Step 2: Write Your First Controller

package com.example.demo;

import org.noear.solon.annotation.*;

@Controller
public class DemoController {

    @Mapping("/hello")
    public String hello(@Param(defaultValue = "world") String name) {
        return String.format("Hello %s!", name);
    }
}
Enter fullscreen mode Exit fullscreen mode

Step 3: Add the Main Class

package com.example.demo;

import org.noear.solon.Solon;

public class App {
    public static void main(String[] args) {
        Solon.start(App.class, args);
    }
}
Enter fullscreen mode Exit fullscreen mode

That's it. No @SpringBootApplication, no @EnableAutoConfiguration, no XML config files.

Step 4: Run & Test

# Start
mvn exec:java

# Or build and run
mvn clean package -DskipTests
java -jar target/solon-demo.jar

# Test it
curl "http://localhost:8080/hello?name=Solon"
# → Hello Solon!
Enter fullscreen mode Exit fullscreen mode

Startup time? On my MacBook, it's under 1 second for a basic web app. Not "warm-up" time — actual ready-to-serve time.


What Makes Solon Different?

1. No Servlet Container Dependency

Solon doesn't depend on Servlet API or Java EE. It has its own lightweight HTTP server abstraction. You can choose from multiple server implementations:

  • SmartHTTP (AIO, NIO-based, ~0.7MB) — best performance
  • JDK HTTP Server (~0.2MB) — minimal footprint
  • Jetty (~2.2MB) — Servlet API compatible
  • Undertow (~4.5MB) — Servlet API compatible

Each is a separate Maven dependency, so you only ship what you use.

2. Multi-Language Support

Solon works with Java, Kotlin, and Groovy — all first-class citizens, not afterthoughts:

@Controller
class App {
    @Get
    @Mapping("/hello")
    fun hello(@Param(defaultValue = "world") name: String): String {
        return "Hello $name!"
    }
}
Enter fullscreen mode Exit fullscreen mode

3. 300+ Plugins — True Ecosystem Coverage

Solon's plugin ecosystem covers virtually every scenario you'd need in production:

Category Plugins
Web MVC, SSE, WebSocket, Reactive, RESTful
Data MyBatis, MyBatis-Flex, JPA, jDBI, Hibernate, MongoDB, Redis
Cloud Nacos, Consul, Eureka, Gateway, Config, Tracing
AI LLM integration (OpenAI, Ollama, etc.), MCP protocol, Agent framework
Security Sa-Token, OAuth2, JWT, RBAC
Flow Workflow engine, rule engine, state machine
Scheduling Cron jobs, distributed scheduling
Testing JUnit 5 integration, mock support

4. Java 8 to 26 — One Framework, All Versions

This might sound trivial, but if you've ever tried to upgrade a Spring Boot 2.x project to Spring Boot 3.x (and the Jakarta migration nightmare), you'll appreciate this: Solon supports Java 8 through Java 26 with the same API. No breaking package renames, no forced migration.


What's New in Solon 4.0

The v4.0 release (June 10, 2026) brought several meaningful improvements:

AI Ecosystem Overhaul

  • Skill → Talent renaming: Framework-level capabilities are now "Talents" to avoid confusion with Agent skills. Cleaner semantics.
  • MCP Protocol v2025-11-25: Full support for the latest Model Context Protocol, including ServerTransportSecurityValidator for authentication.
  • Context Compression: The ContextCompressionInterceptor (renamed from SummarizationInterceptor) now compresses at onReasonStart instead of onObservation, preventing intermediate state loss in long agent conversations.

Plugin Normalization

Several popular third-party integrations moved from the Solon repository to their official maintainers:

  • mybatis-plus-solon-plugincom.baomidou:mybatis-plus-solon-plugin
  • sa-token-solon-plugincn.dev33:sa-token-solon-plugin
  • liteflow-solon-plugincom.yomahub:liteflow-solon-plugin
  • And more (forest, sms4j, beetlsql, dbvisitor...)

This is a healthy sign of ecosystem maturity — upstream projects are investing in Solon compatibility.

API Cleanup

v4.0 removed deprecated APIs accumulated over years. If you're upgrading from 3.10.x, the migration path is well-documented: upgrade to 3.10.7 first → fix deprecation warnings → jump to 4.0.


Should You Try Solon?

If you're happy with your current stack and productivity is great — keep going. But if you're:

  • Starting a greenfield project and want to minimize infrastructure cost
  • Running microservices where every MB of memory and ms of startup time matters
  • Deploying to serverless/container environments where cold starts are painful
  • Maintaining legacy Java 8/11 systems and want a modern framework without a forced JDK upgrade
  • Curious about alternatives to the Spring-dominated ecosystem

...then Solon is absolutely worth a weekend project to kick the tires.

The best part? It took me longer to write this article than to build my first Solon app. The learning curve is genuinely shallow if you're familiar with annotation-based Java frameworks.


Links

Resource URL
Official Site solon.noear.org
GitHub github.com/opensolon/solon
Documentation solon.noear.org/article/learn-start
Project Generator solon.noear.org/start/
TechEmpower Benchmarks techempower.com

This article uses Solon version 4.0.2, the latest stable release as of June 2026. All performance data is sourced from the official documentation and TechEmpower benchmarks.

Top comments (0)