list to map

Convert List to Map with Java Streams

Create stored procedure with SQL tag in Liquibasestored procedure

Java Streams are good for manipulating a collection of objects. A classic example of a collection that is often used for streams is a list. Rarely, but still sometimes, we want to transform a list to a map. See how.

increment operator

Thread-safe alternative to i++

Thread-safe alternative to i++quiz

As we already know that ++ operator is not thread-safe, a question how to increment an integer in a thread-safe manner? becomes valid. This time I will show you one of the ways. A method that is very simple to apply in almost any case.

is increment operator atomic

Is i++ atomic in Java?

Breaking down into modules in Angularquiz

We usually do not think about concurrency when building simple web applications. That is a mistake. Web applications may process multiple requests at the same time, and inconsistencies coming from concurrency may suddenly cause problems. Today's question is is i++ atomic in Java?. Can we assume that one of the simplest operations is thread-safe?



Will Spring4Shell and Log4Shell change the view on community projects?

Will Spring4Shell and Log4Shell change the view on community projects?Spring JDBC plus two datasources

At the end of March 2022, a serious security vulnerability was discovered in Spring Framework. All versions of spring-core were affected if used with Java 9 and newer. Unfortunately, it happened soon after Log4Shell.

Spring JDBC + 2 datasources

Spring Data JDBC with two datasources

Spring Data JDBC with two datasourcesSpring JDBC plus two datasources

Two databases used by one Spring Boot application does not seem tricky. But they both are accessed through Spring Data JDBC. And then the most tutorials remains tight-lipped. Even though that is not straight forward but still possible.


We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.