小编Ram*_*pal的帖子

Can we run multiple spring boot applications in same port? If not, why we have the context path option in application.properties?

server.port=8080
server.contextPath=/myapp
Run Code Online (Sandbox Code Playgroud)

Consider the above configuration in the application.properties of a spring boot application. What is the need of contextPath if we can't really run another spring boot application in the same port 8080. Can anyone provide some real time scenarios where this contextPath useful?

[edit] In my experience, when we deploy multiple web applications (web applications contexts) to single tomcat instance running on 8080 port the context path is used to distinguish the applications. This is what kept me …

spring spring-boot

5
推荐指数
1
解决办法
400
查看次数

标签 统计

spring ×1

spring-boot ×1