Quick Start
引入依赖
<dependency>
<groupId>io.esastack</groupId>
<artifactId>restlight-server</artifactId>
<version>${restlight.version}</version>
</dependency>
一行代码启动一个Http Server
Restlite.forServer()
.daemon(false)
.deployments()
.addRoute(route(get("/hello"))
.handle((request, response) ->
response.sendResult("Hello Restlight!".getBytes(StandardCharsets.UTF_8))))
.server()
.start();
运行并访问: http://localhost:8080/hello 即可看到输出:
Hello Restlight!
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified March 10, 2022: introduce docsy as the website framework and add docs-v1.0.0 (#120) (79630ff)