Search in sources :

Example 1 with FormattingConversionServiceFactoryBean

use of org.springframework.format.support.FormattingConversionServiceFactoryBean in project spring-framework by spring-projects.

the class EvalTagTests method setUp.

@Before
public void setUp() throws Exception {
    context = createPageContext();
    FormattingConversionServiceFactoryBean factory = new FormattingConversionServiceFactoryBean();
    factory.afterPropertiesSet();
    context.getRequest().setAttribute("org.springframework.core.convert.ConversionService", factory.getObject());
    context.getRequest().setAttribute("bean", new Bean());
    tag = new EvalTag();
    tag.setPageContext(context);
}
Also used : FormattingConversionServiceFactoryBean(org.springframework.format.support.FormattingConversionServiceFactoryBean) FormattingConversionServiceFactoryBean(org.springframework.format.support.FormattingConversionServiceFactoryBean) Before(org.junit.Before)

Example 2 with FormattingConversionServiceFactoryBean

use of org.springframework.format.support.FormattingConversionServiceFactoryBean in project spring-data-document-examples by spring-projects.

the class HandlerAdapterConfiguration method conversionService.

@Bean
public ConversionService conversionService() {
    FormattingConversionServiceFactoryBean fb = new FormattingConversionServiceFactoryBean();
    fb.afterPropertiesSet();
    FormattingConversionService cs = fb.getObject();
    return cs;
}
Also used : FormattingConversionServiceFactoryBean(org.springframework.format.support.FormattingConversionServiceFactoryBean) FormattingConversionService(org.springframework.format.support.FormattingConversionService) FormattingConversionServiceFactoryBean(org.springframework.format.support.FormattingConversionServiceFactoryBean) Bean(org.springframework.context.annotation.Bean) LocalValidatorFactoryBean(org.springframework.validation.beanvalidation.LocalValidatorFactoryBean)

Aggregations

FormattingConversionServiceFactoryBean (org.springframework.format.support.FormattingConversionServiceFactoryBean)2 Before (org.junit.Before)1 Bean (org.springframework.context.annotation.Bean)1 FormattingConversionService (org.springframework.format.support.FormattingConversionService)1 LocalValidatorFactoryBean (org.springframework.validation.beanvalidation.LocalValidatorFactoryBean)1