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

启动项目遇到以下问题:
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,动动小手,点点关注,后续更精彩!

相关推荐

  1. SpringBoot项目启动提示口号占用

    2024-01-17 00:06:02       32 阅读
  2. 去除项目git的控制 口号的关闭

    2024-01-17 00:06:02       39 阅读
  3. Android事件冲突原理及解决方法

    2024-01-17 00:06:02       58 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-17 00:06:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-17 00:06:02       100 阅读
  3. 在Django里面运行非项目文件

    2024-01-17 00:06:02       82 阅读
  4. Python语言-面向对象

    2024-01-17 00:06:02       91 阅读

热门阅读

  1. 【物流管理系统-Python简易版】

    2024-01-17 00:06:02       59 阅读
  2. MySQL索引优化实战

    2024-01-17 00:06:02       47 阅读
  3. 阿里云IP地址段

    2024-01-17 00:06:02       48 阅读
  4. 编程笔记 html5&css&js 039 CSS背景示例

    2024-01-17 00:06:02       46 阅读
  5. MLPerf

    MLPerf

    2024-01-17 00:06:02      47 阅读
  6. C语言实现双向链表

    2024-01-17 00:06:02       52 阅读
  7. 新旧数据比较 直接可用

    2024-01-17 00:06:02       52 阅读
  8. 基于博弈树的开源五子棋AI教程[6 置换表]

    2024-01-17 00:06:02       62 阅读