Reputation: 1301
I changed the server.port=8190
in application.properties
, but the server is accessible from both ports 8190
and 8080
.
How to completely override 8080
port?
Upvotes: 1
Views: 1160
Reputation: 3601
Its likely that you have an additonal 'zombie' tomcat process still running. Are you sure only one tomcat instance is getting started up by spring boot?
Alternatively try:
java -Dserver.port=8190 -jar app.jar
Upvotes: 1
Reputation: 1301
The problem was that I had dependencies for tomcat in build.gradle:
compile("org.apache.tomcat.embed:tomcat-embed-core:8.5.8")
compile("org.apache.tomcat.embed:tomcat-embed-jasper:8.5.8")
compile("org.apache.tomcat.embed:tomcat-embed-logging-juli:8.5.2")
I removed the above lines and now the server is running only on port 8190
.
Upvotes: 0