Web

Testing Reactive Apps with SpringBoot

13 minute read Published:

Use Spring-boot 2.x to verify test stages of your WebFlux and Reactive Data Apps
The Producer Environment In the world of testing critical business funcationality, we dont need much inspiration to get the job done. However, when it comes to what to use, you may be left wandering whether you’ll hit all of the right frameworks and tools to validate your business code. Also likely, you’ll also need to figure out how to cross validate a producer app with a consumer app(s) that you may not even own!

Testing Reactive Apps with SpringBoot - The Consumer

7 minute read Published:

Use Spring-boot 2.x to verify test stages of your WebFlux and Reactive Data Apps
The Producer/Consumer exchange In the producer side, we setup a service that will let us query a database of teams. This article will focus on the consumer side of the communication chain - namely how to extract tests out of situations where the comunication chain is asymetrical. We will then dive into Spring Cloud Contract to aleviate this issue and produce a working producer/consumer contract. To start, we’ll need a data object for client state.

Setup and Customize a Login Page With Reactive Spring Security.

7 minute read Published:

Spring Security provides a intuitive and concise API for managing Authentication aspects within your app.
Customized WebFlux Form Authentication This demonstration examines Spring Security WebFlux’s Authentication mechanisms. We will look at authentication with HTML forms using Mustache, User Authentication, and customized form-based login / logout configurations. The ServerHttpSecurity Configuration SecurityWebFilterChain is the governing chain of [WebFilter]’s that allows us to lock down reactive WebFlux applications. With @EnableWebFluxSecurity turned on, we can build this object by issuing commands to the ServerHttpSecurity DSL object. SecurityConfiguration.java: @EnableWebFluxSecurity @Slf4j @Configuration public class SecurityConfiguration { @Bean public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) { return http .

Setup and customize Authentication against a WebFlux Application

4 minute read Published:

Spring Security provides a intuitive and concise API for managing Authentication aspects within your app.
Configuring Authentication against a WebFlux app This demonstration examines Spring Security WebFlux’s Authentication mechanisms. We will look at Authentication request escalation, as well as user-domain customizations. Authentication flow-control How do we determine when a request must provide an authentication context? Spring does this with help from an AuthenticationEntryPoint that identifies un-authenticated requests and returns with a response to the user to perform some authentication action. Configure ServerHttpSecurity to use HTTP-BASIC by calling it’s httpBasic() method.

Sending and consuming messages with Spring and KafKa

5 minute read Published:

This demonstration explains how to craft classical (not reactive) consumer/producer componentS within you Spring apps
Spring Kafka Writer and Readers What is Kafka Apache Kafka is an open-source stream-processing software platform developed by the Apache Software Foundation written in Scala and Java. You’ll find more information about Kafka at it’s Homepage. Intro to Spring For Apache Kafka The Spring for Apache Kafka (spring-kafka) project applies core Spring concepts to the development of Kafka-based messaging solutions. It provides a “template” as a high-level abstraction for sending messages.