This repository is the official Spring PetClinic sample application, a classic web application for managing a veterinary clinic's owners, pets, and visits. It is built as a Spring Boot monolith using Spring MVC, Spring Data JPA, Thymeleaf templating, and an H2 in-memory database by default, with optional MySQL and PostgreSQL backends. The application demonstrates a wide range of Spring Boot features including caching (JCache), internationalization (10+ languages), form validation, custom formatters, and comprehensive testing with JUnit 5, Mockito, and Testcontainers. It also includes a JMeter load test plan, Kubernetes deployment manifests, and CI/CD workflows for Maven and Gradle. The architecture follows a standard layered pattern: controllers handle HTTP requests, repositories provide data access via Spring Data JPA, and Thymeleaf templates render the UI. Domain models use a clean inheritance hierarchy (BaseEntity, NamedEntity, Person) to reduce duplication. The codebase is well-structured and serves as a reference for Spring Boot best practices, though it is intentionally a sample and not a production-ready system. It is actively maintained by the Spring team and tracks the latest Spring Boot releases. Key functional areas include owner management (CRUD with search), pet management (with duplicate name detection), visit scheduling (with future-date validation), and a veterinarian listing page. The application also includes a crash controller to demonstrate error handling and a welcome page. The code is clean, well-tested, and follows Spring conventions, making it a valuable learning resource for developers new to Spring Boot.
Halo is a full-stack content management system (CMS) and blogging platform built on Spring Boot WebFlux (reactive) and Vue 3. It provides a Kubernetes-inspired extension model for defining custom resources (posts, pages, comments, attachments, themes, plugins) with automatic RESTful CRUD endpoints, indexing, and reconciliation controllers. The system features a plugin architecture (PF4J-based) that allows third-party extensions to contribute UI bundles, security filters, notification handlers, search engines, and theme template processors. The frontend is split into an admin console and a user center, both built with Vue 3, FormKit, TanStack Query, and a rich-text editor (Tiptap). Security includes multiple authentication methods (password, OAuth2, email code, TOTP two-factor), RBAC authorization, remember-me, device management, and sudo confirmation. The theme engine uses Thymeleaf with custom dialects and a finder pattern to expose backend data to templates. The codebase is large but well-organized, with clear separation between API interfaces and implementations, extensive use of reactive programming, and a strong emphasis on extensibility through extension points.
RuoYi is a production‑ready Java rapid‑development framework for building enterprise back‑office management systems (CMS, CRM, OA, etc.). It is a monolithic Spring Boot application using Apache Shiro for authentication/authorization, MyBatis for persistence, Thymeleaf for server‑side rendering, and a jQuery/Bootstrap frontend with numerous third‑party plugins. The system provides a complete RBAC module (user, role, department, menu management), dictionary and configuration management, operation and login auditing, online user monitoring, Quartz‑based scheduled tasks, and a Velocity‑powered code generator that produces full CRUD modules from database tables. Additional features include dynamic data source switching, XSS/CSRF protection, captcha, file upload/download, Excel import/export with annotation‑driven mapping, and a demo suite for UI components. The architecture follows a modular Maven structure (admin, common, framework, system, generator, quartz) with a shared common module providing utilities, annotations, and exception hierarchy. While the framework is mature and widely adopted, its frontend stack (jQuery, Bootstrap 3‑era plugins) and use of Shiro represent technical drift compared to modern SPA or Spring Security approaches. The codebase is well‑organized and contains several reusable components, but is tightly coupled to its own conventions and lacks microservice readiness.
This repository is a Spring Guide tutorial demonstrating how to build a Spring Boot web application that accepts HTTP multipart file uploads. It contains four project variants: initial and complete versions in both Java and Kotlin, each with Maven and Gradle build files. The complete version adds a FileUploadController with endpoints for listing uploaded files, serving them as downloads, and handling uploads, plus a StorageService abstraction backed by a FileSystemStorageService that writes files to a configurable local directory (default 'upload-dir'). A Thymeleaf template provides a simple HTML upload form. The application is a small monolith: Spring MVC controllers handle GET / (list files), POST / (store uploaded file), and GET /files/{filename} (download with Content-Disposition). The storage layer uses java.nio.file APIs and includes a path traversal protection check that rejects filenames escaping the root directory. Upload size limits are configured via spring.servlet.multipart properties. Tests cover controller behavior with MockMvc, storage service security cases, and full integration tests using RestTestClient with redirect handling. This is educational sample code, not a production service. It demonstrates clean separation between web layer and storage abstraction, and the complete version includes meaningful security and testing patterns that can be reused in real projects. The code is actively maintained, uses current Spring Boot 4.0.x and Java 17, and is well-suited as a reference for implementing file upload endpoints.