java.lang.IllegalStateException

Configuration error: found multiple declarations of @BootstrapWith on test class [EmployeeRestControllerTest] with values [class org.springframework.test.context.web.WebTestContextBootstrapper, class org.springframework.boot.test.WebAppIntegrationTestContextBootstrapper]

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web5

Stack trace

  • java.lang.IllegalStateException: Configuration error: found multiple declarations of @BootstrapWith on test class [EmployeeRestControllerTest] with values [class org.springframework.test.context.web.WebTestContextBootstrapper, class org.springframework.boot.test.WebAppIntegrationTestContextBootstrapper] at org.springframework.test.context.BootstrapUtils.resolveTestContextBootstrapper(BootstrapUtils.java:123) at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:105) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTestContextManager(SpringJUnit4ClassRunner.java:154) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:145)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,