package cn.axzo.msg.center.notices.client.config;

import cn.axzo.msg.center.common.utils.SpringUtils;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author jiachao
 * @date 2021/7/2
 */
@Configuration
public class SpringUtilsConfig {
  /**
   * Spring 工具类
   *
   * @param applicationContext 上下文
   */
  @Bean
  public SpringUtils getSpringUtils(ApplicationContext applicationContext) {
    SpringUtils instance = SpringUtils.getInstance();
    SpringUtils.setApplicationContext(applicationContext);
    return instance;
  }
}