• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

6:01 하는 무한루프 관련되서 예외가 나서 한번 올려봅니다.

21.01.11 15:52 작성 조회수 327

0

먼저  강의 항상 잘 듣고 있습니다.

@GetMapping("/api/v1/simple-orders")
public List<Order> ordersV1() {
List<Order> all = orderRepository.findAll(new OrderSearch());
return all;

이부분이 무한루프 나지 않고 두가지 에러가 뜹니다.

1.  [THYMELEAF][http-nio-8080-exec-1] Exception processing template "api/v1/simple-orders": Error resolving template [api/v1/simple-orders], template might not exist or might not be accessible by any of the configured Template Resolvers

2. Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template [api/v1/simple-orders], template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause

이렇게 두가지가 일어납니다.
쿼리가 잘못된줄 알고 orderRepository test를 했는데 각 id 는 잘 불러와지는건 확인 했습니다.

답변 2

·

답변을 작성해보세요.

1

민경재님의 프로필

민경재

질문자

2021.01.15

감사합니다 늦게 확인해서 감사인사를 늦게 드립니다 

0

안녕하세요. 민경재님

@Controller -> @RestController로 변경해주세요.

감사합니다.