#fix controllers

This commit is contained in:
Anton Romanov 2019-04-30 17:54:07 +04:00
parent a4cbb3e3df
commit 9c5c107c58
2 changed files with 100 additions and 100 deletions

View File

@ -6,6 +6,7 @@ import org.springframework.validation.FieldError;
import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestController;
import ru.ulstu.core.error.EntityIdIsNullException; import ru.ulstu.core.error.EntityIdIsNullException;
import ru.ulstu.core.model.ErrorConstants; import ru.ulstu.core.model.ErrorConstants;
import ru.ulstu.core.model.response.Response; import ru.ulstu.core.model.response.Response;
@ -23,6 +24,7 @@ import ru.ulstu.user.error.UserResetKeyError;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@RestController
@ControllerAdvice @ControllerAdvice
public class AdviceController { public class AdviceController {
private final Logger log = LoggerFactory.getLogger(AdviceController.class); private final Logger log = LoggerFactory.getLogger(AdviceController.class);

View File

@ -33,8 +33,6 @@ import static java.nio.charset.StandardCharsets.UTF_8;
import static org.springframework.util.StringUtils.isEmpty; import static org.springframework.util.StringUtils.isEmpty;
@Controller()
@RequestMapping(value = "/papers")
@ApiIgnore @ApiIgnore
public class PaperController { public class PaperController {
private final PaperService paperService; private final PaperService paperService;