Solon v3.0.1

Java “新式”应用开发框架:克制、简洁、高效、开放、生态。

并发高 300%;内存省 50%;启动快 10 倍;打包小 90%;同时支持 java8 ~ java22, native 运行时。
Java
Kotlin
Groovy
@Controller
public class App {
    public static void main(String[] args) {
        Solon.start(App.class, args, app -> {
            //手写模式
            app.get("/hello1", ctx -> ctx.output("Hello world!"));
        });
    }

    //注解模式
    @Get
    @Socket
    @Mapping("/hello2")
    public String hello2(String name) {
        return String.format("Hello %s!", name);
    }
}
@Controller
class App {
    static void main(String[] args){
        Solon.start(App.class, args, app->{
            //手写模式
            app.get("/hello1", ctx -> ctx.output("Hello world!"))
        })
    }
    
    //注解模式
    @Get
    @Socket
    @Mapping("/hello2")
    String hello(@Param(defaultValue = "world") String name) {
        return String.format("Hello %s!", name)
    }
}
@Controller
class App {
    //注解模式
    @Get
    @Socket
    @Mapping("/hello2")
    fun hello(@Param(defaultValue = "world") name: String): String {
        return String.format("Hello %s!", name)
    }
}

fun main(args: Array<String>) {
    Solon.start(App::class.java, args) { app ->
        //手写模式
        app.get("/hello1") { ctx -> ctx.output("Hello world!") }
    }
}

  • 代码提交历史(1.4万)

  • 社区

    1. 92contributors
    2. 5.8Kgithub + gitee stars
    3. 861github + gitee forks
    4. 820releases
  • 近半年下载量(1164万)

开源合作伙伴、赞助商 (我也要赞助)