Example usage for org.springframework.web.servlet.handler SimpleUrlHandlerMapping setAlwaysUseFullPath

List of usage examples for org.springframework.web.servlet.handler SimpleUrlHandlerMapping setAlwaysUseFullPath

Introduction

In this page you can find the example usage for org.springframework.web.servlet.handler SimpleUrlHandlerMapping setAlwaysUseFullPath.

Prototype

public void setAlwaysUseFullPath(boolean alwaysUseFullPath) 

Source Link

Document

Shortcut to same property on underlying #setUrlPathHelper UrlPathHelper .

Usage

From source file:org.jclouds.demo.tweetstore.config.SpringServletConfig.java

@Bean
public HandlerMapping handlerMapping() {
    SimpleUrlHandlerMapping mapping = new SimpleUrlHandlerMapping();
    Map<String, Object> urlMap = Maps.newHashMapWithExpectedSize(2);
    urlMap.put("/store/*", storeTweetsController());
    urlMap.put("/tweets/*", addTweetsController());
    urlMap.put("/stores/*", enqueueStoresController());
    urlMap.put("/clear/*", clearTweetsController());
    mapping.setUrlMap(urlMap);//from  w w w  .j  ava2s.c  o m
    /*
     * "/store", "/tweets" and "/stores" are part of the servlet mapping and thus 
     * stripped by the mapping if using default settings.
     */
    mapping.setAlwaysUseFullPath(true);
    return mapping;
}