Recent Posts

Abstracting Data Access in Java With the DAO Pattern

Author: Tim Kelly Original post on Foojay: Read More Table of Contents A simple implementation Prerequisites The domain class The DAO API The ProductDao class Using the DAO Using MongoDB as the persistence layer Setting up MongoDB The MongoDBProductDao class Connecting to MongoDB The application class Advanced considerations Preventing business logic leakage Adding custom query methods Error handling Conclusion The …

Read More »

Enterprise Java in Practice: Fragmentation, Platforms and Real-World Trade-offs

Author: Chiara Civardi Original post on Foojay: Read More Table of Contents Where fragmentation shows upWhy platform architecture mattersJoin our webinar: Insights on Enterprise Java, Trends, Challenges and StrategiesExplore the data Enterprise Java has matured into one of the most stable and widely adopted ecosystems in software development. Yet for many teams, the biggest challenges no longer come from the …

Read More »

Testing Emails with Testcontainers and Mailpit

Author: Simon Martinelli Original post on Foojay: Read More Table of Contents What is Mailpit?Why Testcontainers fits perfectlyThe Mailpit Testcontainer module Maven dependency Using Spring Boot with @ServiceConnectionUsing Mailpit without Spring BootFluent AssertJ assertionsWaiting for asynchronous emailsWhy this approach works wellConclusion Testing email functionality is often painful. SMTP servers are external, tests become slow or flaky, and local setups differ …

Read More »