プロジェクトをアイデアで実行すると、次のエラーメッセージが表示されます。
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です。
プロジェクトを再起動すると、プロジェクトは正常に機能します。