You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use @MockMvc to test the functionality but failed. The @MockMvc can not recognize RouterFunction bean and the new Spring Security Servlet SecurityFilterChain.
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException: Cannot invoke "org.springframework.test.web.servlet.DefaultMvcResult.setHandler(Object)" because "mvcResult" is null
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
Thanks for getting in touch, but this does not appear to be a problem with the code in this repository as it is working. I think this question is better suited for StackOverflow which I and the rest of the security team monitors
I created a Resource server example project using Spring WebMvc RouterFunction and Auth0 IDP.
https://github.com/hantsy/spring-webmvc-auth0-sample
When adding tests, I followed the Spring Security Samples.
I tried to use
@MockMvc
to test the functionality but failed. The@MockMvc
can not recognizeRouterFunction
bean and the new Spring Security ServletSecurityFilterChain
.Then I created a
MockMvc
fromWebApplicationContext
, check https://github.com/hantsy/spring-webmvc-auth0-sample/blob/master/src/test/java/com/example/demo/ApplicationTests.java, but failed due to an exception.Also posted on stackoverflow, https://stackoverflow.com/questions/67171628/resource-server-test-failes-with-auth0-issuer-uri
The text was updated successfully, but these errors were encountered: