springboot中修改端口和上下文路径

 

  通过修改application.properties内容来改变访问的端口号和上下文路径(很简单!)

spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
server.port=9090
server.context-path=/test

  访问路径为:http://127.0.0.1:9090/test/hello

  效果图:

  

 

posted @ 2018-07-25 15:22  仰望星空的脚踏实地  阅读(4559)  评论(0编辑  收藏  举报