exception : exception info(springboot)

This commit is contained in:
haerong22
2021-07-25 00:42:39 +09:00
parent 8586c31e2f
commit 3bedcaa601
2 changed files with 24 additions and 1 deletions

View File

@@ -1,3 +1,11 @@
# 스프링 기본 에러 페이지 # 스프링 기본 에러 페이지
server.error.whitelabel.enabled=false server.error.whitelabel.enabled=true
# 에러 정보 포함 여부
# never : 사용하지 않음
# always :항상 사용
# on_param : 파라미터가 있을 때 사용
server.error.include-exception=true
server.error.include-message=on_param
server.error.include-stacktrace=on_param
server.error.include-binding-errors=on_param

View File

@@ -11,6 +11,21 @@
<div> <div>
<p>오류 화면 입니다.</p> <p>오류 화면 입니다.</p>
</div> </div>
<ul>
<li>오류 정보</li>
<ul>
<li th:text="|timestamp: ${timestamp}|"></li>
<li th:text="|path: ${path}|"></li>
<li th:text="|status: ${status}|"></li>
<li th:text="|message: ${message}|"></li>
<li th:text="|error: ${error}|"></li>
<li th:text="|exception: ${exception}|"></li>
<li th:text="|errors: ${errors}|"></li>
<li th:text="|trace: ${trace}|"></li>
</ul>
</li>
</ul>
<hr class="my-4"> <hr class="my-4">
</div> <!-- /container --> </div> <!-- /container -->
</body> </body>