package com.eactive.eai.rms.common.converter;

import java.util.Set;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.converter.Converter;
import org.springframework.format.support.FormattingConversionServiceFactoryBean;

@Configuration
public class ConversionServiceConfiguration {

	@Bean(name = "conversionService")
	public FormattingConversionServiceFactoryBean conversionService(Set<Converter<?, ?>> customConverters) {
		FormattingConversionServiceFactoryBean factoryBean = new FormattingConversionServiceFactoryBean();
		factoryBean.setConverters(customConverters);
		return factoryBean;
	}
	
}
