class SpringContextComponent extends AbstractComponent {

    public static ComponentType SPRING_COMPONENT_TYPE = new ComponentType("Spring");

    public SpringContextComponent(ComponentName componentName, Implementation implementation,
                                  SofaRuntimeContext sofaRuntimeContext) {
        this.implementation = implementation;
        this.componentName = componentName;
        this.sofaRuntimeContext = sofaRuntimeContext;
    }

    @Override
    public ComponentType getType() {
        return SPRING_COMPONENT_TYPE;
    }

    @Override
    public Map<String, Property> getProperties() {
        return null;
    }

    @Override
    public ApplicationContext getApplicationContext() {
        return (ApplicationContext) implementation.getTarget();
    }

    @Override
    public void activate() throws ServiceRuntimeException {
        if (componentStatus != ComponentStatus.RESOLVED) {
            return;
        }

        componentStatus = ComponentStatus.ACTIVATED;
    }

    @Override
    public void deactivate() throws ServiceRuntimeException {<FILL_FUNCTION_BODY>}
}

        if (implementation instanceof SpringContextImplementation) {
            AbstractApplicationContext applicationContext = (AbstractApplicationContext) implementation
                .getTarget();
            applicationContext.close();
        }
        super.deactivate();
    
<methods>public non-sealed void <init>() ,public void activate() throws com.alipay.sofa.runtime.api.ServiceRuntimeException,public boolean canBeDuplicate() ,public void deactivate() throws com.alipay.sofa.runtime.api.ServiceRuntimeException,public java.lang.String dump() ,public void exception(java.lang.Exception) throws com.alipay.sofa.runtime.api.ServiceRuntimeException,public org.springframework.context.ApplicationContext getApplicationContext() ,public com.alipay.sofa.runtime.spi.component.SofaRuntimeContext getContext() ,public com.alipay.sofa.runtime.spi.component.Implementation getImplementation() ,public com.alipay.sofa.runtime.api.component.ComponentName getName() ,public Map<java.lang.String,com.alipay.sofa.runtime.api.component.Property> getProperties() ,public com.alipay.sofa.runtime.model.ComponentStatus getState() ,public boolean isActivated() ,public com.alipay.sofa.runtime.spi.health.HealthResult isHealthy() ,public boolean isResolved() ,public void register() ,public boolean resolve() ,public void setApplicationContext(org.springframework.context.ApplicationContext) ,public void unregister() throws com.alipay.sofa.runtime.api.ServiceRuntimeException,public void unresolve() throws com.alipay.sofa.runtime.api.ServiceRuntimeException<variables>protected org.springframework.context.ApplicationContext applicationContext,protected com.alipay.sofa.runtime.api.component.ComponentName componentName,protected com.alipay.sofa.runtime.model.ComponentStatus componentStatus,protected java.lang.Exception e,protected com.alipay.sofa.runtime.spi.component.Implementation implementation,protected Map<java.lang.String,com.alipay.sofa.runtime.api.component.Property> properties,protected com.alipay.sofa.runtime.spi.component.SofaRuntimeContext sofaRuntimeContext