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

org.macrocloud.kernel.toolkit.config.ConverterConfiguration 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.convert.EnumToStringConverter;
import org.macrocloud.kernel.toolkit.convert.StringToEnumConverter;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


/**
 * String 转换配置.
 */
@Configuration(proxyBeanMethods = false)
public class ConverterConfiguration implements WebMvcConfigurer {

	/**
	 * 

Title: addFormatters

*

Description:

. * * @param registry the registry * @see org.springframework.web.servlet.config.annotation.WebMvcConfigurer#addFormatters(org.springframework.format.FormatterRegistry) */ @Override public void addFormatters(FormatterRegistry registry) { registry.addConverter(new EnumToStringConverter()); registry.addConverter(new StringToEnumConverter()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy