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.