How to configure port for a Spring Boot application

前端 未结 30 1631
名媛妹妹
名媛妹妹 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:25

    There are many other stuffs you can alter in server configuration by changing application.properties. Like session time out, address and port etc. Refer below post

    ref: http://docs.spring.io/spring-boot/docs/1.4.x/reference/html/common-application-properties.html

    I used few of them as below.

    server.session.timeout=1
    server.port = 3029
    server.address= deepesh
    

提交回复
热议问题