The second part of this Guide introduces the real-life example project of Cucumber tests for end-to-end functional scripts. You’ll create the skeleton project, design the structure of packages and classes, and implement the HttpClient to trigger API calls to the backend system. Besides, we’ll add already two complete Cucumber’s Feature files using the most important Gherkin syntax’s functionalities.
In this first part of the guide, we cover the main concepts of BDD, TDD, Cucumber, and Gherkin. We detail the differences between the techniques and the tools, and how they can help improve the ways of working of your organization.
Within this chapter, you’ll learn how to develop the Reactive Web Server. We’ll use Spring WebFlux, available since Spring 5, and included from the Spring Boot 2.0 version. We’ll connect to a Mongo database using its reactive driver with Spring Data, also via Spring Boot.
In the previous chapter, we created a Spring Boot application that offers a Reactive Web API. We’ll cover in this one how to implement the client’s side using Angular with EventSource and RxJS’ Observable.
In this final section, we run the application and see how everything works for the two different approaches: WebFlux with Server-Sent Events and MVC blocking classic. This post compares those two alternatives as well, in terms of user’s experience, performance and ease of development.
This guide focuses on the capabilities of Spring WebFlux and Spring Boot 2 to create a Reactive Web Application, supported by a code example that you can build step by step.
To avoid dumb, non-realistic examples where Spring is also the client of the Reactive API, you will complete the stack with a client application in Angular 9. To make it reactive, you’ll use Server-Sent Events (SSE) to communicate the backend with the frontend. See the figure below for a quick view of the stack we’ll build.
In this post, you’ll learn how the magic, or better said the auto-configuration, works in Spring Boot. To do so, you’ll analyze how a basic Spring Boot app works to see how you get an embedded Tomcat web server in an example codebase available on Github.
The implementation of the JEP 330: Launch Single-File Source-Code Programs available from Java 11 allows us to write a script in Java and run it as a shebang file. This is very useful for developers like me, who are not very familiar with scripting with other languages like bash or python.
In this post, I’ll show you how to write a single-file script in Java and run it from the command line. As an extra topic, you’ll learn how to put this file in a Docker image for even easier distribution of your script.
This guide shows you how to implement custom error handling in Spring Boot. We use not only the well-known ControllerAdvice and ExceptionHandler annotations but also DefaultErrorAttributes and ErrorController to make your custom error attributes uniform and consistent.
The version 12 of Java comes with a new preview feature (amongst others): Switch Expressions. Let’s see how this feature can simplify some of our daily tasks.