org.springframework.web.filter.FormContentFilter Java Examples

The following examples show how to use org.springframework.web.filter.FormContentFilter. 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: FormContentTests.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@Test // SPR-15753
public void formContentIsNotDuplicated() throws Exception {

	MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new Spr15753Controller())
			.addFilter(new FormContentFilter())
			.build();

	mockMvc.perform(put("/").content("d1=a&d2=s").contentType(MediaType.APPLICATION_FORM_URLENCODED))
			.andExpect(content().string("d1:a, d2:s."));
}
 
Example #2
Source File: FormContentTests.java    From java-technology-stack with MIT License 5 votes vote down vote up
@Test // SPR-15753
public void formContentIsNotDuplicated() throws Exception {

	MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new Spr15753Controller())
			.addFilter(new FormContentFilter())
			.build();

	mockMvc.perform(put("/").content("d1=a&d2=s").contentType(MediaType.APPLICATION_FORM_URLENCODED))
			.andExpect(content().string("d1:a, d2:s."));
}
 
Example #3
Source File: WallRideServletConfiguration.java    From wallride with Apache License 2.0 4 votes vote down vote up
@Bean
@ConditionalOnMissingBean(FormContentFilter.class)
public OrderedFormContentFilter httpPutFormContentFilter() {
	return new OrderedFormContentFilter();
}