快速开始
Feat Cloud 适合已经接受 Feat 技术路线,但又希望用更接近 Spring Boot 的注解式开发体验来构建应用的团队。
如果你还在评估 Feat,建议先从 Feat Core 快速开始 开始。
编写第一个应用
Section titled “编写第一个应用”你将构建一个最小的注解式 Web 应用,访问 http://localhost:8080/hello 返回 hello Feat Cloud。
前置要求:JDK 8+、Maven 3.0+、Java IDE
1. 添加依赖
Section titled “1. 添加依赖”在 pom.xml 中加入:
<!--运行期依赖--><dependency> <groupId>tech.smartboot.feat</groupId> <artifactId>feat-cloud</artifactId> <version>${feat.version}</version></dependency>
<!--编译期转码--><dependency> <groupId>tech.smartboot.feat</groupId> <artifactId>feat-cloud-starter</artifactId> <version>${feat.version}</version> <scope>provided</scope></dependency>2. 编写控制器
Section titled “2. 编写控制器”创建 Bootstrap.java:
import tech.smartboot.feat.cloud.FeatCloud;import tech.smartboot.feat.cloud.annotation.Controller;import tech.smartboot.feat.cloud.annotation.RequestMapping;
@Controllerpublic class Bootstrap {
@RequestMapping("/hello") public String helloWorld() { return "hello Feat Cloud"; }
public static void main(String[] args) { FeatCloud.cloudServer().listen(); }}关键点:@Controller 声明控制器,@RequestMapping 声明路径,FeatCloud.cloudServer().listen() 启动服务。
3. 运行并验证
Section titled “3. 运行并验证”运行 Bootstrap.main(),控制台出现以下内容说明路由注册成功:
Feat Router: |-> /hello ==> Bootstrap@helloWorldhttp://0.0.0.0:8080/访问 http://localhost:8080/hello:

curl -i http://localhost:8080/helloHTTP/1.1 200 OKContent-Type: text/plain; charset=utf-8
hello Feat Cloud完成第一个应用后,按以下顺序深入:
Controller 参数绑定、路径参数和请求方法映射。
CloudOptions 扫描范围、外部 Bean 和静态资源。
MyBatis 数据库访问与 ORM 集成。
Session 会话管理与状态保持。
MCP(可选) Model Context Protocol 集成。
部署与交付 打包、Native Image 与生产部署。