diff --git a/data/db.mv.db b/data/db.mv.db index 185885d..07fbdd3 100644 Binary files a/data/db.mv.db and b/data/db.mv.db differ diff --git a/src/main/java/ru/ulstu/configuration/TemplateConfiguration.java b/src/main/java/ru/ulstu/configuration/TemplateConfiguration.java index ca7591b..f9ab6a7 100644 --- a/src/main/java/ru/ulstu/configuration/TemplateConfiguration.java +++ b/src/main/java/ru/ulstu/configuration/TemplateConfiguration.java @@ -7,11 +7,9 @@ package ru.ulstu.configuration; import nz.net.ultraq.thymeleaf.LayoutDialect; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.MessageSource; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.support.ReloadableResourceBundleMessageSource; +import org.thymeleaf.extras.springsecurity5.dialect.SpringSecurityDialect; import org.thymeleaf.spring5.SpringTemplateEngine; import org.thymeleaf.templateresolver.ITemplateResolver; @@ -19,10 +17,11 @@ import org.thymeleaf.templateresolver.ITemplateResolver; public class TemplateConfiguration { @Bean - public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver) { + public SpringTemplateEngine templateEngine(ITemplateResolver templateResolver, SpringSecurityDialect sec) { final SpringTemplateEngine templateEngine = new SpringTemplateEngine(); templateEngine.addTemplateResolver(templateResolver); templateEngine.addDialect(new LayoutDialect()); + templateEngine.addDialect(sec); return templateEngine; } } diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html index 819bd2a..5d978bd 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -5,8 +5,9 @@ --> - + app-name @@ -43,6 +44,12 @@ +
  • +
    + Выход +
    + +
  • diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 4b18b01..ec7f651 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -5,9 +5,9 @@ --> - +
    @@ -19,7 +19,7 @@
    -
    +