fix
This commit is contained in:
parent
9f428fa251
commit
1f4e80cc2b
BIN
data.mv.db
BIN
data.mv.db
Binary file not shown.
@ -3,6 +3,7 @@ package com.LabWork.app.MangaStore.configuration;
|
|||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.servlet.config.annotation.*;
|
import org.springframework.web.servlet.config.annotation.*;
|
||||||
|
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class WebConfiguration implements WebMvcConfigurer {
|
public class WebConfiguration implements WebMvcConfigurer {
|
||||||
|
@ -23,8 +23,8 @@ public class UserMvcController {
|
|||||||
this.userService = userService;
|
this.userService = userService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping
|
|
||||||
@Secured({UserRole.AsString.ADMIN})
|
@Secured({UserRole.AsString.ADMIN})
|
||||||
|
@GetMapping
|
||||||
public String getUsers(@RequestParam(defaultValue = "1") int page,
|
public String getUsers(@RequestParam(defaultValue = "1") int page,
|
||||||
@RequestParam(defaultValue = "5") int size,
|
@RequestParam(defaultValue = "5") int size,
|
||||||
Model model) {
|
Model model) {
|
||||||
|
@ -13,7 +13,7 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
|
|||||||
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ControllerAdvice
|
/*@ControllerAdvice*/
|
||||||
public class AdviceController {
|
public class AdviceController {
|
||||||
@ExceptionHandler({
|
@ExceptionHandler({
|
||||||
CreatorNotFoundException.class,
|
CreatorNotFoundException.class,
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
<!--(login=${#authentication.name})-->
|
<!--(login=${#authentication.name})-->
|
||||||
<a class="nav-link" sec:authorize="hasRole('ROLE_ADMIN')" th:href="@{/creatorAction(login=${#authentication.name})}">CreatorAction</a>
|
<a class="nav-link" sec:authorize="hasRole('ROLE_ADMIN')" th:href="@{/creatorAction(login=${#authentication.name})}">CreatorAction</a>
|
||||||
<a class="nav-link" sec:authorize="hasRole('ROLE_USER')" th:href="@{/readerAction(readerLogin=${#authentication.name})}">ReaderAction</a>
|
<a class="nav-link" sec:authorize="hasRole('ROLE_USER')" th:href="@{/readerAction(readerLogin=${#authentication.name})}">ReaderAction</a>
|
||||||
<a sec:authorize="hasRole('ROLE_ADMIN')" class="nav-link" href="/users">Users</a>
|
<a sec:authorize="hasRole('ROLE_USER')" class="nav-link" href="/users">Users</a>
|
||||||
<a class="nav-link" href="/manga">Catalog</a>
|
<a class="nav-link" href="/manga">Catalog</a>
|
||||||
<a class="nav-link" href="/swagger-ui/index.html">Документация REST API</a>
|
<a class="nav-link" href="/swagger-ui/index.html">Документация REST API</a>
|
||||||
<a class="nav-link" href="/h2-console/">Консоль H2</a>
|
<a class="nav-link" href="/h2-console/">Консоль H2</a>
|
||||||
|
Loading…
Reference in New Issue
Block a user