com.foxinmy.weixin4j.spring
Class SpringBeanFactory

java.lang.Object
  extended by com.foxinmy.weixin4j.spring.SpringBeanFactory
All Implemented Interfaces:
BeanFactory

public class SpringBeanFactory
extends Object
implements BeanFactory

使用spring容器获取bean

Since:
JDK 1.6
Author:
jinyu(foxinmy@gmail.com)
See Also:

Constructor Summary
SpringBeanFactory(org.springframework.context.ApplicationContext context)
           
 
Method Summary
<T> T
getBean(Class<T> classType)
           
 Object getBean(String name)
           
<T> T
getBean(String name, Class<T> classType)
           
<T> Map<String,T>
getBeans(Class<T> clazz)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringBeanFactory

public SpringBeanFactory(org.springframework.context.ApplicationContext context)
Method Detail

getBean

public Object getBean(String name)
Specified by:
getBean in interface BeanFactory

getBean

public <T> T getBean(Class<T> classType)
Specified by:
getBean in interface BeanFactory

getBean

public <T> T getBean(String name,
                     Class<T> classType)
Specified by:
getBean in interface BeanFactory

getBeans

public <T> Map<String,T> getBeans(Class<T> clazz)
Specified by:
getBeans in interface BeanFactory


Copyright © 2014–2017. All rights reserved.