Search in sources :

Example 1 with SpringUtils

use of top.tangyh.basic.utils.SpringUtils in project lamp-util by zuihou.

the class UserResolveFeignConfiguration method getSpringUtils.

@Bean
@ConditionalOnMissingBean(SpringUtils.class)
public SpringUtils getSpringUtils(ApplicationContext applicationContext) {
    SpringUtils instance = SpringUtils.getInstance();
    SpringUtils.setApplicationContext(applicationContext);
    return instance;
}
Also used : SpringUtils(top.tangyh.basic.utils.SpringUtils) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Example 2 with SpringUtils

use of top.tangyh.basic.utils.SpringUtils in project lamp-util by zuihou.

the class BaseConfig method getSpringUtils.

// ---------------------------------------序列化配置end----------------------------------------------
/**
 * Spring 工具类
 *
 * @param applicationContext 上下文
 */
@Bean
public SpringUtils getSpringUtils(ApplicationContext applicationContext) {
    SpringUtils instance = SpringUtils.getInstance();
    SpringUtils.setApplicationContext(applicationContext);
    return instance;
}
Also used : SpringUtils(top.tangyh.basic.utils.SpringUtils) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)2 Bean (org.springframework.context.annotation.Bean)2 SpringUtils (top.tangyh.basic.utils.SpringUtils)2