From 07d6a2118f8f8bc63ca65ad46e575b2a202f4372 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 14 Feb 2025 20:13:56 +0400 Subject: [PATCH] #11 -- Add error pages --- src/main/resources/application.properties | 1 + src/main/resources/templates/error/403.html | 13 +++++++++++++ src/main/resources/templates/error/404.html | 13 +++++++++++++ src/main/resources/templates/error/500.html | 13 +++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 src/main/resources/templates/error/403.html create mode 100644 src/main/resources/templates/error/404.html create mode 100644 src/main/resources/templates/error/500.html diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index bb03f7e..261c422 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,6 +1,7 @@ spring.main.banner-mode=off server.port=8080 server.jetty.connection-idle-timeout=1000s +admin-password=admin # Available levels are: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF logging.level.ru.ulstu=DEBUG logging.level.sun.rmi.transport=off diff --git a/src/main/resources/templates/error/403.html b/src/main/resources/templates/error/403.html new file mode 100644 index 0000000..9eb069c --- /dev/null +++ b/src/main/resources/templates/error/403.html @@ -0,0 +1,13 @@ + + + + + +
+
Доступ запрещён
+
Вернуться на главную
+
+ + \ No newline at end of file diff --git a/src/main/resources/templates/error/404.html b/src/main/resources/templates/error/404.html new file mode 100644 index 0000000..d599650 --- /dev/null +++ b/src/main/resources/templates/error/404.html @@ -0,0 +1,13 @@ + + + + + +
+
Страница не найдена
+
Вернуться на главную
+
+ + \ No newline at end of file diff --git a/src/main/resources/templates/error/500.html b/src/main/resources/templates/error/500.html new file mode 100644 index 0000000..b77a6cf --- /dev/null +++ b/src/main/resources/templates/error/500.html @@ -0,0 +1,13 @@ + + + + + +
+
Ошибка сервера
+
Вернуться на главную
+
+ + \ No newline at end of file