Example usage for org.springframework.web.servlet.mvc UrlFilenameViewController UrlFilenameViewController

List of usage examples for org.springframework.web.servlet.mvc UrlFilenameViewController UrlFilenameViewController

Introduction

In this page you can find the example usage for org.springframework.web.servlet.mvc UrlFilenameViewController UrlFilenameViewController.

Prototype

UrlFilenameViewController

Source Link

Usage

From source file:de.dlopes.stocks.facilitator.config.JsfMvcConfig.java

/**
* Maps request paths to flows in the flowRegistry; e.g. a path of 
* /stock-info looks for a flow with id "stock-info" 
* 
* @return a FlowHandlerMapping instance (bound to the flowRegistry defined 
*          in {@link WebFlowConfig})// www.jav a  2s.c  o m
*/
@Bean
public FlowHandlerMapping flowHandlerMapping() {
    FlowHandlerMapping mapping = new FlowHandlerMapping();
    mapping.setOrder(1);
    mapping.setFlowRegistry(this.webFlowConfig.flowRegistry());

    /* If no flow matches, map the path to a view, e.g. "/index" maps to a 
     * view named "index" */
    mapping.setDefaultHandler(new UrlFilenameViewController());
    return mapping;
}