SpringFlow Documentation¶
Auto-generate complete REST APIs from JPA entities with a single annotation.
What is SpringFlow?¶
SpringFlow is a Spring Boot library that reduces 70-90% of boilerplate code by automatically generating:
- Repositories (JpaRepository with Specifications)
- Services (CRUD operations with transaction management)
- REST Controllers (Complete CRUD endpoints)
- DTOs (Input/Output mapping with validation)
- OpenAPI Documentation (Swagger UI integration)
All from a single @AutoApi annotation on your JPA entities.
Quick Example¶
@Entity
@AutoApi(path = "products")
public class Product {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@NotBlank
@Size(min = 3, max = 100)
private String name;
@Min(0)
private BigDecimal price;
@Hidden
private String internalCode;
@ManyToOne
private Category category;
}
That's it! SpringFlow automatically generates:
-
GET /api/products- List with pagination & sorting -
GET /api/products/{id}- Get by ID -
POST /api/products- Create -
PUT /api/products/{id}- Update -
DELETE /api/products/{id}- Delete - Complete OpenAPI/Swagger documentation
- Input validation with JSR-380
- DTO mapping (excludes
@Hiddenfields) - Repository, Service, and Controller beans
Key Features¶
Zero Boilerplate¶
Write only your domain model. SpringFlow generates everything else at runtime.
Production Ready¶
- Transaction management
- Exception handling
- Input validation (JSR-380)
- Security integration
- Soft delete support
- Audit trail
Flexible & Extensible¶
- Override generated behavior
- Add custom endpoints
- Configure via annotations or YAML
- Works with existing Spring components
Advanced Filtering¶
Enables: GET /api/products?name_like=Phone&price_range=100,500
Built-in Security¶
Soft Delete¶
Adds GET /api/articles?includeDeleted=true and POST /api/articles/{id}/restore
Installation¶
Maven¶
<dependency>
<groupId>io.github.tky0065</groupId>
<artifactId>springflow-starter</artifactId>
<version>0.5.1</version>
</dependency>
Gradle¶
Getting Started¶
- Quick Start Guide - Get up and running in 5 minutes
- Installation - Detailed setup instructions
- First Project - Build your first API
Requirements¶
- Java 17 or higher
- Spring Boot 3.2.1 or higher
- Maven 3.6+ or Gradle 7.0+
Language Support¶
SpringFlow supports both Java and Kotlin:
See Kotlin Support Guide for details.
What's Next?¶
Core Concepts¶
Advanced Topics¶
Contributing¶
Community & Support¶
- Documentation: https://tky0065.github.io/springflow/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Maven Central: SpringFlow Artifacts
License¶
SpringFlow is released under the Apache License 2.0.