Skip to content

Advanced Topics

Deep-dive topics for optimizing and extending SpringFlow in your applications.

In this section

Who is this for?

This section is for developers who want to:

  • Understand how SpringFlow works under the hood
  • Override repositories, services, and controllers with custom implementations
  • Extend the default behavior with custom endpoints
  • Optimize performance for production workloads
  • Apply recommended patterns

Key Concepts

Runtime Architecture

SpringFlow generates components at runtime via:

  • BeanDefinitionRegistryPostProcessor for bean registration
  • Reflection API for entity introspection
  • Dynamic proxies for generated repositories

Extensibility

SpringFlow is designed to be extended with your own components:

  • Auto-detection — SpringFlow detects and respects your custom repositories, services, and controllers
  • 4 override scenarios — repository only, service only, controller only, or all three
  • Base classes — extend GenericCrudService and GenericCrudController to inherit built-in behavior
  • Lifecycle hooksbeforeCreate, afterCreate, beforeUpdate, afterUpdate, beforeDelete, afterDelete
  • JPA Specifications — custom repositories can add their own query methods
  • Non-invasive — fully compatible with your existing Spring architecture

Performance

Key performance characteristics:

  • Automatic fetch joins to prevent N+1 queries
  • Entity metadata caching
  • Efficient pagination with optimized COUNT queries
  • Lightweight DTOs for responses

Prerequisites: Familiarity with Spring Boot, JPA, and SpringFlow basics.

Start with Architecture to understand the foundations.