Inject ApplicationContext not WebApplicationContext with WebTestClient

Closes gh-582
This commit is contained in:
Andy Wilkinson
2019-02-18 10:19:17 +00:00
parent 303656cc42
commit ba48a7270a
9 changed files with 28 additions and 28 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2017 the original author or authors.
* Copyright 2014-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,9 +20,9 @@ import org.junit.Before;
import org.junit.Rule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.restdocs.JUnitRestDocumentation;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.web.context.WebApplicationContext;
import static org.springframework.restdocs.webtestclient.WebTestClientRestDocumentation.documentationConfiguration;
@@ -35,7 +35,7 @@ public class CustomUriConfiguration {
private WebTestClient webTestClient;
@Autowired
private WebApplicationContext context;
private ApplicationContext context;
// tag::custom-uri-configuration[]
@Before