Jdbc Articles
3 articles about Jdbc. Explore Spring Boot implementation, design, and operations across related topics.
-
How to Detect and Debug HikariCP Connection Leaks in Spring Boot - leakDetectionThreshold and Thread Dump Analysis
This article walks through diagnosing the symptom of HikariCP's active connection count steadily increasing and exhausting over time, covering leakDetectionThreshold configuration, how to read the warning logs, pinpointing the leak location by cross-referencing thread dumps, and fixing it with try-with-resources.
-
How to Retrieve the Auto-Generated ID (AUTO_INCREMENT) After INSERT with Spring Boot + MyBatis
This article explains how to reflect the AUTO_INCREMENT/IDENTITY value generated by the DB after an INSERT in MyBatis back into your Java entity, covering both the annotation-based approach and the XML-based approach. It also introduces an alternative implementation using selectKey, and how to diagnose the typical causes when the ID comes back as 0/null.
-
How to Connect Spring Boot to MySQL - application.yml Configuration, JDBC URL Parameters, and Time Zone/Character Encoding Pitfalls
A step-by-step guide to connecting Spring Boot 3.x to MySQL 8, covering Docker Compose startup, application.yml configuration, and connectivity checks. Also covers recommended JDBC URL parameter values and how to fix the Public Key Retrieval error, date/time offsets, and utf8mb4 garbled characters.