All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.macrocloud.kernel.toolkit.config.ToolConfiguration Maven / Gradle / Ivy

There is a newer version: 1.1.0-RELEASE
Show newest version
package org.macrocloud.kernel.toolkit.config;


import org.macrocloud.kernel.toolkit.support.BinderSupplier;
import org.macrocloud.kernel.toolkit.utils.SpringUtil;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.function.Supplier;


/**
 * 工具配置类.
 */
@Configuration(proxyBeanMethods = false)
public class ToolConfiguration {

	/**
	 * Spring上下文缓存.
	 *
	 * @return the spring util
	 */
	@Bean
	public SpringUtil springUtil() {
		return new SpringUtil();
	}

	/**
	 * Binder支持类.
	 *
	 * @return the supplier
	 */
	@Bean
	@ConditionalOnMissingBean
	public Supplier binderSupplier() {
		return new BinderSupplier();
	}

}