Web server failed to start. Port 8080 was already in use. Spring Boot microservice

If you don’t want the embedded server to start, just set the following property in you application.properties (or .yml):

spring.main.web-application-type=none

If your classpath contains the necessary bits to start a web server, Spring Boot will automatically start it. To disable this behaviour configure the WebApplicationType in your application.properties

Source: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-embedded-web-servers.html


If you application really is a Web application, then you can easily change the port using the server.port property (in your application’s .properties/.yaml file, as a command line argument at startup, etc).

Leave a Comment