1
0
mirror of synced 2026-08-05 17:57:15 +00:00

Add cross references to ReactorContextTestExecutionListener

Fixes: gh-5418
This commit is contained in:
Rob Winch
2018-06-11 17:13:24 -05:00
parent 8659a4b555
commit ad2cb501b8
4 changed files with 7 additions and 0 deletions
@@ -54,6 +54,7 @@ This is a basic example of how to setup Spring Security Test. The highlights are
NOTE: Spring Security hooks into Spring Test support using the `WithSecurityContextTestExecutionListener` which will ensure our tests are ran with the correct user.
It does this by populating the `SecurityContextHolder` prior to running our tests.
If you are using reactive method security, you will also need `ReactorContextTestExecutionListener` which populates `ReactiveSecurityContextHolder`.
After the test is done, it will clear out the `SecurityContextHolder`.
If you only need Spring Security related support, you can replace `@ContextConfiguration` with `@SecurityTestExecutionListeners`.