Blog

How to fix 404 error in Spring Boot

There are a few common reasons why you may get a 404 error in your Spring Boot application. I have put together a few of the most common reasons below: Your path parameter types don’t match If you try and access this path using Curl, you will get a 404 - Page Not Found error returned by …

How to use a Proxy with RestTemplates

I had an issue the other week where I needed my Spring Boot App’s RestTemplate to route requests through a corporate proxy… But only for certain host names. It turns out this is a pretty painless and easy configuration using Spring’s RestTemplateCustomizer. If your proxy requires Basic Auth, this will also selectively provide your credentials …

Adding a bearer token to a webpack proxy

I was testing a React web application locally the other day. It relies on an OAuth OpenID Connect reverse proxy for authentication but I didn’t want to have to go through the hassle of launching a local version of the API and then configuring it to the identity provider just so I could get …

Using Java’s Disjoint Method to Compare Lists

You may encounter a situation where you need to check an Array, List, or Set’s elements for commonality. Here are a few different situations in which you can use Java’s Disjoint function: Given two arrays, do any of the elements match between them? Given two Lists, Sets, or Collections, are any of the elements the same? Given …

IntelliJ Gradle Failed to ping owner of lock for file hash cache

I have been frequently encountering an error with Gradle builds in IntelliJ where Gradle will randomly fail to acquire a Gradle cache lock when running a build. It will also happen when using Gradle CLI commands, resulting in the following error in IntelliJ’s Build window: This seems to be intermittently caused by an issue in which …

Postgres Enum Arrays in JOOQ

When you are trying to perform array operations in Postgres, you may encounter some of the following array operations: @> Contains All of the elements of an array are present within the other <@ Is contained by Whether all of the elements in one array are contained within another && Overlap when two arrays contain at least one …

Export useid was not found in React

I encountered a strange issue the other day when attempting to import the useId hook in React so that I could automatically generate the ID’s on a list I was creating. That’s not right… I’m not doing anything special other than importing it along with my other dependencies like so: I was using React 16.x, quite a …