Code example for DefaultFormattingConversionService

0
@Configuration 
public class MvcBeans { 
 
    @Bean 
    public ConversionService conversionService() { 
        DefaultFormattingConversionService bean = new DefaultFormattingConversionService(); 
        return bean; 
    } 
 
 
    @Bean 
    public ContentNegotiatingViewResolver contentNegotiatingViewResolver() { 
        ContentNegotiatingViewResolver viewResolver = new ContentNegotiatingViewResolver(); 
        viewResolver.setMediaTypes(mediaTypes()); 
        viewResolver.setViewResolvers(viewResolvers()); 
        viewResolver.setDefaultViews(defaultViews()); 
        return viewResolver; 
    } 
 
    private Map<String, String> mediaTypes() { 
Experience pair programming with AI  Get Codota for Java