3

I am looking for a feature that is similar to what @WebMvcTest does.

What @WebMvcTest does .
1. only instantiating the web layer, not the whole context
2. Only works with Spring Boot application (as it is in the package - org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest).

What I want to achieve

Write unit test case on Controller only instantiating the web layer, not the whole context on Spring MVC application (not Spring Boot application)?

Is there a way to achieve that?

yas
  • 486
  • 1
  • 8
  • 23
  • What's wrong with using @WebMvcTest? – NatFar May 13 '19 at 18:00
  • Nothing wrong using `@WebMvcTest` but it only works in Spring Boot application. I am in a situation where `XML configuration` is in placed and looking for similar alternative. Hope this explains. – yas May 14 '19 at 12:28

0 Answers0