diff --git a/build.gradle b/build.gradle index d5286fb..e339ff5 100644 --- a/build.gradle +++ b/build.gradle @@ -36,9 +36,11 @@ dependencies { implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jetty' implementation group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf' implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation' + implementation group: 'org.springframework.boot', name:'spring-boot-starter-data-jpa' + //implementation group: 'org.springframework.boot', name: 'spring-boot-starter-security' implementation group: 'org.slf4j', name: 'slf4j-api', version: versionSLF4J implementation group: 'nz.net.ultraq.thymeleaf', name: 'thymeleaf-layout-dialect' - implementation group: 'org.springframework.boot', name:'spring-boot-starter-data-jpa' + //implementation group: 'org.thymeleaf.extras', name: 'thymeleaf-extras-springsecurity5' implementation group: 'com.h2database', name:'h2' implementation group: 'javax.xml.bind', name:'jaxb-api' implementation group: 'org.javassist', name:'javassist' diff --git a/data/db.mv.db b/data/db.mv.db index 2867556..db9ad7d 100644 Binary files a/data/db.mv.db and b/data/db.mv.db differ diff --git a/src/main/java/ru/ulstu/configuration/MvcConfiguration.java b/src/main/java/ru/ulstu/configuration/MvcConfiguration.java index 502e5b1..2599a53 100644 --- a/src/main/java/ru/ulstu/configuration/MvcConfiguration.java +++ b/src/main/java/ru/ulstu/configuration/MvcConfiguration.java @@ -21,6 +21,7 @@ public class MvcConfiguration implements WebMvcConfigurer { @Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/index"); + registry.addViewController("/admin"); registry.addViewController("/editNews"); } diff --git a/src/main/resources/templates/admin.html b/src/main/resources/templates/admin.html new file mode 100644 index 0000000..f1bcb60 --- /dev/null +++ b/src/main/resources/templates/admin.html @@ -0,0 +1,16 @@ + + + + +
+ diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html index 01de6c5..b744d63 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -40,6 +40,9 @@