Class SpringBeanFactory
java.lang.Object
io.github.lunasaw.sip.common.utils.SpringBeanFactory
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
@Component
public class SpringBeanFactory
extends Object
implements org.springframework.context.ApplicationContextAware
- Author:
- luna
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
获取当前环境static <T> T
获取对象 这里重写了bean方法,起主要作用void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) 实现ApplicationContextAware接口的回调方法,设置上下文环境
-
Constructor Details
-
SpringBeanFactory
public SpringBeanFactory()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException 实现ApplicationContextAware接口的回调方法,设置上下文环境- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
getBean
获取对象 这里重写了bean方法,起主要作用- Throws:
org.springframework.beans.BeansException
-
getActiveProfile
获取当前环境
-