Java Code Examples for org.springframework.format.support.FormattingConversionServiceFactoryBean#afterPropertiesSet()

The following examples show how to use org.springframework.format.support.FormattingConversionServiceFactoryBean#afterPropertiesSet() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EvalTagTests.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@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);
}
 
Example 2
Source File: EvalTagTests.java    From java-technology-stack with MIT License 5 votes vote down vote up
@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);
}
 
Example 3
Source File: SpringMvcContractTests.java    From spring-cloud-openfeign with Apache License 2.0 5 votes vote down vote up
@Before
public void setup() {
	FormattingConversionServiceFactoryBean conversionServiceFactoryBean = new FormattingConversionServiceFactoryBean();
	conversionServiceFactoryBean.afterPropertiesSet();
	ConversionService conversionService = conversionServiceFactoryBean.getObject();

	this.contract = new SpringMvcContract(Collections.emptyList(), conversionService);
}
 
Example 4
Source File: EvalTagTests.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example 5
Source File: RestControllerV2Test.java    From molgenis with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Bean
FormattingConversionService conversionService() {
  FormattingConversionServiceFactoryBean conversionServiceFactoryBean =
      new FormattingConversionServiceFactoryBean();
  conversionServiceFactoryBean.setConverters(
      Collections.singleton(new AttributeFilterConverter()));
  conversionServiceFactoryBean.afterPropertiesSet();
  return conversionServiceFactoryBean.getObject();
}