mirror of
https://gitee.com/best_handsome/mybatis-plus-join
synced 2025-07-11 00:02:22 +08:00
26 lines
650 B
Java
26 lines
650 B
Java
package com.github.yulichang.toolkit;
|
|
|
|
import org.springframework.beans.BeansException;
|
|
import org.springframework.context.ApplicationContext;
|
|
import org.springframework.context.ApplicationContextAware;
|
|
|
|
/**
|
|
* spring容器工具类
|
|
*
|
|
* @author yulichang
|
|
* @since 1.2.0
|
|
*/
|
|
public class SpringContentUtils implements ApplicationContextAware {
|
|
|
|
private static ApplicationContext context;
|
|
|
|
@Override
|
|
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
|
context = applicationContext;
|
|
}
|
|
|
|
public static ApplicationContext getApplicationContext() {
|
|
return context;
|
|
}
|
|
}
|