Skip to content

Commit b3023a5

Browse files
Add App.class configuration to test
With this you won't have problems to perform your test. I was facing problems with this test to start up spring context.
1 parent a2ea755 commit b3023a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/com/boylegu/springboot_vue/SpringbootVueApplicationTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
*/
3131

3232
@RunWith(SpringJUnit4ClassRunner.class)
33-
@ContextConfiguration(classes = MockServletContext.class)
33+
//@ContextConfiguration(classes = MockServletContext.class)
34+
@SpringBootTest(classes = { App.class })
3435
@WebAppConfiguration
3536
public class SpringbootVueApplicationTests {
3637

0 commit comments

Comments
 (0)