Tag

JPA

0 views collected around this technical thread.

Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 14, 2025 · Backend Development

Master Java Stream API: 15 Real-World Examples and Performance Tips

Explore 15 practical Java Stream API examples—from filtering and mapping to parallel processing and JPA integration—demonstrating how to write concise, efficient code, improve performance, and avoid memory issues, with full code snippets and explanations for each use case.

JPAJavaSpring Boot
0 likes · 13 min read
Master Java Stream API: 15 Real-World Examples and Performance Tips
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Apr 24, 2025 · Backend Development

Mastering JPA with @Formula, @SQLRestriction, and @Filter in Spring Boot 3

This article explains how three Hibernate annotations—@Formula, @SQLRestriction (or @Where), and @Filter—solve common JPA pain points such as scattered query logic, duplicated calculations, and hard‑coded filters, providing code‑reduction, better performance, and easier maintenance in Spring Boot 3 projects.

AnnotationsDynamic QueriesHibernate
0 likes · 8 min read
Mastering JPA with @Formula, @SQLRestriction, and @Filter in Spring Boot 3
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Apr 3, 2025 · Backend Development

Master Spring Boot 3 Entity Design: Best Practices & Real‑World Examples

This article walks through essential Spring Boot 3 JPA entity design techniques—including inheritance, primary‑key mapping, relationship handling, cascade operations, validation, auditing, DTO projection, and index creation—providing clear code examples and configuration tips for building robust, maintainable backend services.

AuditingEntity DesignHibernate
0 likes · 11 min read
Master Spring Boot 3 Entity Design: Best Practices & Real‑World Examples
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 27, 2025 · Backend Development

How to Log SQL Statements in Spring Boot 3 Using JDBC, JPA, MyBatis & datasource-proxy

This article announces a Spring Boot 3 case collection with 100 permanent examples and then provides a comprehensive guide on recording SQL statements in Spring Boot applications via JDBC, JPA, MyBatis and the datasource‑proxy library, including configuration snippets, code samples and visual output illustrations.

JDBCJPAMyBatis
0 likes · 8 min read
How to Log SQL Statements in Spring Boot 3 Using JDBC, JPA, MyBatis & datasource-proxy
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 26, 2025 · Backend Development

Mastering Optimistic Locking in Spring Boot 3: From Pitfalls to Proven Solutions

This article examines the challenges of using JPA optimistic locking for inventory deduction under high concurrency, demonstrates why naive retry logic can cause deadlocks and stale data, and walks through five progressively refined implementations that resolve transaction, caching, and isolation issues.

JPAOptimistic LockingSpring Boot
0 likes · 13 min read
Mastering Optimistic Locking in Spring Boot 3: From Pitfalls to Proven Solutions
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Feb 24, 2025 · Backend Development

Master Logical Deletion in Spring Boot 3 with JPA and MyBatis

This article explains the concept and benefits of logical deletion, then demonstrates how to implement it in Spring Boot 3 using JPA annotations like @SQLDelete and @SoftDelete, and MyBatis‑Plus configuration, complete with code examples and SQL output.

BackendJPAJava
0 likes · 7 min read
Master Logical Deletion in Spring Boot 3 with JPA and MyBatis
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 25, 2024 · Backend Development

Mastering Spring Boot 3 Validation: From Annotations to Global Error Handling

This article provides a comprehensive guide to data validation in Spring Boot 3, covering Bean Validation annotations, controller and service‑layer checks, JPA entity validation, custom constraints, validation groups, programmatic validation, and internationalized error messages with practical code examples and tests.

Bean ValidationInternationalizationJPA
0 likes · 16 min read
Mastering Spring Boot 3 Validation: From Annotations to Global Error Handling
Selected Java Interview Questions
Selected Java Interview Questions
Oct 5, 2024 · Backend Development

Improving JPA Development with MyBatis‑Flex: Practical Tips and Code Examples

This article examines the limitations of using JPA for complex queries in SpringBoot projects and demonstrates how MyBatis‑Flex can simplify conditional queries, partial field selection, Kotlin integration, and code generation through clear code examples and practical guidance.

BackendJPAJava
0 likes · 10 min read
Improving JPA Development with MyBatis‑Flex: Practical Tips and Code Examples
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 8, 2024 · Backend Development

How to Monitor and Optimize SQL Performance in Spring Boot with p6spy

Learn how to seamlessly integrate the open‑source p6spy tool into a Spring Boot 3.2.5 application to automatically log SQL statements, measure execution times, customize logging formats, and fine‑tune database performance using both MyBatis and JPA examples.

JPAMyBatisSQL monitoring
0 likes · 8 min read
How to Monitor and Optimize SQL Performance in Spring Boot with p6spy
FunTester
FunTester
Aug 30, 2024 · Backend Development

Choosing a Java ORM Framework: Key Factors, Popular Options, and Implementation Steps

This article explains why Java ORM frameworks are essential for simplifying database access, outlines the critical criteria for selecting the right ORM, compares popular choices such as Hibernate, JPA, EclipseLink, and DataNucleus, and provides a step‑by‑step guide for successful implementation.

BackendDatabaseHibernate
0 likes · 14 min read
Choosing a Java ORM Framework: Key Factors, Popular Options, and Implementation Steps
macrozheng
macrozheng
Apr 29, 2024 · Backend Development

