23.1 startup 실패
응용 프로그램이 시작되지 않으면 등록된 FailureAnalyzers 가 전용 오류 메시지와 문제를 해결 하기위한 구체적인 조치를 제공할 수 있습니다. 예를 들어 포트 8080에서 웹 응용 프로그램을 시작하고 해당 포트가 이미 사용 중이면 다음 메시지와 비슷한 내용을 볼 수 있습니다.
***************************
APPLICATION FAILED TO START
***************************
Description:
Embedded servlet container 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.![[Note]](https://wannaqueen.gitbook.io/spring5/~gitbook/image?url=https%3A%2F%2Fdocs.spring.io%2Fspring-boot%2Fdocs%2Fcurrent%2Freference%2Fhtmlsingle%2Fimages%2Fnote.png&width=300&dpr=4&quality=100&sign=e1be9d3c&sv=2)
Spring Boot는 다양한 FailureAnalyzer구현을 제공하며 , 사용자가 직접 추가 할 수 있습니다 .
failure analyzers 가 예외를 처리 할 수없는 경우에도 전체 조건 보고서를 표시하여 무엇이 잘못되었는지보다 잘 이해할 수 있습니다. 이렇게하려면, 디버그 등록 정보를 활성화하거나 org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener에 DEBUG 로깅을 활성화해야합니다.
예를 들어, 응용 프로그램을 실행하는 경우 java -jar 을 사용하여 다음과 같이 debug속성을 활성화 할 수 있습니다 .
$ java -jar myproject-0.0.1-SNAPSHOT.jar --debugLast updated
Was this helpful?