BAEL-944 Exploring the Spring MVC URL Matching Improvements (#1954)

* Example Code For Evaluation Article

This is an example code for the evaluation article on "Different Types of Bean Injection in Spring"

* Added unit tests

* Minor changes to application context

* Removed code committed for evaluation article

* BAEL-944 Demonstrating the problems with new Url pattern matching in Spring 5

* BAEL-944 Demonstrating the problems with new Url pattern matching in Spring 5

* BAEL-944 Exploring the Spring MVC URL Matching Improvements

* BAEL-944 Exploring the Spring MVC URL Matching Improvements

* BAEL-944 Exploring the Spring MVC URL Matching Improvements

* BAEL-944 Code Formatting and solving build issue

* BAEL-944 Resolving build issue due to change in Spring version

* BAEL-944 Resolving build issue

* BAEL-944 Formatting code

* BAEL-944 Moving tests to correct package

* BAEL-944 Moving tests to correct package

* BAEL-944 Replacing @RequestMapping by @GetMapping

* BAEL-944 Remove unnecessary attribute name, "value" in annotations
This commit is contained in:
Mansi
2017-06-21 06:30:10 +05:30
committed by yetanotherallisonf
parent ec46b8b338
commit 91b0efccd2
11 changed files with 323 additions and 4 deletions
@@ -15,6 +15,7 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.RouterFunctions;
import org.springframework.web.reactive.function.server.ServerResponse;
import org.springframework.web.server.WebHandler;
import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
import reactor.core.publisher.Flux;
@@ -58,7 +59,7 @@ public class FunctionalSpringBootApplication {
@Bean
public ServletRegistrationBean servletRegistrationBean() throws Exception {
HttpHandler httpHandler = WebHttpHandlerBuilder
.webHandler(toHttpHandler(routingFunction()))
.webHandler((WebHandler) toHttpHandler(routingFunction()))
.prependFilter(new IndexRewriteFilter())
.build();
ServletRegistrationBean registrationBean = new ServletRegistrationBean<>(new RootServlet(httpHandler), "/");