SpringBootのポート番号を変更する方法
事象と原因
SpringBootを起動した際に、すでに他のアプリケーションがデフォルトポートの「8080」を使用していたため以下のエラーが発生した。
*************************** APPLICATION FAILED TO START *************************** Description: The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured. Action: Verify the connector's configuration, identify and stop any process that's listening on port 8080, or configure this application to listen on another port.
application.ymlファイルを変更する方法
1 2 | server: port: <任意のポート番号> |
application.properties
1 | server.port=<任意のポート番号> |
コメント