Search in sources :

Example 1 with SpringUtil

use of cn.hutool.extra.spring.SpringUtil in project chao-cloud by chaojunzi.

the class SpringConfig method springContextUtil.

/**
 * 全局spring容器
 *
 * @param applicationContext {@link ApplicationContext}
 * @return {@link SpringUtil}
 */
@Bean
@Order(value = Integer.MIN_VALUE)
public SpringUtil springContextUtil(ApplicationContext applicationContext) {
    SpringUtil util = new SpringUtil();
    util.setApplicationContext(applicationContext);
    return util;
}
Also used : SpringUtil(cn.hutool.extra.spring.SpringUtil) Order(org.springframework.core.annotation.Order) FormattingConversionServiceFactoryBean(org.springframework.format.support.FormattingConversionServiceFactoryBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

SpringUtil (cn.hutool.extra.spring.SpringUtil)1 Bean (org.springframework.context.annotation.Bean)1 Order (org.springframework.core.annotation.Order)1 FormattingConversionServiceFactoryBean (org.springframework.format.support.FormattingConversionServiceFactoryBean)1