package cokr.xit.ens.core.config;

import cokr.xit.ens.core.code.CodeMapperFactory;
import cokr.xit.ens.core.code.support.SampleCd;
import cokr.xit.ens.core.exception.code.EnsErrCd;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.LinkedHashMap;

@Configuration
public class CodeMapperConfig {

	@Bean
	public CodeMapperFactory codeMapperFactory() {
		CodeMapperFactory codeMapperFactory = new CodeMapperFactory(new LinkedHashMap<>());
		
		codeMapperFactory.put(SampleCd.class);
		codeMapperFactory.put(EnsErrCd.class);

		return codeMapperFactory;
	}
}
