Skip to main content

Java

10 AI Prompts for Hibernate and JPA

10 copy-paste AI prompts for Hibernate and JPA development. Covers entity relationship design, fixing LazyInitializationException, writing JPQL queries, generating Flyway migrations, second-level cache, bulk operations, soft delete, auditing with @EntityListeners, Criteria API Specifications, and full entity model reviews.

10 AI Prompts to Review and Improve Java Code Quality

10 copy-paste AI prompts for reviewing and improving Java code quality. Covers SOLID violations, thread-safety bugs, virtual thread carrier pinning, N+1 query patterns, resource leaks, exception handling, null safety, logging quality, and full quality audits. Works in Claude, ChatGPT, Gemini, and Cursor.

10 AI Prompts for Spring Boot Development

10 copy-paste AI prompts for Spring Boot development. Covers scaffolding REST endpoints, configuring Spring Security JWT, debugging autoconfiguration, global exception handling, production tuning, Actuator health checks, CORS, caching, and migrating from Spring Boot 2.x to 3.x. Works in Claude, ChatGPT, Gemini, and Cursor.

Spring Data JPA: Complete Guide — Repositories, Queries, and Projections

A deep-reference guide to Spring Data JPA covering the full JpaRepository hierarchy, derived query methods, @Query JPQL and native queries, Specifications, pagination, interface and class/record projections, @Transactional rules, and entity auditing with @CreatedDate — with fully annotated production-grade code examples and a decision matrix for choosing the right query strategy.

Java Records: The Complete Guide to Immutable Data Classes

A deep-reference guide to Java Records — the concise, immutable data-carrier syntax introduced in Java 16 and matured in Java 21. Covers declaration syntax, compact constructors, custom accessors, equals/hashCode/toString behaviour, records with Jackson, records with Hibernate, records in Spring Boot, and key limitations — with fully annotated code examples and a comparison to plain Java classes.

Java Generics: The Complete Developer’s Reference

A complete reference guide to Java Generics: generic classes and methods, bounded type parameters, wildcards, the PECS rule, type erasure, generic interfaces, common pitfalls, and AI prompts to modernise raw-type code.