How do I choose the URL for my Spring Boot webapp?

前端 未结 6 932
粉色の甜心
粉色の甜心 2020-11-30 03:48

I am using Spring Boot to create a web app, and I am not sure how to change the URL from localhost:8080 to something like localhost:8080/myWebApp.

6条回答
  •  野性不改
    2020-11-30 04:20

    In Spring Boot 2 the property in e.g. in application.properties is server.servlet.context-path=/myWebApp to set the context path.

    https://docs.spring.io/spring-boot/docs/2.0.1.BUILD-SNAPSHOT/reference/htmlsingle/#_custom_context_path

提交回复
热议问题