How do you implement custom repository implementations in Spring Data JPA?
Add hand-written methods to a Spring Data JPA repository with a fragment interface and an Impl class, and learn when a custom base repository is justified.
2,882 posts about Java: questions with answers, tutorials and articles, newest first.
Add hand-written methods to a Spring Data JPA repository with a fragment interface and an Impl class, and learn when a custom base repository is justified.
Hook into persist, update, remove and load events with JPA lifecycle callbacks, entity listeners and mapped superclasses, plus the rules that trip people up.
JPA maps one-to-one, one-to-many, many-to-one and many-to-many links with annotations. Learn the owning side, cascades, fetch types and common pitfalls.
They are Spring Data auditing annotations that fill creation and update timestamps automatically. Learn how to enable and use them correctly.
Flyway does not have an @Migration annotation. Migrations are found by file name or by extending BaseJavaMigration. See the naming rules and a Java example.
Emit JSON logs from Spring Boot, ship them to Logstash over TCP or Filebeat, index them in Elasticsearch and explore them in Kibana, with MDC and trace id enrichment.
Expose Spring Boot metrics with Actuator and Micrometer, scrape them with Prometheus and build near real-time Grafana dashboards with PromQL.
Expose Spring Boot metrics through Actuator and Micrometer, scrape them with Prometheus, and visualise them in Grafana. Includes a Docker Compose setup and PromQL panel queries.
Expose Spring Boot metrics with Actuator and Micrometer, scrape them with Prometheus and build Grafana dashboards, with a Docker Compose setup.
Expose Spring Boot metrics with Actuator and Micrometer, write Prometheus alert rules, and route notifications through Alertmanager.
Add Actuator and micrometer-registry-prometheus, expose the prometheus endpoint, configure a scrape job and register custom Micrometer metrics in Spring Boot.
PrometheusTemplate does not exist in Spring Boot. Metrics are recorded with Micrometer's MeterRegistry and exposed by PrometheusMeterRegistry through the Actuator endpoint.
Expose Spring Boot metrics with Actuator and Micrometer, scrape them with Prometheus and build Grafana dashboards using current Boot 3 property names.
Connect Spring Boot to InfluxDB 2.x, write tagged measurements and analyse them with Flux windowed aggregations exposed through a REST API.
InfluxDB does not support transactions, so Spring Boot code must rely on batched writes, idempotent points and retries. This guide shows the practical patterns.
Spring Boot connects to an InfluxDB cluster through a single load-balanced URL. See the client bean, writes, queries and health check, and why multi-URL clients do not exist.
Set up the InfluxDB Java client in Spring Boot, run Flux queries, map results to typed classes and learn what changes with InfluxDB 3 and SQL.
InfluxDBTemplate is an old helper for InfluxDB 1.x, not part of Spring Boot. Learn what it did and how to use the official Java client today.
Connect Spring Boot to InfluxDB 2.x with the official Java client, write and batch time-series points, and query them with Flux.
Use @Transactional with Spring Data Neo4j 7 in Spring Boot 3, run Cypher in the same transaction, control rollback and test against a real Neo4j container.