Merge pull request #7171 from amit2103/BAEL-14274-5
[BAEL-14274] - Fixed article code for https://www.baeldung.com/spring…
This commit is contained in:
commit
01bb8edf7f
@ -25,9 +25,9 @@ import java.util.List;
|
|||||||
@Configuration
|
@Configuration
|
||||||
@EnableWebMvc
|
@EnableWebMvc
|
||||||
@ComponentScan({ "org.baeldung.web" })
|
@ComponentScan({ "org.baeldung.web" })
|
||||||
public class WebConfig implements WebMvcConfigurer {
|
public class MvcConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
public WebConfig() {
|
public MvcConfig() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
@ -3,7 +3,7 @@ package org.baeldung.web.controller.status;
|
|||||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||||
|
|
||||||
import org.baeldung.config.WebConfig;
|
import org.baeldung.config.MvcConfig;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
@ -17,7 +17,7 @@ import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
|||||||
import org.springframework.web.context.WebApplicationContext;
|
import org.springframework.web.context.WebApplicationContext;
|
||||||
|
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@ContextConfiguration(classes = WebConfig.class)
|
@ContextConfiguration(classes = MvcConfig.class)
|
||||||
@WebAppConfiguration
|
@WebAppConfiguration
|
||||||
@AutoConfigureWebClient
|
@AutoConfigureWebClient
|
||||||
public class ExampleControllerIntegrationTest {
|
public class ExampleControllerIntegrationTest {
|
||||||
|
@ -10,7 +10,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
|||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
||||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||||
|
|
||||||
import org.baeldung.config.WebConfig;
|
import org.baeldung.config.MvcConfig;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
@ -25,7 +25,7 @@ import org.springframework.web.context.WebApplicationContext;
|
|||||||
|
|
||||||
|
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@ContextConfiguration(classes = WebConfig.class)
|
@ContextConfiguration(classes = MvcConfig.class)
|
||||||
@WebAppConfiguration
|
@WebAppConfiguration
|
||||||
@AutoConfigureWebClient
|
@AutoConfigureWebClient
|
||||||
public class BazzNewMappingsExampleIntegrationTest {
|
public class BazzNewMappingsExampleIntegrationTest {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user