Logging Spring WebClient Calls 1. Overview In this tutorial, we are going to show how to customize Spring’s WebClient – a reactive HTTP client – to log requests and responses. 2. WebClient WebClient is a reactive and non-blocking interface for HTTP requests, based on Spring WebFlux. It has a functional,… Continue Reading spring-log-webclient-calls

Introduction to Spring REST Docs 1. Overview Spring REST Docs generates documentation for RESTful services that is both accurate and readable. It combines hand-written documentation with auto-generated document snippets produced with Spring tests. 2. Advantages One major philosophy behind the project is the use of tests to produce the documentation.… Continue Reading spring-rest-docs

Unable to Locate Spring NamespaceHandler for XML Schema Namespace 1. The Problem This article will discuss one of the most common configuration problems in Spring – a namespace handler for one of the Spring namespaces is not found. Most of the time, this means one particular Spring jar is missing… Continue Reading unable-to-locate-spring-namespacehandler-for-xml-schema-namespace

Testing with Spring and Spock 1. Introduction In this short tutorial, we’ll show the benefits of combining the supporting power of Spring Boot‘s testing framework and the expressiveness of the Spock framework whether that be for unit or integration tests. 2. Project Setup Let’s start with a simple web application. It can… Continue Reading spring-spock-testing

Guide to UriComponentsBuilder in Spring 1. Introduction In this tutorial, we are going to focus on the Spring UriComponentsBuilder. More specifically, we’ll describe various practical implementation examples. The builder works in conjunction with the UriComponents class – an immutable container for URI components. A new UriComponentsBuilder class helps to create… Continue Reading spring-uricomponentsbuilder

Custom Login Page for Returning User 1. Introduction This article is a continuation of our ongoing registration with Spring Security series. In this article, we are going to have a look at how to develop a custom login page for a user who is returning to our application. The user… Continue Reading custom-login-page-for-returning-user

ETags for REST with Spring 1. Overview This article will focus on working with ETags in Spring, integration testing of the REST API and consumption scenarios with curl. Further reading: Introduction to Spring REST Docs This article introduces Spring REST Docs, a test-driven mechanism to generate documentation for RESTful services… Continue Reading etags-for-rest-with-spring