Spring Boot: Change Port for Web Application

后端 未结 6 1758
无人共我
无人共我 2021-02-20 08:41

I am currently trying to create a web application with Spring Boot. I need to host my application to localhost:8081. How do I change the port?

6条回答
  •  情书的邮戳
    2021-02-20 09:21

    In your application.properties file, just add one line

    server.port = 8080
    

    And for more configurations you can refer Spring Boot documentation on port

提交回复
热议问题