How to configure port for a Spring Boot application

前端 未结 30 1732
名媛妹妹
名媛妹妹 2020-11-22 13:36

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.

30条回答
  •  被撕碎了的回忆
    2020-11-22 14:13

    In case you are using application.yml add the Following lines to it

    server:
         port: 9000
    

    and of course 0 for random port.

提交回复
热议问题