An Introduction to Synchronized Java Collections 1. Overview The collections framework is a key component of Java. It provides an extensive number of interfaces and implementations, which allows us to create and manipulate different types of collections in a straightforward manner. Although using plain unsynchronized collections is simple overall, it… Continue Reading java-synchronized-collections

Javax BigDecimal Validation 1. Introduction In the tutorial Java Bean Validation Basics, we saw how to apply basic javax validation to various types, and in this tutorial, we’ll focus on using javax validation with BigDecimal. 2. Validating BigDecimal Instances Unfortunately, with BigDecimal, we can’t use the classic @Min or @Max javax annotations. Luckily,… Continue Reading javax-bigdecimal-validation

Spring MVC Custom Validation 1. Overview Generally, when we need to validate user input, Spring MVC offers standard predefined validators. However, when we need to validate a more particular type input, we have the possibility of creating our own, custom validation logic. In this article, we’ll do just that –… Continue Reading spring-mvc-custom-validator

Securing Java EE with Spring Security 1. Overview In this quick tutorial, we’ll be looking at how to secure a Java EE web application with Spring Security. 2. Maven Dependencies Let’s start with the required Spring Security dependencies for this tutorial: <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> <version>4.2.3.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> <version>4.2.3.RELEASE</version>… Continue Reading java-ee-spring-security

Using Subflows in Spring Integration 1. Overview Spring Integration makes it easy to use some Enterprise Integration Patterns. One of these ways is through its DSL. In this tutorial, we’ll take a look at the DSL’s support for subflows for simplifying some of our configurations. 2. Our Task Let’s say we have… Continue Reading spring-integration-subflows

Uploading MultipartFile with Spring RestTemplate 1. Overview This quick tutorial focuses on how to upload a multipart file using Spring’s RestTemplate. We’ll see both a single file and multiple files – upload using the RestTemplate. 2. What is an HTTP Multipart Request? Simply put, a basic HTTP POST request body holds… Continue Reading spring-rest-template-multipart-upload