| 
									
										
										
										
											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
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-18 21:30:41 -05:00
										 |  |  | [tabs] | 
					
						
							|  |  |  | ====== | 
					
						
							|  |  |  | Java:: | 
					
						
							|  |  |  | + | 
					
						
							| 
									
										
										
										
											2021-10-29 12:34:29 -06:00
										 |  |  | [source,java,role="primary"] | 
					
						
							|  |  |  | ---- | 
					
						
							|  |  |  | import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.*; | 
					
						
							|  |  |  | ---- | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-18 21:30:41 -05:00
										 |  |  | Kotlin:: | 
					
						
							|  |  |  | + | 
					
						
							| 
									
										
										
										
											2021-10-29 12:34:29 -06:00
										 |  |  | [source,kotlin,role="secondary"] | 
					
						
							|  |  |  | ---- | 
					
						
							|  |  |  | import org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.* | 
					
						
							|  |  |  | ---- | 
					
						
							| 
									
										
										
										
											2023-06-18 21:30:41 -05:00
										 |  |  | ====== |