| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Welcome to the tinystruct framework documentation. This documentation provides comprehensive guidance for using and developing with the tinystruct framework.
欢迎查阅 tinystruct 框架文档。本文档为使用和开发 tinystruct 框架提供全面的指导。
The fastest way to get started is using the tinystruct archetype:
# Follow the archetype to create a project quickly
https://github.com/tinystruct/tinystruct-archetypeAdd the dependency to your pom.xml:
<dependency>
<groupId>org.tinystruct</groupId>
<artifactId>tinystruct</artifactId>
<version>1.7.29</version>
<classifier>jar-with-dependencies</classifier>
</dependency>package tinystruct.examples;
import org.tinystruct.AbstractApplication;
import org.tinystruct.ApplicationException;
import org.tinystruct.system.annotation.Action;
import org.tinystruct.system.annotation.Action.Mode;
public class Example extends AbstractApplication {
@Override
public void init() {
// Initialization code
}
@Override
public String version() {
return "1.0";
}
@Action("praise")
public String praise() {
return "Praise the Lord!";
}
@Action("say")
public String say(String words) {
return words;
}
// HTTP method-specific actions
@Action(value = "hello", mode = Mode.HTTP_GET)
public String helloGet() {
return "GET";
}
@Action(value = "hello", mode = Mode.HTTP_POST)
public String helloPost() {
return "POST";
}
}Running 30s test @ http://127.0.0.1:8080/?q=say/Praise the Lord! 12 threads and 400 connections Requests/sec: 86753.98 Transfer/sec: 17.46MB Latency: 17.44ms (avg)
tinystruct follows a modular, action-oriented architecture that enables:
If you'd like to contribute to this documentation, please: 如果您想为此文档做出贡献,请:
This documentation is licensed under the same terms as the tinystruct framework (Apache License 2.0). 本文档采用与 tinystruct 框架相同的许可条款。
| Back | FazBrowse Home | New Git URL |