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?
2 Answers
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.
application.propertiesfile.8190does it still work?java -jar app.jar