| 
									
										
										
										
											2021-10-29 12:34:29 -06:00
										 |  |  | [[test-mockmvc-smmrpp]] | 
					
						
							|  |  |  | = SecurityMockMvcRequestPostProcessors | 
					
						
							|  |  |  | :page-section-summary-toc: 1 | 
					
						
							| 
									
										
										
										
											2021-12-13 16:57:36 -06:00
										 |  |  | Spring MVC Test provides a convenient interface (`RequestPostProcessor`) that you can use to modify a request. | 
					
						
							| 
									
										
										
										
											2021-10-29 12:34:29 -06:00
										 |  |  | Spring Security provides a number of `RequestPostProcessor` implementations that make testing easier. | 
					
						
							| 
									
										
										
										
											2021-12-13 16:57:36 -06:00
										 |  |  | To use Spring Security's `RequestPostProcessor` implementations, use the following static import: | 
					
						
							| 
									
										
										
										
											2021-10-29 12:34:29 -06:00
										 |  |  | 
 | 
					
						
							|  |  |  | ==== | 
					
						
							|  |  |  | .Java | 
					
						
							|  |  |  | [source,java,role="primary"] | 
					
						
							|  |  |  | ---- | 
					
						
							|  |  |  | import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.*; | 
					
						
							|  |  |  | ---- | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .Kotlin | 
					
						
							|  |  |  | [source,kotlin,role="secondary"] | 
					
						
							|  |  |  | ---- | 
					
						
							|  |  |  | import org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.* | 
					
						
							|  |  |  | ---- | 
					
						
							|  |  |  | ==== |