Learn to retrieve the response body from a ServletResponse in a Spring Boot filter.
Search Results for: filter
How to Autowire a Spring Bean in a Servlet Filter
Explore various approaches to seamlessly obtain Spring beans within a Servlet filter.
Context-Specific Deserialization Filters in Java 17
Explore Java’s latest enhancement, Context-Specific Deserialization Filter (JEP 415), in action.
Add Field to an Existing MongoDB Bson Filter in Java
A quick and practical guide to adding a field to an existing MongoDB bson filter.
Guide to Filters in MongoDB
Learn how to use Filters builders to perform filter operations on a MongoDB collection.
Java 8 Streams: Multiple Filters vs. Complex Condition
Let’s compare different ways of filtering Java Streams.
Filter Java Stream to 1 and Only 1 Element
Learn two methods from Collectors to retrieve the unique element which matches a certain predicate in a given stream of elements.
What Is OncePerRequestFilter?
Learn how to use the Spring OncePerRequestFilter to ensure your filter code is executed only once for each request.
HandlerInterceptors vs. Filters in Spring MVC
Compare the Java servlet Filter and the Spring MVC HandlerInterceptor and learn when one might be preferable over the other
CharacterEncodingFilter In SpringBoot
Learn about the CharacterEncodingFilter and its usage in a Spring Boot application.
Spring Cloud Gateway WebFilter Factories
Learn about Spring Cloud Gateway’s built-in WebFilter factories and how to use them in advanced scenarios
Modifying the Response Body in a Zuul Filter
Learn about the Netflix Zuul’s post filter.
Writing Custom Spring Cloud Gateway Filters
Learn how to write custom Spring Cloud Gateway filters.
Spring @ComponentScan – Filter Types
Explore different types of filter options available with the @ComponentScan annotation.
Excluding URLs for a Filter in a Spring Web Application
Learn how to exclude URLs from being executed in Spring Web filters. A bit advanced but highly highly useful.
Spring WebClient Filters
Learn about WebClient filters in Spring WebFlux
Tagging and Filtering JUnit Tests
Learn about a few filtering techniques for JUnit 5 test cases
Filtering a Java Collection by a List
Learn different ways to filter a Collection in Java based on the values of another list
Filtering Jackson JSON Output Based on Spring Security Role
Learn how to filter JSON output in a web application based on a Spring Security role.
Counting Matches on a Stream Filter
Learn how to filter a Stream and count the matches