REST Assured Authentication
1. Overview In this tutorial, we’ll analyze how we can authenticate with REST Assured to test and validate a secured API properly. The tool provides support for several authentication schemes: Basic...
View ArticleJava Weekly, Issue 278
Here we go… 1. Spring and Java >> Microservices with Spring Boot and Spring Cloud. From config server to OAuth2 server (without inMemory things — Part 2 [itnext.io] This week’s installment shows...
View ArticleIntroduction to SPNEGO/Kerberos Authentication in Spring
1. Overview In this tutorial, we’ll understand the basics of the Kerberos authentication protocol. We’ll also cover the need for SPNEGO in connection with Kerberos. Finally, we’ll see how to make use...
View ArticleRendering Exceptions in JSON with Spring
1. Introduction Happy-path REST is pretty well-understood, and Spring makes this easy to do in Java. But what about when things go wrong? In this tutorial, we’ll go over passing a Java exception as...
View ArticleHow to Process YAML with Jackson
1. Introduction In this short tutorial, we’re going to learn how to use Jackson to read and write YAML files. After we go over our example structure, we’ll use the ObjectMapper to read a YAML file into...
View ArticlePattern Matching in Strings in Groovy
1. Overview In this article, we’ll look at the Groovy language features for pattern matching in Strings. We’ll see how Groovy’s batteries-included approach provides us with a powerful and ergonomic...
View ArticleConsole I/O in Kotlin
1. Introduction When we learn a new programing language, it’s common to start with console I/O. In this tutorial, we’ll explore some alternatives for handling console I/O with Kotlin. 2. Using the...
View ArticleMaps in Groovy
1. Overview Groovy extends the Map API in Java to provide methods for operations such as filtering, searching and sorting. It also provides a variety of shorthand ways of creating and manipulating...
View ArticleMongoDB BSON Guide
1. Introduction In this tutorial, we’ll be looking at BSON and how we can use it to interact with MongoDB. 2. What is BSON? BSON stands for Binary JSON. It’s a protocol for binary serialization of...
View ArticleJava 9 Migration Issues and Resolutions
1. Overview The Java platform used to have a monolithic architecture, bundling all packages as a single unit. In Java 9, this was streamlined with the introduction of the Java Platform Module System...
View ArticleDifference Between @Size, @Length, and @Column(length=value)
1. Overview In this quick tutorial, we’ll take a look at JSR-330‘s @Size, Hibernate‘s @Length and JPA @Column‘s length attribute. At first blush, these may seem the same, but they perform different...
View ArticleCheck If a String Contains a Substring
1. Overview In this tutorial, we’ll review several ways of checking if a String contains a substring, and we’ll compare the performance of each. 2. String.indexOf Let’s first try using the...
View ArticleWebClient Requests with Parameters
1. Overview A lot of frameworks and projects are introducing reactive programming and asynchronous request handling. Consequently, Spring 5 introduced a reactive WebClient implementation as a part of...
View ArticleJackson Support for Kotlin
1. Overview In this tutorial, we’ll discuss the Jackson support for Kotlin. We’ll explore how to serialize and deserialize both Objects and Collections. We’ll also make use of @JsonProperty and...
View ArticleSpring Data JPA and Named Entity Graphs
1. Overview Simply put, Entity Graphs are another way to describe a query in JPA 2.1. We can use them to formulate better-performing queries. In this tutorial, we’re going to learn how to implement...
View ArticleExtending an Array’s Length
1. Overview In this tutorial, we’ll take a look at the different ways in which we can extend a Java array. Since arrays are a contiguous block of memory, the answer may not be readily apparent, but...
View ArticleGuide to Maven Profiles
1. Overview Maven profiles can be used to create customized build configurations, like targeting a level of test granularity or a specific deployment environment. In this tutorial, we’ll learn how to...
View ArticleConvert Time to Milliseconds in Java
1. Overview In this quick tutorial, we’ll illustrate multiple ways of converting time into Unix-epoch milliseconds in Java. More specifically, we’ll use: Core Java’s java.util.Date and Calendar Java...
View ArticleJava Weekly, Issue 279
Here we go… 1. Spring and Java >> Analyzing dependencies in IntelliJ IDEA [vojtechruzicka.com] A couple of solid Maven tools available to IntelliJ IDEA Ultimate users — the Dependency Structure...
View ArticleWriting Clojure Webapps with Ring
1. Introduction Ring is a library for writing web applications in Clojure. It supports everything needed to write fully-featured web apps and has a thriving ecosystem to make it even more powerful. In...
View Article