Skip to main content

Image Generation and Vision in Spring AI: ImageModel, Prompt Options and Safe Storage

How to generate images with Spring AI's ImageModel and keep them safely: what the real OpenAiImageModel sends (including an options object that silently resets the model), a moderation gate and what Spring AI does not moderate, verified storage in MinIO/S3 with sniffed content types, size and pixel caps and server-chosen keys, and a per-provider cost table dated 2026-10-28. No image provider was called; the model and moderation are scripted fakes and the bucket is a real MinIO.

Soft Delete in Hibernate 7: @SoftDelete vs @SQLDelete + @SQLRestriction

Hibernate 7's native @SoftDelete (DELETED, ACTIVE and TIMESTAMP strategies) compared with the hand-rolled @SQLDelete + @SQLRestriction recipe, run against PostgreSQL 17 and H2: the generated SQL, restoring rows, the unique-index traps (partial indexes, NULLS NOT DISTINCT), associations and join tables, native queries that bypass the filter, and what Spring Data JPA does with it.

Spring Boot 4 + Thymeleaf + htmx: Server-Side CRUD UI in 2026

Build a contacts screen with Spring Boot 4.1.2, Thymeleaf 3.1.5 and htmx 2.0.11 and no JS framework: one URL that returns a full page or a fragment, 422 validation re-render, pagination, inline edit and delete, with MockMvc tests and a headless Chromium check, and the htmx 2 status-code traps that bit during the build.

Top 30 Design Patterns Interview Questions in Java (with Code)

Thirty design patterns interview questions with short answers, runnable Java 25 code and tests that prove each claim: Singleton variants, Factory vs Abstract Factory, Strategy vs State, Decorator vs Proxy, and where Spring uses each pattern. Hub for the 23-pattern GoF series.

Speech-to-Text and Text-to-Speech with Spring AI: Build a Meeting-Minutes Generator

Spring AI's audio API is its least-covered corner. Build a meeting-minutes generator on Spring AI 2.0.2: transcribe a recording, split files over the 25 MB upload limit at a silence, turn the transcript into typed action items with entity(), read them back with text-to-speech, and price an hour of meetings. Run against a local mock server and a stub chat model, with the failures captured.

Top 30 JUnit 6 and Mockito Interview Questions (2026)

30 JUnit 6 and Mockito 5 interview questions answered with tests that were actually run on JUnit 6.1.3, Mockito 5.24.0 and JDK 25: lifecycle, extensions, parameterized tests, mocks vs spies, verify, static mocking and flaky tests, each with captured output.