강의

멘토링

커뮤니티

Inflearn Community Q&A

ecomin's profile image
ecomin

asked

Real-world! Spring Boot and JPA Utilization 2 - API Development and Performance Optimization

Simple Order Lookup V1: Exposing Entities Directly

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

Written on

·

461

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 는 잘 불러와지는건 확인 했습니다.

spring-bootJPAspringjava

Answer 2

1

ecomin님의 프로필 이미지
ecomin
Questioner

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

0

yh님의 프로필 이미지
yh
Instructor

안녕하세요. 민경재님

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

감사합니다.

ecomin's profile image
ecomin

asked

Ask a question