[Spring] Swagger 에러(Unable to infer base url. 하얀화면), SpringDoc Swagger
·
WEB/Spring
Java1.8, SpringBoot 2.7.17, Maven으로 진행했던 프로젝트를 Spring Boot 3.2, Java 17, Gradle로 바꾸어 복습하고 있었습니다. Spring에 swagger를 추가하면서 발생한 에러입니다. Unable to infer base url. This is common when using dynamic servlet registration or when the API is behind an API Gateway. The base url is the root of where all the swagger resources are served. For e.g. if the api is available at http://example.org/api/v2/api-docs t..
[Spring] IllegalArgumentException 에러(매개변수 이름 인식)
·
WEB/Spring
김영한님의 스프링 MVC 1편 강의를 듣는 중 발생한 에러입니다. java.lang.IllegalArgumentException: Name for argument of type [java.lang.Long] not specified, and parameter name information not found in class file either. 문제가 됐던 코드는 다음과 같습니다. @GetMapping("/{itemId}") public String item(@PathVariable Long itemId, Model model) { Item item = itemRepository.findById(itemId); model.addAttribute("item", item); return "basic/item..