Spring Boot: Change Port for Web Application

后端 未结 6 1680
无人共我
无人共我 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:41

    Actually you want to change server.port and you can change it in many different ways as described http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config

    Put server.port=9000 in your application.properties

提交回复
热议问题