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
The text was updated successfully, but these errors were encountered:
wilkinsona
changed the title
NoSuchBeanDefinitionException when configuring test as described in the user guide
NoSuchBeanDefinitionException when configuring test that uses WebTestClient as described in the user guide
Feb 18, 2019
Thanks for the sample. WebApplicationContext is Servlet-specific so the docs are wrong for the WebTestClient case where the context is likely to be for a reactive web app.
The instructions in https://docs.spring.io/spring-restdocs/docs/2.0.3.RELEASE/reference/html5/#getting-started-documentation-snippets-setup cause an exception to be thrown. Replacing WebApplicationContext with ApplicationContext makes the test pass.
Here's a complete minimal project reproducing the issue: https://github.com/jnizet/webtestclientrestdocsissue
This test with WebApplicationContext fails, but this test with ApplicationContext passes.
The text was updated successfully, but these errors were encountered: