Q: How to use RouterFunction of Spring 5 in web project? Issue:
On Submit button i call /hello but it gives me HTTP Status 404 
I'm new on Spring 5 so help me, How can i forward /hello request. I want to implement important Spring 5 features : 
(1) Reactive programming support
(2) Functional web framework


HelloHandler.java
package com.demo;

import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class HelloHandler {
    public  Mono<ServerResponse> handleRequest(ServerRequest serverRequest) {
        return ServerResponse.ok().body(Mono.just("Hello World!"), String.class);
    }
}

SpringAction.java
package com.demo;

import static org.springframework.web.reactive.function.server.RequestPredicates.GET;
import static org.springframework.web.reactive.function.server.RequestPredicates.POST;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.RouterFunctions;
import org.springframework.web.reactive.function.server.ServerResponse;

@Configuration
public class SpringAction {

    @Bean
    HelloHandler helloHandler() {
        System.out.println("SpringAction.helloHandler()");
        return new HelloHandler();
    }

    @Bean
    public RouterFunction<ServerResponse> helloRouterFunction(HelloHandler helloHandler) {
        return RouterFunctions.route(GET("/hello"), helloHandler::handleRequest)
                .andRoute(GET("/SpringFunctionalWebFramework/hello"), helloHandler::handleRequest);
    }     
}

SpringFunctionalWebFramework-servlet.xml
<beans xmlns = "http://www.springframework.org/schema/beans"
   xmlns:context = "http://www.springframework.org/schema/context"
   xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation = "http://www.springframework.org/schema/beans     
   http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
   http://www.springframework.org/schema/context 
   http://www.springframework.org/schema/context/spring-context-3.0.xsd">

   <context:component-scan base-package = "com.demo" />

   <bean class = "org.springframework.web.servlet.view.InternalResourceViewResolver">
      <property name = "prefix" value = "/WEB-INF/jsp/" />
      <property name = "suffix" value = ".jsp" />
   </bean>

</beans>

index.jsp
<body>
    <h1>Hello World.</h1>
    <form action="hello" method="GET">
        <input type="submit" value="Submit">
    </form>
</body>

I also want to know that is it possible to use RouterFunction facility without Spring-boot or not?

A: Your application depends on spring-webmvc, as described in the Spring Boot reference documentation, this will make your application a Spring MVC app. So you should first figure out what's bringing that dependency and remove it from your build.
Next, it seems your app doesn't have a @SpringBootApplication annotated class; if you want a good starting point, you should create your app using start.spring.io and select the webflux starter.
Next, Spring Boot doesn't need nor support -servlet.xml files. You should read up about Spring Boot in its reference documentation or take a look at the Spring guides.
Spring WebFlux doesn't support JSPs, so there's no need to configure an internalviewresolver nor add JSP files in your app. You should instead look for a modern view technology like mustache, thymeleaf, etc (all listed on start.spring.io).
You can of course use Spring WebFlux without Spring Boot, but it requires manual setup and deployment (in an embedded or external container). I'd argue that Spring Boot is by far the easiest way.