Boost Java Development with MyBatisX: Full Guide to Code Generation and JPA Features

This article introduces MyBatisX, an IDEA plugin that streamlines MyBatis development with navigation, GUI‑based code generation, customizable templates, JPA‑style method hints, and icon settings, providing step‑by‑step instructions and visual examples to enhance backend productivity.

IDEA pluginJPAJava
0 likes · 8 min read
Boost Java Development with MyBatisX: Full Guide to Code Generation and JPA Features
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jan 10, 2024 · Backend Development

Why Does Spring Data JPA Insert Duplicate Users? Transaction & Lock Solutions

This article explains why a SpringBoot 3.0.9 application creates duplicate user rows when sending confirmation emails, analyzes the transactional behavior causing the issue, and presents three solutions—including pessimistic locking, narrowing transaction scope, and an event‑driven approach—to ensure data consistency.

EventDrivenJPAPessimisticLock
0 likes · 8 min read
Why Does Spring Data JPA Insert Duplicate Users? Transaction & Lock Solutions
Architecture Digest
Architecture Digest
Dec 22, 2023 · Backend Development

Understanding @Transactional(readOnly = true) in Spring: Mechanics, Performance Benefits, and Usage Considerations

This article explains how Spring's @Transactional(readOnly = true) works internally, shows the performance and memory advantages it brings, compares service‑layer and repository‑layer usage with concrete connection‑pool tests, and provides guidance on when to apply it in JPA‑based backend applications.

BackendJPAReadOnly
0 likes · 9 min read
Understanding @Transactional(readOnly = true) in Spring: Mechanics, Performance Benefits, and Usage Considerations
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Dec 19, 2023 · Backend Development

Mastering Auditing in Spring Data JPA: Step‑by‑Step Guide

This tutorial explains why auditing is essential, outlines the benefits such as data tracking, security, troubleshooting and compliance, and provides a complete Spring Data JPA implementation with code examples, testing procedures, and required dependencies.

AuditingJPAJava
0 likes · 6 min read
Mastering Auditing in Spring Data JPA: Step‑by‑Step Guide
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Nov 19, 2023 · Backend Development

Mastering Pessimistic and Optimistic Locks in Spring Boot 2.6.12

This article explains the concepts of pessimistic and optimistic locking, compares their use cases, demonstrates version‑based and CAS implementations, and shows a complete Spring Boot example with retry‑enabled optimistic lock handling using AOP and custom annotations.

JPAJava ConcurrencySpring Boot
0 likes · 12 min read
Mastering Pessimistic and Optimistic Locks in Spring Boot 2.6.12
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Oct 21, 2023 · Backend Development

Comprehensive Spring Boot Tutorial: Configuration, Logging, MVC, Data Access, Docker, and Custom Starters

This tutorial provides an in‑depth guide to Spring Boot covering core concepts such as project setup, configuration files, logging frameworks, MVC architecture, CRUD examples, error handling, embedded servlet containers, Docker integration, JDBC/MyBatis/JPA data access, startup process, and how to create custom starter modules.

BackendDockerJPA
0 likes · 47 min read
Comprehensive Spring Boot Tutorial: Configuration, Logging, MVC, Data Access, Docker, and Custom Starters
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 6, 2023 · Backend Development

Secure Your Spring Boot Data with MyBatis Custom TypeHandler Encryption

This tutorial demonstrates how to integrate a custom MyBatis TypeHandler in a Spring Boot 2.6.12 application to automatically encrypt sensitive fields before persisting them to MySQL and decrypt them on retrieval, covering dependencies, configuration, entity definition, encryption utilities, mapper XML, and test cases.

Custom TypeHandlerEncryptionJPA
0 likes · 10 min read
Secure Your Spring Boot Data with MyBatis Custom TypeHandler Encryption
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 23, 2023 · Backend Development

Configure Atomikos JTA with Spring Boot for Multi‑DataSource Transactions

This guide walks through setting up a Spring Boot project with JDK 8, Atomikos, and JPA to manage two MySQL data sources, configure JTA transaction handling, define entity managers, services, and a controller, and demonstrates successful and failing transaction scenarios with code snippets and screenshots.

AtomikosJPAJTA
0 likes · 11 min read
Configure Atomikos JTA with Spring Boot for Multi‑DataSource Transactions
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 20, 2023 · Backend Development

Master Spring Batch: Build a File‑to‑Database Batch Job with Spring Boot

This tutorial walks through using Spring Batch with Spring Boot 2.6.12 to create a batch job that reads CSV data, processes each record, and writes the results into a MySQL database, covering architecture, configuration, code components, and execution steps.

JPAJavaMySQL
0 likes · 11 min read
Master Spring Batch: Build a File‑to‑Database Batch Job with Spring Boot
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 7, 2023 · Backend Development

How to Configure Master‑Slave Data Sources in Spring Boot with JPA & MyBatis

This guide walks through setting up a Spring Boot 2.4.12 project with JDK 1.8, Oracle, and two data sources—master and slave—covering Maven dependencies, application.yml settings, custom property classes, HikariDataSource beans, JPA EntityManagerFactory, MyBatis SqlSessionFactory, mapper scanning, and testing entity creation to verify successful configuration.

HikariCPJPAMyBatis
0 likes · 21 min read
How to Configure Master‑Slave Data Sources in Spring Boot with JPA & MyBatis