Overview
本分步教程引导您通过使用 webforJ 和 Spring Boot 构建客户管理应用程序的过程。它教您如何创建一个现代、用户友好的界面,用于查看、添加和编辑客户数据。
每个步骤引入新的概念,并生成一个可运行的 Spring Boot 应用程序(JAR)。您可以使用 Maven 在本地启动您的应用程序,并在 Web 浏览器中与之互动。通过这种设置,您将获得快速的开发周期,前端打包以及使用 Spring Boot 内嵌服务器的生产就绪部署模型。
不需要先前的 Spring Boot 或 webforJ 经验,但您应该对 Java 和 Maven 有基本了解,以便充分利用本教程。该教程将在相关内容中介绍 Spring 概念,但对 Spring 有深入了解兴趣的读者可以访问 Spring 的主要文档 和关于 Spring Boot 的文档。
教程概念
本教程的第一部分专注于 项目设置,以准备您的 Spring Boot + webforJ 环境。接下来的步骤将介绍新特性并推动您的项目前进。通过跟随教程,您将清楚了解应用程序如何随着您实现功能而演变。
每个步骤都有相应的可运行应用程序可在 GitHub 上找到:
先决条件
您应该在开发机器上准备以下工具/资源:
- Java 21 或 25
- Maven
- 一个 Java IDE
- Git(推荐但不是必需)
查看 先决条件文章,以获取有关开发环境所需工具的更详细概述。
Project Setup
Discover where to download the tutorial project, how to navigate it, and run the apps within.
Creating a Basic App
Step 1 - Add components to an app.
Working with Data
Step 2 - Use Spring to work with data.
Routing and Composites
Step 3 - Make your app navigable.
Observers and Route Parameters
Step 4 - Use route parameters to control what content loads.
Validating and Binding Data
Step 5 - Add validation checks and bind data to the UI.
Integrating an App Layout
Step 6 - Using the AppLayout and FlexLayout components.