I'm being able to run a Spring Web Application on browsers by executing an Uber/Fat JAR using java -jar JAR-file
command but I don't know whether I can specify the port number to run on like in Angular using --port
?
Asked
Active
Viewed 217 times
-1

Hieu
- 15
- 7
-
3Does this answer your question? [How to configure port for a Spring Boot application](https://stackoverflow.com/questions/21083170/how-to-configure-port-for-a-spring-boot-application) – Chaitanya Gawande Feb 02 '21 at 11:53
1 Answers
1
you can use server.port property in command line to specify the port number.
java -jar JAR-file --server.port=8083
or
java -jar -Dserver.port=8083 JAR-file

BigWhite
- 11
- 1