プロジェクトを実行すると、次のように表示されます。Webサーバーを起動できませんでした。ポート8888はすでに使用されていました。エラー

プロジェクトをアイデアで実行すると、次のエラーメッセージが表示されます。

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-03-02 11:15:03.866 ERROR 10600 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

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

Action:

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

原因分析ポート8888が占有されています

解決策ポート8888を使用してプロセスを強制終了します

(1)管理者としてcmdを開きます。netstat-ano
と入力して、開始されたプロセスIDを表示します。

ここに画像の説明を挿入

(2)ポート8888のPidを表示します。
ここに画像の説明を挿入
(3)プロセスのpidを強制終了します。taskkill / F / pid PID
注:PIDはプロセスのIDです。

ここに画像の説明を挿入
プロジェクトを再起動すると、プロジェクトは正常に機能します。

ここに画像の説明を挿入

おすすめ

転載: blog.csdn.net/Matcha_ice_cream/article/details/123227028