Footstep . 발자취
2020/04/04 Foot step
Kee.
2020. 4. 4. 19:17
About programming
Learned about JPA, JUnit test,
-org.springframework.web.client.RestClientException:
Url을 불러오는 과정에서 url이 맞지 않아서 생기는 문제.
PostsApiController// @PutMapping("/posts/{id}")라면
String url = "http://localhost:" + port + "/posts/" + updateId; 에서 "/posts/" 로 해줘야 함.
-web에서 http://localhost:8080/api/v1/posts/2로 들어가서 조회 하려고 할때 조회가 안되면
ApiController 에 GetMapping추가 후 Response와 연결 ex.
@GetMapping("/api/v1/posts/{id}")
public PostsResponseDto findById(@PathVariable Long id){
return postsService.findById(id);
}
Todo-list