After reading the following documentation, I was getting error over before method - The method before(Function<ServerRequest,ServerRequest>) is undefined for the type RouterFunction. Using this java-based configuration it solved the error. Signed-off-by: Aman Tripathi <iamtripathi.25@gmail.com>