类org.springframework.web.servlet.mvc.Controller源码实例Demo

下面列出了怎么用org.springframework.web.servlet.mvc.Controller的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: rice   文件: KSBDispatcherServlet.java
@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());
}
 
源代码2 项目: lams   文件: ControllerTypePredicate.java
public boolean isControllerType(Class<?> beanClass) {
	return Controller.class.isAssignableFrom(beanClass);
}
 
public boolean isControllerType(Class<?> beanClass) {
	return Controller.class.isAssignableFrom(beanClass);
}
 
源代码4 项目: engine   文件: HttpProxyFilter.java
public HttpProxyFilter(boolean enabled, Controller proxyController) {
    this.enabled = enabled;
    this.proxyController = proxyController;
}
 
 类方法
 同包方法