Using ServletUriComponentsBuilder with Nginx

Spring’s¬†ServletUriComponentsBuilder.fromCurrentRequest() can be really convinient to build an URL from the current request. However, when using Nginx, things might work so well. The solution is simple, just add these headers to your Nginx configuration file: proxy_set_header X-Forwarded-Host $host:443; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-Port 443; proxy_set_header X-Forwarded-Proto https;

Angular-datatables with server side pagination using Spring Data

We are using angular-datatables in a project. So far, we just returned all entities from the server’s REST controller (Using Spring Boot and Spring Data on the server side). I wanted to see how I could implement server side pagination to avoid returning all records at once. I was lucky to find spring-data-jpa-datatables which makes…

Read-only EntryProcessors with Hazelcast

This post is a follow-up on my post EntryProcessors and EntryBackupProcessors with Hazelcast. In the comments, Peter Veentjer from Hazelcast gave me the idea to use an EntryProcessor to read part of the data. I will show you below how to best do this. We start with a cache that has 10 User objects in…

EntryProcessors and EntryBackupProcessors with Hazelcast

Hazelcast has the concept of EntryProcessors (like Oracle Coherence). EntryProcessors allow to update cache entries without having to pull over the actual values. You move the processing to where the value lives and update the cache there. Furthermore, Hazelcast has the notion of EntryBackupProcessor (which Coherence does not have). To explain the usage of this,…