{"id":3502,"date":"2025-12-24T10:00:12","date_gmt":"2025-12-24T15:00:12","guid":{"rendered":"https:\/\/www.mymiller.name\/wordpress\/?p=3502"},"modified":"2025-12-24T10:00:12","modified_gmt":"2025-12-24T15:00:12","slug":"spring-data-jpa-for-dummies-persisting-data-like-a-pro","status":"publish","type":"post","link":"https:\/\/www.mymiller.name\/wordpress\/spring_databases\/spring-data-jpa-for-dummies-persisting-data-like-a-pro\/","title":{"rendered":"Spring Data JPA for Dummies: Persisting Data Like a Pro"},"content":{"rendered":"\n<p>Ever feel bogged down by writing tons of code just to interact with your database? If you&#8217;re a Java developer working with relational databases, Spring Data JPA is your new best friend. This blog post will give you a beginner-friendly introduction to Spring Data JPA, showing you how to save time and write cleaner code.<\/p>\n\n\n\n<p><strong>Hold on, what&#8217;s JPA?<\/strong><\/p>\n\n\n\n<p>JPA (Java Persistence API) acts as a bridge between your Java objects and your relational database. It lets you map your objects to database tables, meaning you can interact with your data using familiar Java code instead of writing raw SQL queries.<\/p>\n\n\n\n<p><strong>Spring Data JPA to the rescue!<\/strong><\/p>\n\n\n\n<p>Spring Data JPA builds on top of JPA, offering a powerful abstraction layer. This means it takes care of a lot of the repetitive tasks you&#8217;d normally do with JPA, like writing boilerplate code for data access.<\/p>\n\n\n\n<p><strong>Here&#8217;s the magic:<\/strong> Spring Data JPA lets you define interfaces for your data access layer. These interfaces describe how you want to interact with your data (find by ID, delete all, etc.). Spring then automatically implements these interfaces for you at runtime!<\/p>\n\n\n\n<p><strong>Let&#8217;s see it in action!<\/strong><\/p>\n\n\n\n<p>Imagine you have a simple application that stores information about books. Here&#8217;s a basic <code>Book<\/code> entity class with JPA annotations:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Entity\npublic class Book {\n\n  @Id\n  @GeneratedValue(strategy = GenerationType.IDENTITY)\n  private Long id;\n\n  private String title;\n  private String author;\n\n  \/\/ Getters and setters omitted for brevity\n}\n<\/code><\/pre>\n\n\n\n<p>The <code>@Entity<\/code> annotation marks <code>Book<\/code> as a JPA entity, and <code>@Id<\/code> specifies the <code>id<\/code> field as the primary key.<\/p>\n\n\n\n<p><strong>Effortless persistence with Repositories!<\/strong><\/p>\n\n\n\n<p>Now, to interact with <code>Book<\/code> objects in your database, you can define a repository interface:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public interface BookRepository extends JpaRepository&lt;Book, Long&gt; {\n\n}\n<\/code><\/pre>\n\n\n\n<p>This interface extends <code>JpaRepository<\/code>, a pre-built interface from Spring Data JPA. Because of this, Spring automatically creates an implementation for <code>BookRepository<\/code> that provides methods for common CRUD (Create, Read, Update, Delete) operations.<\/p>\n\n\n\n<p>Here&#8217;s a sample of how you might use <code>BookRepository<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>BookRepository bookRepository = \/\/ Injected by Spring\n\n\/\/ Save a new book\nBook newBook = new Book(\"The Hitchhiker's Guide to the Galaxy\", \"Douglas Adams\");\nbookRepository.save(newBook);\n\n\/\/ Find a book by ID\nLong bookId = 1L;\nBook retrievedBook = bookRepository.findById(bookId).get();\n\n\/\/ Update a book\nretrievedBook.setTitle(\"A New Hope\");\nbookRepository.save(retrievedBook);\n<\/code><\/pre>\n\n\n\n<p>See how clean and concise this code is? Spring Data JPA takes care of the underlying database interactions, allowing you to focus on your application logic.<\/p>\n\n\n\n<p><strong>Spring Data JPA &#8211; More than CRUD!<\/strong><\/p>\n\n\n\n<p>Spring Data JPA offers more than just basic CRUD operations. You can define custom finder methods by following a naming convention. For example, <code>findByTitle<\/code> would return a list of <code>Book<\/code> objects with a matching title.<\/p>\n\n\n\n<p><strong>JQL for Queries<\/strong><\/p>\n\n\n\n<p>Spring Data JPA offers multiple ways to formulate queries for interacting with your data. While repository methods provide a convenient way for basic operations, you might encounter situations where you need more fine-grained control over your queries. This is where JQL (Java Persistence Query Language) comes in.<\/p>\n\n\n\n<p><strong>JQL in a Nutshell<\/strong><\/p>\n\n\n\n<p>JQL is a query language specifically designed for working with JPA entities. It resembles SQL (Structured Query Language) in syntax, but it operates on your entity classes instead of database tables.<\/p>\n\n\n\n<p><strong>Why Use JQL?<\/strong><\/p>\n\n\n\n<p>While Spring Data JPA&#8217;s repository methods are great for most scenarios, JQL offers some advantages:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Complex Queries:<\/strong>\u00a0JQL allows you to construct intricate queries that might be difficult to express using repository method names.<\/li>\n\n\n\n<li><strong>Dynamic Queries:<\/strong>\u00a0You can build JQL queries dynamically based on user input or other runtime conditions.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example Time!<\/strong><\/p>\n\n\n\n<p>Let&#8217;s look at a basic example using the <code>Book<\/code> entity from before:<\/p>\n\n\n\n<p>Imagine you want to find all books written by a specific author, say &#8220;Douglas Adams.&#8221; Here&#8217;s how you could achieve this with JQL:<\/p>\n\n\n\n<p>Java<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>String jpql = \"SELECT b FROM Book b WHERE b.author = :author\";\n\nBookRepository bookRepository = \/\/ Injected by Spring\n\nTypedQuery&lt;Book&gt; query = bookRepository.entityManager.createQuery(jpql, Book.class);\nquery.setParameter(\"author\", \"Douglas Adams\");\n\nList&lt;Book&gt; douglasAdamsBooks = query.getResultList();\n<\/code><\/pre>\n\n\n\n<p><strong>@Query in Action<\/strong><\/p>\n\n\n\n<p>The <code>@Query<\/code> annotation allows you to define custom finder methods within your repository interfaces. You can specify the JQL query directly within the annotation.<\/p>\n\n\n\n<p><strong>Let&#8217;s revisit our <code>Book<\/code> example!<\/strong><\/p>\n\n\n\n<p>Suppose you want to find all books published after a specific year. Here&#8217;s a custom finder method using <code>@Query<\/code>:<\/p>\n\n\n\n<p>Java<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public interface BookRepository extends JpaRepository&lt;Book, Long&gt; {\n\n  @Query(\"SELECT b FROM Book b WHERE b.publicationYear &gt; :publicationYear\")\n  List&lt;Book&gt; findBooksByPublicationYearAfter(@Param(\"publicationYear\") int year);\n\n}\n<\/code><\/pre>\n\n\n\n<p>In this example, the <code>findBooksByPublicationYearAfter<\/code> method is annotated with <code>@Query<\/code>. The annotation value specifies the JQL query itself. Note that we&#8217;re using named parameters (<code>@Param(\"publicationYear\")<\/code>) for clarity and to prevent SQL injection vulnerabilities.<\/p>\n\n\n\n<p><strong>Updating Data with @Modifying<\/strong><\/p>\n\n\n\n<p>Spring Data JPA provides methods for basic CRUD operations, but what about custom update queries? The <code>@Modifying<\/code> annotation comes to the rescue.<\/p>\n\n\n\n<p><strong>Modifying Magic<\/strong><\/p>\n\n\n\n<p>The <code>@Modifying<\/code> annotation is used in conjunction with <code>@Query<\/code> to indicate that the query modifies data in the database (update or delete). Spring Data JPA wouldn&#8217;t execute such queries by default as they could potentially lead to unintended data loss.<\/p>\n\n\n\n<p>Here&#8217;s an example of deleting all books by a specific author:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@Modifying\n@Query(\"DELETE FROM Book b WHERE b.author = :author\")\nvoid deleteAllBooksByAuthor(@Param(\"author\") String author);\n<\/code><\/pre>\n\n\n\n<p>The <code>deleteAllBooksByAuthor<\/code> method uses <code>@Modifying<\/code> along with <code>@Query<\/code> to specify a JQL deletion query.<\/p>\n\n\n\n<p>This code snippet constructs a JQL query that selects all <code>Book<\/code> objects (<code>b<\/code>) where the <code>author<\/code> field matches the provided value (<code>\"Douglas Adams\"<\/code>). The query is then executed using the <code>entityManager<\/code> and the results are stored in a list.<\/p>\n\n\n\n<p><strong>Spring Data JPA and JQL: Working Together<\/strong><\/p>\n\n\n\n<p>Spring Data JPA doesn&#8217;t replace JQL. Instead, it provides ways to leverage JQL within your repository methods. You can use <code>@Query<\/code> annotation to define custom finder methods that use JQL for their queries.<\/p>\n\n\n\n<p><strong>JQL &#8211; A Powerful Tool, Use Wisely<\/strong><\/p>\n\n\n\n<p>JQL offers a powerful way to craft complex queries. However, it can also make your code less readable if overused. It&#8217;s generally recommended to use Spring Data JPA&#8217;s repository methods whenever possible and resort to JQL for specific scenarios where those methods fall short.<\/p>\n\n\n\n<p><strong>Repository Types in Spring Data JPA<\/strong><\/p>\n\n\n\n<p>Spring Data JPA offers a variety of repository interfaces that cater to different data access needs. Here&#8217;s a quick breakdown of some common repository types:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>CrudRepository:<\/strong> This is the most basic repository interface, providing methods for essential CRUD operations (create, read, update, delete) on your entities.<\/li>\n\n\n\n<li><strong>PagingAndSortingRepository:<\/strong> Extends <code>CrudRepository<\/code> and adds functionalities for sorting and paginating your data. This is useful for handling large datasets or implementing features like infinite scrolling.<\/li>\n\n\n\n<li><strong>JpaRepository:<\/strong> This is the one-stop shop for most JPA use cases. It combines the functionalities of <code>CrudRepository<\/code> and <code>PagingAndSortingRepository<\/code>, along with additional methods specific to JPA, like flushing the persistence context or deleting records in bulk.<\/li>\n\n\n\n<li><strong>JpaSpecificationExecutor:<\/strong> This interface allows you to create complex queries using JPA Criteria API or Spring Data JPA&#8217;s query creation features. This is helpful for building dynamic queries based on specific criteria.<\/li>\n<\/ul>\n\n\n\n<p><strong>Choosing the Right Repository<\/strong><\/p>\n\n\n\n<p>The best repository type for your needs depends on the complexity of your data access requirements.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If you only need basic CRUD operations,\u00a0<code>CrudRepository<\/code>\u00a0is a good starting point.<\/li>\n\n\n\n<li>For working with large datasets or implementing pagination, go for\u00a0<code>PagingAndSortingRepository<\/code>\u00a0or\u00a0<code>JpaRepository<\/code>.<\/li>\n\n\n\n<li>If you need to create intricate queries, consider using\u00a0<code>JpaRepository<\/code>\u00a0in combination with\u00a0<code>JpaSpecificationExecutor<\/code>.<\/li>\n<\/ul>\n\n\n\n<p>Spring Data JPA provides flexibility in how you interact with your data. Understanding these different repository types will help you write more efficient and maintainable code.<\/p>\n\n\n\n<p><strong>Spring Auditing<\/strong><\/p>\n\n\n\n<p>Spring Security seamlessly integrates with Spring Data JPA to provide auditing capabilities. This means you can track who made changes to your entities and when.<\/p>\n\n\n\n<p><strong>Why Audit?<\/strong><\/p>\n\n\n\n<p>Auditing offers several benefits:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Improved Data Security:<\/strong>\u00a0You can identify users who made specific changes to data, aiding in security investigations.<\/li>\n\n\n\n<li><strong>Regulatory Compliance:<\/strong>\u00a0Certain regulations might require you to track data changes for audit purposes.<\/li>\n\n\n\n<li><strong>Data Lineage Tracking:<\/strong>\u00a0Auditing helps you understand how your data has evolved over time.<\/li>\n<\/ul>\n\n\n\n<p><strong>Enabling Auditing<\/strong><\/p>\n\n\n\n<p>Spring Security provides annotations to enable auditing on your JPA entities. Here&#8217;s what you need to do:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Add Dependencies:<\/strong>\u00a0Include the required Spring Security dependencies in your project&#8217;s pom.xml file.<\/li>\n\n\n\n<li><strong>Enable Auditing:<\/strong>\u00a0Annotate your entity classes with\u00a0<code>@EnableJpaAuditing<\/code>\u00a0from Spring Data JPA.<\/li>\n\n\n\n<li><strong>Auditing Fields:<\/strong>\u00a0Use the\u00a0<code>@CreatedDate<\/code>\u00a0and\u00a0<code>@LastModifiedDate<\/code>\u00a0annotations from JPA to mark the fields that will store creation and modification timestamps.<\/li>\n\n\n\n<li><strong>Auditing User (Optional):<\/strong>\u00a0If you want to track the user who made the changes, you can use the\u00a0<code>@CreatedBy<\/code>\u00a0and\u00a0<code>@LastModifiedBy<\/code>\u00a0annotations along with a suitable user entity class.<\/li>\n<\/ol>\n\n\n\n<p><strong>Auditing in Action!<\/strong><\/p>\n\n\n\n<p>Once you&#8217;ve enabled auditing, Spring automatically populates the designated fields (<code>@CreatedDate<\/code>, <code>@LastModifiedDate<\/code>, etc.) whenever an entity is persisted or updated. You can then access this information in your application logic.<\/p>\n\n\n\n<p><strong>Leveraging Auditing Data<\/strong><\/p>\n\n\n\n<p>Spring Security doesn&#8217;t provide built-in functionalities to access or display audit information. However, you can retrieve the audit fields (creation date, modified date, modified by user) using getters in your entity class.<\/p>\n\n\n\n<p>You can then choose how to store and utilize this data based on your specific needs. Common options include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Persisting audit information in a separate audit log table.<\/li>\n\n\n\n<li>Integrating the audit data with your security framework for user activity tracking.<\/li>\n<\/ul>\n\n\n\n<p><strong>Supported Databases<\/strong><\/p>\n\n\n\n<p>Spring Data JPA shines in its ability to work with a variety of database vendors. This flexibility allows you to choose the database that best suits your project&#8217;s needs without sacrificing the convenience of Spring Data JPA&#8217;s abstractions.<\/p>\n\n\n\n<p>Here&#8217;s a glimpse at some of the widely supported relational databases for Spring Data JPA:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Popular Choices:<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>H2:<\/strong> A lightweight, in-memory database that&#8217;s perfect for development and testing. Spring Boot can even auto-configure H2, making it a breeze to get started.<\/li>\n\n\n\n<li><strong>MySQL:<\/strong> The world&#8217;s most popular open-source relational database management system (RDBMS). Spring Data JPA seamlessly integrates with MySQL, making it a go-to option for many projects.<\/li>\n\n\n\n<li><strong>PostgreSQL:<\/strong> Another powerful open-source RDBMS known for its robustness and advanced features. Spring Data JPA provides full support for PostgreSQL.<\/li>\n\n\n\n<li><strong>Oracle Database:<\/strong> A widely used commercial RDBMS offering high scalability and performance. Spring Data JPA allows you to leverage Oracle&#8217;s capabilities within your JPA applications.<\/li>\n\n\n\n<li><strong>Microsoft SQL Server:<\/strong> A mature and feature-rich commercial RDBMS from Microsoft. Spring Data JPA integrates smoothly with SQL Server, making it a viable option for projects within the Microsoft ecosystem.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><strong>Beyond Relational Databases<\/strong><\/p>\n\n\n\n<p>While Spring Data JPA excels in the relational world, the Spring Data family extends its data access magic to other data storage solutions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>NoSQL Databases:<\/strong> Spring Data offers modules for interacting with popular NoSQL databases like MongoDB and Cassandra, providing similar abstractions for these data stores.<\/li>\n\n\n\n<li><strong>Document Databases:<\/strong> Spring Data MongoDB allows you to interact with document-oriented databases like MongoDB using familiar JPA concepts.<\/li>\n<\/ul>\n\n\n\n<p><strong>Choosing the Right Database<\/strong><\/p>\n\n\n\n<p>The best database for your project depends on various factors, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Project Requirements:<\/strong> Consider the data model, scalability needs, and performance requirements of your application.<\/li>\n\n\n\n<li><strong>Team Expertise:<\/strong> If your team has experience working with a specific database, that might influence your choice.<\/li>\n\n\n\n<li><strong>Deployment Environment:<\/strong> Think about where you&#8217;ll be deploying your application and any potential database licensing costs.<\/li>\n<\/ul>\n\n\n\n<p>Spring Data JPA&#8217;s beauty extends to the cloud! Let&#8217;s explore some popular cloud providers and their supported databases for Spring Data JPA:<\/p>\n\n\n\n<p><strong>Amazon Web Services (AWS):<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Amazon Relational Database Service (RDS):<\/strong>\u00a0AWS RDS offers a managed service for popular relational databases like MySQL, PostgreSQL, Aurora (MySQL and PostgreSQL compatible), MariaDB, and Oracle Database. Spring Data JPA seamlessly integrates with all of these, allowing you to leverage the scalability and manageability of AWS RDS.<\/li>\n<\/ul>\n\n\n\n<p><strong>Microsoft Azure:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Azure SQL Database:<\/strong>\u00a0A managed relational database service compatible with Microsoft SQL Server. Spring Data JPA allows you to leverage familiar JPA patterns when working with Azure SQL Database.<\/li>\n<\/ul>\n\n\n\n<p><strong>Google Cloud Platform (GCP):<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Cloud SQL:<\/strong>\u00a0A managed relational database service for MySQL and PostgreSQL. Spring Data JPA integrates smoothly with Cloud SQL, making it easy to benefit from GCP&#8217;s scalability and reliability for your JPA applications.<\/li>\n<\/ul>\n\n\n\n<p><strong>Other Cloud Providers:<\/strong><\/p>\n\n\n\n<p>Many other cloud providers offer managed database services compatible with Spring Data JPA. Here are a few examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>DigitalOcean:<\/strong>\u00a0Managed databases for MySQL, PostgreSQL, and other options.<\/li>\n\n\n\n<li><strong>Heroku:<\/strong>\u00a0Supports various database options, including PostgreSQL and MySQL.<\/li>\n<\/ul>\n\n\n\n<p>Here are some additional features of Spring JPA that we haven&#8217;t covered yet:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Caching:<\/strong> Spring Data JPA integrates with caching providers like Ehcache and JCache to cache frequently accessed data, improving performance.<\/li>\n\n\n\n<li><strong>Transactions:<\/strong> Spring JPA allows you to manage database transactions within your service layer using annotations like <code>@Transactional<\/code>.<\/li>\n\n\n\n<li><strong>Entity Listeners:<\/strong> You can define entity listeners to execute specific code before or after certain lifecycle events of your entities (e.g., before persisting, after deleting).<\/li>\n\n\n\n<li><strong>Specifications:<\/strong> Spring Data JPA provides a powerful way to build complex queries using JPA Criteria API or Spring Data JPA&#8217;s query creation features.<\/li>\n\n\n\n<li><strong>Projections:<\/strong> You can define projections to return specific data from your entities instead of the entire entity object, optimizing data transfer.<\/li>\n\n\n\n<li><strong>Data Persistence with XML (Optional):<\/strong> While annotations are preferred for most cases, Spring JPA also supports defining persistence logic using XML configuration files.<\/li>\n\n\n\n<li><strong>Advanced JPA Features:<\/strong> Spring Data JPA doesn&#8217;t prevent you from using more advanced features of JPA like entity inheritance, lazy loading, and eager fetching.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Ever feel bogged down by writing tons of code just to interact with your database? If you&#8217;re a Java developer working with relational databases, Spring Data JPA is your new best friend. This blog post will give you a beginner-friendly introduction to Spring Data JPA, showing you how to save time and write cleaner code. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3588,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[435],"tags":[69,319],"series":[397],"class_list":["post-3502","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spring_databases","tag-java-2","tag-spring","series-spring"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/binary-2904980_1280.jpg?fit=1280%2C719&ssl=1","jetpack-related-posts":[{"id":3925,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_databases\/spring-data-jpa-java-records-the-ultimate-duo-for-clean-fast-query-projections\/","url_meta":{"origin":3502,"position":0},"title":"Spring Data JPA &#038; Java Records: The Ultimate Duo for Clean, Fast Query Projections","author":"Jeffery Miller","date":"April 20, 2026","format":false,"excerpt":"Architecting Efficient Data Access with Immutability As Spring developers, we spend a significant amount of time optimizing the path between the database and the client. One of the most common performance pitfalls is the over-fetching of data\u2014loading entire, complex JPA entities when all we need is a small subset of\u2026","rel":"","context":"In &quot;Spring Databases&quot;","block_context":{"text":"Spring Databases","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_databases\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/record-shop-9180482_1280.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/record-shop-9180482_1280.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/record-shop-9180482_1280.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/record-shop-9180482_1280.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2025\/11\/record-shop-9180482_1280.avif 3x"},"classes":[]},{"id":3539,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_databases\/spring-data-cassandra-simplifying-java-development-with-apache-cassandra\/","url_meta":{"origin":3502,"position":1},"title":"Spring Data Cassandra: Simplifying Java Development with Apache Cassandra","author":"Jeffery Miller","date":"April 20, 2026","format":false,"excerpt":"Apache Cassandra is a powerful NoSQL database known for its scalability and high availability. Spring Data Cassandra seamlessly integrates Spring\u2019s familiar programming model with Cassandra, boosting developer productivity. Why Spring Data Cassandra? Simplified Configuration: Spring Boot auto-configuration minimizes manual setup. Object-Relational Mapping (ORM): Easily map Java objects to Cassandra tables.\u2026","rel":"","context":"In &quot;Spring Databases&quot;","block_context":{"text":"Spring Databases","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_databases\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/network-3396348_1280.jpg?fit=1200%2C720&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/network-3396348_1280.jpg?fit=1200%2C720&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/network-3396348_1280.jpg?fit=1200%2C720&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/network-3396348_1280.jpg?fit=1200%2C720&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/network-3396348_1280.jpg?fit=1200%2C720&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3471,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_databases\/spring-jpa-auditing\/","url_meta":{"origin":3502,"position":2},"title":"Spring JPA Auditing","author":"Jeffery Miller","date":"December 24, 2025","format":false,"excerpt":"Simplifying Entity Auditing with Spring Data JPA Annotations Keeping track of who created and modified your entities is crucial for various purposes, including audit trails, security, and data lineage. Spring Data JPA offers a convenient and efficient way to achieve this through dedicated annotations: @CreatedBy, @LastModifiedBy, @CreatedDate, and @LastModifiedDate. Leveraging\u2026","rel":"","context":"In &quot;Spring Databases&quot;","block_context":{"text":"Spring Databases","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_databases\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/02\/audit-4190944_640.jpg?fit=640%2C377&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/02\/audit-4190944_640.jpg?fit=640%2C377&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/02\/audit-4190944_640.jpg?fit=640%2C377&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":3530,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_databases\/spring-jpa-auditing-track-data-changes\/","url_meta":{"origin":3502,"position":3},"title":"Spring JPA Auditing: Track Data Changes","author":"Jeffery Miller","date":"April 20, 2026","format":false,"excerpt":"In the dynamic world of software development, understanding the complete history of your data is crucial. Who made a change? When did it occur? Who viewed the data? Spring JPA Auditing, combined with custom solutions, offers a comprehensive way to answer these questions, acting as a time machine for your\u2026","rel":"","context":"In &quot;Spring Databases&quot;","block_context":{"text":"Spring Databases","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_databases\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/image.png?fit=1200%2C686&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/image.png?fit=1200%2C686&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/image.png?fit=1200%2C686&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/image.png?fit=1200%2C686&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/06\/image.png?fit=1200%2C686&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3704,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_databases\/mastering-location-data-with-spring-jpa-a-comprehensive-guide\/","url_meta":{"origin":3502,"position":4},"title":"Mastering Location Data with Spring JPA: A Comprehensive Guide","author":"Jeffery Miller","date":"April 20, 2026","format":false,"excerpt":"In today\u2019s interconnected world, location data plays a pivotal role in numerous applications, from e-commerce and logistics to travel and social networking. Efficiently managing and accessing this wealth of geographical information is crucial for developers. This article delves into the realm of location data management using Spring JPA (Java Persistence\u2026","rel":"","context":"In &quot;Spring Databases&quot;","block_context":{"text":"Spring Databases","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_databases\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/international-1751293_1280.png?fit=1186%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/international-1751293_1280.png?fit=1186%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/international-1751293_1280.png?fit=1186%2C1200&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/international-1751293_1280.png?fit=1186%2C1200&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/international-1751293_1280.png?fit=1186%2C1200&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3692,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_aop\/tracking-method-access-in-spring-aop-security-and-jpa\/","url_meta":{"origin":3502,"position":5},"title":"Tracking Method Access in Spring: AOP, Security, and JPA","author":"Jeffery Miller","date":"April 20, 2026","format":false,"excerpt":"In the world of Spring applications, understanding how your methods are accessed can be crucial for various reasons like monitoring usage patterns, auditing security, or simply gathering insights into your application\u2019s behavior. Let\u2019s explore a powerful approach to track method access using Spring AOP (Aspect-Oriented Programming), Spring Security, and Spring\u2026","rel":"","context":"In &quot;Spring AOP&quot;","block_context":{"text":"Spring AOP","link":"https:\/\/www.mymiller.name\/wordpress\/category\/spring_aop\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/money-3523131_1280-jpg.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/money-3523131_1280-jpg.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/money-3523131_1280-jpg.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/money-3523131_1280-jpg.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2024\/09\/money-3523131_1280-jpg.avif 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/3502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/comments?post=3502"}],"version-history":[{"count":1,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/3502\/revisions"}],"predecessor-version":[{"id":3503,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/3502\/revisions\/3503"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/media\/3588"}],"wp:attachment":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/media?parent=3502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/categories?post=3502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/tags?post=3502"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/series?post=3502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}