I have a JUnit Test that starts my spring boot appcliation (Application.java).
@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
public c
Why would you do such thing? This should be a unit test and the flow of the test should be the following: Start the application -> Call your controller endpoint -> assert that a specific text/element on that page is present -> Shut down the application.
Start the application : @RunWith(SpringRunner.class)
doing this for you, no need to start is manually.
Shut down the application : At the end of your test class Spring boot does this for you (That's why you cant access your app in the browser)
For further help please see my answer here: How to test (rest) enpoints