Spring Data Basics
Fluent Queries
Scrolling
Persistence Creators
Configuration
Agenda
Slide 5
Slide 5 text
Spring Data Basics
Slide 6
Slide 6 text
As little as possible
🙌
🤩
Slide 7
Slide 7 text
Episode 1
Fluent Interface
Slide 8
Slide 8 text
Fluent Interface
Slide 9
Slide 9 text
141 public methods
🙀
🫣 🤯
😵💫
Slide 10
Slide 10 text
Fluent Interface
🤩
Slide 11
Slide 11 text
Fluent Interface
• Guided through operations 🧑✈
• Reusable query stubs ♻
• Template and Repositories
• Query by Example, Querydsl, JPA
Specifications
• JPA, MongoDB, Cassandra, Neo4j
Slide 12
Slide 12 text
Episode 2
Scrolling
Slide 13
Slide 13 text
Scrolling
• Abstraction to scroll 📜 large Chunks of data
• Not a Page 📄
• Designed to cater various technologies
• Offset-based scrolling 🔢
• Keyset scrolling 🗂
• Vendor-specific (e.g. Cassandra
PagingState) 👩💻
Slide 14
Slide 14 text
Scrolling
• Window 🪟
• Abstraction over a window of data
• Associated with a position (scroll pointer)
• scroll 📜
• Method to scroll over windows of Data
• WindowIterator 🧰
• Utility to iterate over windows
Slide 15
Slide 15 text
Episode 3
@PersistenceCreator
Slide 16
Slide 16 text
Persistence Creators
• Everything started with Constructors
• @PersistenceConstructor ♻
• Spring Data ❤ private Constructors
• @PersistenceCreator can be
• Constructors 👷
• Factory Methods 🏭
Slide 17
Slide 17 text
Episode 4
Configuration
Slide 18
Slide 18 text
Leveraging ConfigurationProperties
• "…" - String Literal
• #{…} - SpEL
• Extension through
EvaluationContextExtension
• ${…} - Property Placeholder 🆕
• people_#{foo.bar()}_${myApp.tenant}
• Value Expression (as in @Value)