List of usage examples for org.springframework.messaging.handler HandlerMethod HandlerMethod
private HandlerMethod(HandlerMethod handlerMethod, Object handler)
From source file:org.springframework.messaging.handler.HandlerMethod.java
/** * If the provided instance contains a bean name rather than an object instance, * the bean name is resolved before a {@link HandlerMethod} is created and returned. *//*from w w w.j a v a2 s . c om*/ public HandlerMethod createWithResolvedBean() { Object handler = this.bean; if (this.bean instanceof String) { Assert.state(this.beanFactory != null, "Cannot resolve bean name without BeanFactory"); String beanName = (String) this.bean; handler = this.beanFactory.getBean(beanName); } return new HandlerMethod(this, handler); }