在 application.properties文件中修改或添加 server.port=8081 修改端口号 server.contextPath=/xyz 修改contextPath 转载于:https://my.oschina.net/u/3420587/blog/890634