Java 类org.springframework.http.converter.BufferedImageHttpMessageConverter 实例源码

项目:java-platform    文件:CaptchaConfiguration.java   
@Bean
public WebMvcConfigurer captchaWebMvcConfigurer() {
    return new WebMvcConfigurerAdapter() {
        @Override
        public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
            BufferedImageHttpMessageConverter bufferedImageHttpMessageConverter = new BufferedImageHttpMessageConverter();
            if (converters.size() > 0) {
                converters.add(converters.size() - 1, bufferedImageHttpMessageConverter);
            } else {
                converters.add(bufferedImageHttpMessageConverter);
            }
        }
    };
}
项目:molgenis    文件:CaptchaControllerTest.java   
@BeforeMethod
public void setUp()
{
    mockMvc = MockMvcBuilders.standaloneSetup(captchaController)
                             .setMessageConverters(new BufferedImageHttpMessageConverter(),
                                     new FormHttpMessageConverter(), new MolgenisGsonHttpMessageConverter(new Gson()))
                             .build();
}
项目:molgenis    文件:MolgenisWebAppConfig.java   
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters)
{
    converters.add(gsonHttpMessageConverter);
    converters.add(new BufferedImageHttpMessageConverter());
    converters.add(new CsvHttpMessageConverter());
    converters.add(new ResourceHttpMessageConverter());
    converters.add(new StringHttpMessageConverter());
    converters.add(rdfConverter);
}
项目:oauth-client-master    文件:WebMvcConfig.java   
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
    converters.add(new BufferedImageHttpMessageConverter());
    converters.add(new FormOAuth2AccessTokenMessageConverter());
}