Search in sources :

Example 1 with Controller

use of org.springframework.web.servlet.mvc.Controller in project cas by apereo.

the class CasWebAppConfiguration method handlerMapping.

@Bean
public SimpleUrlHandlerMapping handlerMapping() {
    final SimpleUrlHandlerMapping mapping = new SimpleUrlHandlerMapping();
    final Controller root = rootController();
    mapping.setOrder(1);
    mapping.setAlwaysUseFullPath(true);
    mapping.setRootHandler(root);
    final Map urls = new HashMap();
    urls.put("/", root);
    mapping.setUrlMap(urls);
    return mapping;
}
Also used : HashMap(java.util.HashMap) Controller(org.springframework.web.servlet.mvc.Controller) ParameterizableViewController(org.springframework.web.servlet.mvc.ParameterizableViewController) HashMap(java.util.HashMap) Map(java.util.Map) SimpleUrlHandlerMapping(org.springframework.web.servlet.handler.SimpleUrlHandlerMapping) ServletListenerRegistrationBean(org.springframework.boot.web.servlet.ServletListenerRegistrationBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 ServletListenerRegistrationBean (org.springframework.boot.web.servlet.ServletListenerRegistrationBean)1 Bean (org.springframework.context.annotation.Bean)1 SimpleUrlHandlerMapping (org.springframework.web.servlet.handler.SimpleUrlHandlerMapping)1 Controller (org.springframework.web.servlet.mvc.Controller)1 ParameterizableViewController (org.springframework.web.servlet.mvc.ParameterizableViewController)1