org.springframework.web.servlet.HandlerAdapter Java Examples

The following examples show how to use org.springframework.web.servlet.HandlerAdapter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KSBDispatcherServlet.java    From rice with Educational Community License v2.0 5 votes vote down vote up
@Override
protected HandlerAdapter getHandlerAdapter(Object handler) throws ServletException {
	if (handler instanceof HttpRequestHandler) {
		return new HttpRequestHandlerAdapter();
	} else if (handler instanceof Controller) {
		Object unwrappedHandler = ClassLoaderUtils.unwrapFromProxy(handler);
		if (unwrappedHandler instanceof CXFServletControllerAdapter) {
			// TODO this just seems weird as this controller is initially null when it's created, does there need to be some synchronization here?
			((CXFServletControllerAdapter)unwrappedHandler).setController(cxfServletController);
		}			
		return new SimpleControllerHandlerAdapter();
	}
	throw new RiceRuntimeException("handler of type " + handler.getClass().getName() + " is not known and can't be used by " + KSBDispatcherServlet.class.getName());
}
 
Example #2
Source File: Application.java    From aws-serverless-java-container with Apache License 2.0 4 votes vote down vote up
@Bean
public HandlerAdapter handlerAdapter() {
    return new RequestMappingHandlerAdapter();
}
 
Example #3
Source File: SpringApiConfig.java    From aws-serverless-java-container with Apache License 2.0 4 votes vote down vote up
@Bean
public HandlerAdapter handlerAdapter() {
    return new RequestMappingHandlerAdapter();
}
 
Example #4
Source File: Application.java    From aws-serverless-java-container with Apache License 2.0 4 votes vote down vote up
@Bean
public HandlerAdapter handlerAdapter() {
    return new RequestMappingHandlerAdapter();
}
 
Example #5
Source File: PetStoreSpringAppConfig.java    From aws-serverless-java-container with Apache License 2.0 4 votes vote down vote up
@Bean
public HandlerAdapter handlerAdapter() {
    return new RequestMappingHandlerAdapter();
}
 
Example #6
Source File: Application.java    From aws-serverless-java-container with Apache License 2.0 4 votes vote down vote up
@Bean
public HandlerAdapter handlerAdapter() {
    return new RequestMappingHandlerAdapter();
}