How do I configure the TCP/IP port listened on by a Spring Boot application, so it does not use the default port of 8080.
In the application.properties
file, add this line:
server.port = 65535
where to place that fie:
24.3 Application Property Files
SpringApplication loads properties from application.properties files in the following locations and adds them to the Spring Environment:
A /config subdirectory of the current directory The current directory A classpath /config package The classpath root
The list is ordered by precedence (properties defined in locations higher in the list override those defined in lower locations).
In my case I put it in the directory where the jar
file stands.
From:
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config-application-property-files