Example usage for org.springframework.web.servlet.mvc.method.annotation RequestMappingHandlerAdapter setApplicationContext

List of usage examples for org.springframework.web.servlet.mvc.method.annotation RequestMappingHandlerAdapter setApplicationContext

Introduction

In this page you can find the example usage for org.springframework.web.servlet.mvc.method.annotation RequestMappingHandlerAdapter setApplicationContext.

Prototype

@Override
    public final void setApplicationContext(@Nullable ApplicationContext context) throws BeansException 

Source Link

Usage

From source file:org.cloudfoundry.identity.uaa.config.HandlerAdapterFactoryBean.java

@Override
public HandlerAdapter getObject() throws Exception {
    RequestMappingHandlerAdapter adapter = new RequestMappingHandlerAdapter();
    adapter.setApplicationContext(applicationContext);
    adapter.setMessageConverters(getMessageConverters());
    adapter.setOrder(0);//from   ww w  .  ja  v a  2  s  . co  m
    adapter.setReturnValueHandlers(Arrays.<HandlerMethodReturnValueHandler>asList(
            new ScimEtagHandlerMethodReturnValueHandler(getMessageConverters())));
    adapter.afterPropertiesSet();
    return adapter;
}