Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
F
final_exam_lyalya_aldamzharova
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Алдамжарова Ляйла
final_exam_lyalya_aldamzharova
Commits
677a4873
Commit
677a4873
authored
Nov 06, 2021
by
Алдамжарова Ляйла
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавила страницы для обработки ошибок.
Удалила футер
parent
915e8de6
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
70 additions
and
30 deletions
+70
-30
ErrorController.java
.../com/example/final_exam_l/controller/ErrorController.java
+28
-0
403.png
src/main/resources/static/images/403.png
+0
-0
404.png
src/main/resources/static/images/404.png
+0
-0
500.jpg
src/main/resources/static/images/500.jpg
+0
-0
403.ftlh
src/main/resources/templates/error/403.ftlh
+11
-0
404.ftlh
src/main/resources/templates/error/404.ftlh
+11
-0
405.ftlh
src/main/resources/templates/error/405.ftlh
+9
-0
500.ftlh
src/main/resources/templates/error/500.ftlh
+11
-0
footer.ftlh
src/main/resources/templates/footer.ftlh
+0
-21
main.ftlh
src/main/resources/templates/main.ftlh
+0
-9
No files found.
src/main/java/com/example/final_exam_l/controller/ErrorController.java
0 → 100644
View file @
677a4873
package
com
.
example
.
final_exam_l
.
controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.GetMapping
;
@Controller
public
class
ErrorController
{
@GetMapping
(
"/403"
)
public
String
forbidden
()
{
return
"error/403"
;
}
@GetMapping
(
"/404"
)
public
String
notFound
()
{
return
"error/404"
;
}
@GetMapping
(
"/405"
)
public
String
methotNotAllowed
()
{
return
"error/405"
;
}
@GetMapping
(
"/500"
)
public
String
internal
()
{
return
"error/500"
;
}
}
\ No newline at end of file
src/main/resources/static/images/403.png
0 → 100644
View file @
677a4873
4.81 KB
src/main/resources/static/images/404.png
0 → 100644
View file @
677a4873
20.9 KB
src/main/resources/static/images/500.jpg
0 → 100644
View file @
677a4873
25.9 KB
src/main/resources/templates/error/403.ftlh
0 → 100644
View file @
677a4873
<#import "../main.ftlh" as main/>
<@main.renderWith title="Ошибка доступа">
<div class="container error-page">
<h1>403 <br> Ошибка доступа!</h1>
<img src="/images/403.png" alt="Ошибка" class="error-img">
<h2>Вы пытаетесь выполнить действие с ограниченным доступом</h2>
<a href="/login">Перейти к аутентификации</a>
</div>
</@main.renderWith>
\ No newline at end of file
src/main/resources/templates/error/404.ftlh
0 → 100644
View file @
677a4873
<#import "../main.ftlh" as main/>
<@main.renderWith title="Ошибка доступа">
<div class="container error-page">
<h1 class="error-header">404 <br>Страница не найдена</h1>
<img src="/images/404.png" alt="Ошибка" class="error-img">
<h2>Здесь ничего нет, предлагаем перейти на главную страницу</h2>
<a href="/">Главная страница</a>
</div>
</@main.renderWith>
\ No newline at end of file
src/main/resources/templates/error/405.ftlh
0 → 100644
View file @
677a4873
<#import "../main.ftlh" as main/>
<@main.renderWith title="Действие недоступно">
<div class="container error-page">
<h1>405 <br>Действие недоступно!</h1>
<img src="/images/500.jpg" alt="Ошибка" class="error-img">
<h2>Перейти на <a href="/">главную страницу</a></h2>
</div>
</@main.renderWith>
\ No newline at end of file
src/main/resources/templates/error/500.ftlh
0 → 100644
View file @
677a4873
<#import "../main.ftlh" as main/>
<@main.renderWith title="Ошибка доступа">
<div class="container error-page">
<h1>500 <br>Ошибка обращения к серверу!</h1>
<img src="/images/500.jpg" alt="Ошибка" class="error-img">
<h2>В данным момент действие недоступно</h2>
<p>Сообщите об ошибке</p>
</div>
</@main.renderWith>
\ No newline at end of file
src/main/resources/templates/footer.ftlh
deleted
100644 → 0
View file @
915e8de6
<#macro footer>
<#nested>
<footer class=" text-center text-white mt-3" style="background-color:#476393;">
<div class="container p-4">
<section class="mb-4">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt
distinctio earum repellat quaerat voluptatibus placeat nam,
commodi optio pariatur est quia magnam eum harum corrupti dicta,
aliquam sequi voluptate quas.
</p>
</section>
</div>
<div class="text-center p-3" style="background-color: rgba(0, 0, 0, 0.2)">
© 2020 Copyright:
<a class="text-white" href="https://mdbootstrap.com/">MDBootstrap.com</a>
</div>
</footer>
</#macro>
\ No newline at end of file
src/main/resources/templates/main.ftlh
View file @
677a4873
<
#
import
"
navbar
.
ftlh
"
as
navbar
/>
<
#
import
"
footer
.
ftlh
"
as
footer
/>
<
#
macro
renderWith
title=
""
scripts=
[]
styles=
[]
>
...
...
@@ -30,14 +29,6 @@
<div
class=
"container"
>
<
#
nested
>
</div>
<
@
footer
.
footer
>
</
@
footer
.footer
>
<script
src=
"js/jquery-3.6.0.min.js"
></script>
<script
src=
"js/bootstrap.bundle.min.js"
></script>
<script
src=
"js/main.js"
></script>
<
#
list
scripts
as
scripts
>
<script
src=
"${scripts}"
></script>
</
#
list>
</body>
</html>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment