Home » Tag Archives: Spring Data

Tag Archives: Spring Data

Augmenting a Spring Data repository through delegation

I have recently written several posts about Kotlin’s delegation. In doing so, I realised a useful way to apply it to Spring Data repositories. Which would allow Spring Data to continue sprinkling some magic while providing a route for customisation. The code shown in this post is in Kotlin, but is still relevant to Java. This post uses R2DBC, but ...

Read More »

Streaming live updates from a reactive Spring Data repository

This post details a naive implementation of streaming updates from a database to any other components that are interested in that data. More precisely, how to alter a Spring Data R2DBC repository to emit events to relevant subscribers. A little bit of background knowledge of R2DBC and Spring will be helpful for this post. My previous writings, Asynchronous RDBMS access ...

Read More »

Asynchronous RDBMS access with Spring Data R2DBC

spring-interview-questions-answers

Not too long ago, a reactive variant of the JDBC driver was released. Known as R2DBC. It allows data to be streamed asynchronously to any endpoints that have subscribed to it. Using a reactive driver like R2DBC together with Spring WebFlux allows you to write a full application that handles receiving and sending of data asynchronously. In this post, we ...

Read More »

Pagination and Sorting with Spring Data JPA

java-interview-questions-answers

Learn Pagination and Sorting with Spring Data JPA with code examples. Understand how to get Paginated and Sorted results using Springs PagingAndSortingRepository interface. 1 Overview While dealing with large amount of data the lazy processing is often essential. Even if a service returns a huge amount of data the consumer is less likely using it. Consider a shopping website, where ...

Read More »

Spring Data Redis: High-Availability with Sentinel

1. Overview For high-availability with Redis, we can use Spring Data Redis’ support for Redis Sentinel. With Sentinel, we can create a Redis deployment that automatically resists certain failures. Redis Sentinel also provides other collateral tasks such as monitoring, notifications and acts as a configuration provider for clients. At a high level, Sentinel’s capabilities are: Automated failover. When a master ...

Read More »

Spring Data with Thymeleaf

spring-interview-questions-answers

Intro Today I’ll talk about more specific issues. No design patterns or algorithms this time :-). We don’t always design software components from scratch. Often we have to try to make existing software components work together. Spring Boot is one the best free software in the Java world. It resolved a lot of configuration issues with Spring. It is very ...

Read More »

Cached Prepared Statements with Spring Data Cassandra

Today I have a short post on using Prepared Statements in Spring Data Cassandra. Spring provides you with some utilities to make using Prepared Statements easier rather than relying on registering queries manually yourself with the Datastax Java Driver. The Spring code provides a cache to store prepared statements that are frequently used. Allowing you to execute your queries via ...

Read More »

Containerising a Spring Data Cassandra application

I’m continuing my journey of learning Docker. I am still keeping it simple at this point. This time around, I am going to tackle converting a Spring and Cassandra application to use containers instead of running locally on the host machine. More precisely, using Spring Data Cassandra to sort out the application. I wish I looked at doing this change ...

Read More »

Spring Data Pivotal Gemfire Tutorial

spring-interview-questions-answers

1. Spring Data Pivotal Gemfire – Introduction In this post, we feature a comprehensive Tutorial on Spring Data Pivotal Gemfire. Pivotal Gemfire is an in-memory data grid solution powered by Apache Geode. The applications built with Pivotal Gemfire allow you to scale your system easily across distributed server nodes. Pivotal Gemfire ensures data consistency irrespective of the distribution architecture. It ...

Read More »