I\'m new to Spring Boot and having with error while running my application. I\'m following a tutorial and I believe I\'m having proper parent and dependencies with POM, plea
Simple way to handle this is to include this in your application.properties or .yml file:
server.port=0 for application.properties and server.port: 0 for application.yml files. Of course need to be aware these may change depending on the springboot version you are using.
These will allow your machine to dynamically allocate any free port available for use.
To statically assign a port change the above to server.port = someportnumber. If running unix based OS you may want to check for zombie activities on the port in question and if possible kill it using fuser -k {theport}/tcp.
Your .yml or .properties should look like this.
server:
port: 8089
servlet:
context-path: /somecontextpath