【Spring Boot】项目端口号冲突解决方法,一步到位

您所在的位置:网站首页 启动端口冲突 【Spring Boot】项目端口号冲突解决方法,一步到位

【Spring Boot】项目端口号冲突解决方法,一步到位

2024-07-10 15:46| 来源: 网络整理| 查看: 265

启动项目遇到以下问题: Description:

Web server failed to start. Port 8080 was already in use.

Action:

Identify and stop the process that’s listening on port 8080 or configure this application to listen on another port.

Process finished with exit code 1

在这里插入图片描述

找到要启动的项目的配置文件application.properties ,没有的话可以在 resources 下手动创建。如图添加端口号设置代码,改一个不重复的端口号,启动项目即可成功。此处要注意的是,Spring Boot 可以用不同类型的配置文件,其语法也不相同,详情请参考【Spring Boot】Spring Boot 配置文件详解(application.yml、application-dev.yml、application-test.yml )。

# 应用服务 WEB 访问端口 server.port=8081

在这里插入图片描述

最后运行成功! 在这里插入图片描述

持续更新ing,动动小手,点点关注,后续更精彩!



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3