20%
23,760원
다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
spring.io에 3.1.5버전이 없는데 3.2.5를 사용해도 무관할까요??
지금 시점에서는 spring.io에 3.3.0, 3.2.6, 3.2.5, 3.1.12, 3.1.11이 있습니다. 버전이 바뀐다고 해서 수업내용을 못 따라 갈 수 있는건가요? 아니면 pom.xml에서 버전을 임의로 바꿔줘도 반영이 되나요?
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
"섹션3. 다국어 처리를 위한 Internationalization 구현 방법" 관련 문의드립니다.
다국어 실습시 Header에 "Accept-Language" 정보 미포함시 400 에러가 발생합니다.github 소스로 실행해도 동일합니다.Header에 "Accept-Language" 미포함시 정상인건지 궁금합니다.미포함시 default 정보로 조회되는게 아닌가요? 테스트는 크롬 확장도구인 "Talend"를 이용했으며 에러 응답은 다음과 같습니다.<problemxmlns="urn:ietf:rfc:7807"><type>about:blank</type><title>Bad Request</title><status>400</status><detail>Failed to convert 'Accept-Language' with value: 'ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7'</detail><instance>/hello-world-internationalized</instance></problem>
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
spring boot 3.0 이후 handleMethodArgumentNotValid 메소드
안녕하세요 강사님좋은 강의 감사드립니다. 스프링부트 3.0 이후부터는 오버라이딩한 handleMethodArgumentNotValid 메소드를 타지 않아 강의에서처럼 동작을 하지 않습니다.다음과 같이 코드를 짜도 에러가 나면서 서버가 죽어버리는데 어떻게 해야 되나요? @ExceptionHandler(BindException.class) public final ResponseEntity<Object> handleMethodArgumentNotValidException(BindException ex) { ExceptionResponse exceptionResponse = new ExceptionResponse(LocalDateTime.now(), ex.getMessage() , ex.getBindingResult().toString()); // 클라이언트에게 상세정보 안보여주도록 false return new ResponseEntity<>(exceptionResponse, HttpStatus.NOT_FOUND); }에러 내용Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.HandlerExceptionResolver]: Factory method 'handlerExceptionResolver' threw exception with message: Ambiguous @ExceptionHandler method mapped for [class org.springframework.validation.BindException]: {public final org.springframework.http.ResponseEntity com.example.myrestfulservice.exception.CustomizedResponseEntityExceptionHandler.handleMethodArgumentNotValidException(org.springframework.validation.BindException), public final org.springframework.http.ResponseEntity org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler.handleException(java.lang.Exception,org.springframework.web.context.request.WebRequest) throws java.lang.Exception} at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:177) ~[spring-beans-6.1.5.jar:6.1.5] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644) ~[spring-beans-6.1.5.jar:6.1.5] ... 24 common frames omitted Caused by: java.lang.IllegalStateException: Ambiguous @ExceptionHandler method mapped for [class org.springframework.validation.BindException]: {public final org.springframework.http.ResponseEntity com.example.myrestfulservice.exception.CustomizedResponseEntityExceptionHandler.handleMethodArgumentNotValidException(org.springframework.validation.BindException), public final org.springframework.http.ResponseEntity org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler.handleException(java.lang.Exception,org.springframework.web.context.request.WebRequest) throws java.lang.Exception} at org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.addExceptionMapping(ExceptionHandlerMethodResolver.java:114) ~[spring-web-6.1.5.jar:6.1.5] at org.springframework.web.method.annotation.ExceptionHandlerMethodResolver.<init>(ExceptionHandlerMethodResolver.java:78) ~[spring-web-6.1.5.jar:6.1.5] at org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver.initExceptionHandlerAdviceCache(ExceptionHandlerExceptionResolver.java:289) ~[spring-webmvc-6.1.5.jar:6.1.5] at org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver.afterPropertiesSet(ExceptionHandlerExceptionResolver.java:256) ~[spring-webmvc-6.1.5.jar:6.1.5] at org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.addDefaultHandlerExceptionResolvers(WebMvcConfigurationSupport.java:1063) ~[spring-webmvc-6.1.5.jar:6.1.5] at org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.handlerExceptionResolver(WebMvcConfigurationSupport.java:1005) ~[spring-webmvc-6.1.5.jar:6.1.5] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140) ~[spring-beans-6.1.5.jar:6.1.5] ... 25 common frames omitted
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
직접 생성하지 않은 주소가 생성되어 있습니다.
이 사진처럼"/jpa/users/{id}/posts"가 아닌"/users/{id}/posts"로도 접속이 됩니다.또, "localhost:8088/posts/{postId}" 도 생성되어 있던데이런 것들은 어떤 과정으로 생성된 것인가요?
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
JPA를 이용한 개별 사용자 상세 조회 5분 21초
섹션 5. Java Persistence API 사용 JPA를 이용한 개별 사용자 상세 조회 5분 21초 캡처 화면입니다.응답 값으로 id는 없고 name, joinDate, link정보만 나오는 이유가 궁금합니다.
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
EntityModel과 ResponseEntity의 차이
*UserController@GetMapping("/users/{id}") public EntityModel<User> retrieveUser(@Parameter(description = "사용자 ID", required = true, example = "1") @PathVariable int id) { User user = service.findOne(id); if (user == null) { throw new UserNotFoundException("id-" + id); } EntityModel entityModel = EntityModel.of(user); WebMvcLinkBuilder linkTo = linkTo(methodOn(this.getClass()).retrieveAllUsers()); entityModel.add(linkTo.withRel("all-users")); // http://127.0.0.1:8080/users try { return entityModel; } catch (Exception ex) { throw new RuntimeException(); } } @PostMapping("/users") public ResponseEntity<User> createUser(@Valid @RequestBody User user) { User savedUser = service.save(user); URI location = ServletUriComponentsBuilder.fromCurrentRequest() .path("/{id}") .buildAndExpand(savedUser.getId()) .toUri(); return ResponseEntity.created(location).build(); } 두 클래스가 비슷하게 느껴져서 질문드립니다.EntityModel 클래스는 Spring HATEOAS에서 지원하는 클래스로 위의 코드로 특정 사용자 정보를 조회하면서 동시에 관련 리소스로 쉽게 이동할수 있는 링크를 제공을 도와주는 클래스고ResponseEntity클래스는 Spring MVC에서 지원하는 클래스로 HTTP 응답을 제어할 수 있도록 도와주며, 상태 코드, 헤더, 바디 등을 포함할수 있게 도와주는 클래스다. 라고 이해하면될까요 ?? 그렇기 때문에 Get에서는 해당 자원에 대한 추가적인 리소스를 제공하기 위해 EntityModel을 사용하고 Post에는 해당자원의 생성에 대한 201 상태코드를 제공하고 해당자원에 위치를 제공하기위해 ResponseEntity를 사용한것 인가요??Post에도 반환 값으로 EntityModel을 사용을 하는 경우도 있을까요??찾아보니 ResponseEntity<EntityModel<User>> 이렇게 사용하게 되는 경우 상태 코드와 함께 EntityModel<User>를 응답 본문으로 반환이 가능하다고 하는데 그렇다면 함께 사용하는 것이 데이터의 표현과 응답의 정확성을 높여줄것으로 예상이 되는데 이렇게 사용도 자주하는지 궁금합니다!
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
수업 그대로 따라했는데 404오류가 발생합니다.
안녕하세요 다국어 처리 수업 중에 수업 그대로 작성했는데 이러한 오류가 발생하게 됩니다.뭐 때문에 이러한 오류가 나는지 모르겠습니다..
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
DispatcherServlet과 프로젝트 동작의 이해
Port번호 변경이 안 됩니다. debug모드는 적용이 되는 것 같은데 왜그럴까요
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
optional관련 질문
안녕하세요 강의 너무 잘보고 있습니다.!단순 궁금증이 있어서요.optional로 조회하고와서 if (!userOptional.isPresent()) { throw new UserNotFoundException("id-" + id); }위와 같이 선언ㅇ하셧는데요 isEmpty를 사용하지 않고 위와 같이 하는 이유가 궁금합니다.
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
스웨거 query parameter 전달 방법
아무리 찾아도 나오질 않아서 여기에 글 남깁니다.스웨거 ui 에 파라미터 전달 방법에pageinteger($int64)(query) 이렇게 정의되어 있는건 이해가 되는데 cond[addr::LIKE]string($string)(query)이렇게 정의되어 있는건 query parameter를 어떤식으로 전달을 해야 하는가요?
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
강의 자료 ppt를 다운로드 받을 수 있을까요?
안녕하세요.이번에 개정판을 만들어 주셔서 감사합니다.다름이 아니라 강의 자료 ppt를 다운로드 받을 수 있을까요?커뮤니티 게시판을 보니 github에 https://github.com/joneconsulting/my-restful-services/tree/master/pdf 확인을 해보니 존재하지 않은 경로로 나오네요.
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
[Filter] Admin 에서 굳이 JsonFilter를 사용한이유
User api에서 ssn,paaword가 안보인 이유는 @JsonIgnoreProperties때문에 안보인 것 이고, AdminUser클래스에서는 @JsonIgnoreProperties를 제거 했기 때문에 굳이 SimpleFilterProvider를 사용할 필요는 없어 보입니다. 잘못된 사용 예로 보입니다..굳이 해당 예제 에서는 SimpleFilterProvider를 쓸필요는 없지만 이런식으로 필드 제어가 가능하다는 것 을 보여주시려고 이렇게 하시 건지 궁금합니다..\
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
Rest-API 작명
안녕하세요 현제 스터디 중인 대학생입니다. Rest-API 작명 때문에 궁금해서 질문을 남겼습니다.// 관리자 회원관리 GET /v1/admin/members// 전체 회원 조회 GET /v1/admin/members/1// 회원 상세 조회 PUT /v1/admin/members/1// 회원 수정 // 관리자 매장관리 GET /v1/admin/restaurants// 전체 매장 조회 GET /v1/admin/restaurants/1// 매장 상세 조회 POST /v1/admin/restaurants현제 이런 식으로 URL 정보를 미리 작성하고 규약을 따라 코드를 작성하는데, 궁금한 점이 GET /v1/admin/restaurants/search 이 방식과 GET /v1/restaurants/가게 이름 둘 중 어는 것이Rest API가 맞는지 궁금합니다.
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
spring security 문제
강의를 따라 pom.xml과 application.yml에 작성했던 spring security 관련 내용들을 주석 해제한 후 SecurityConfig.java에 webSecurityCustomizer()를 추가하고 실행했는데 사이트에 연결할 수 없다고 합니다. pom.xmlapplication.yml SecurityConfig.java사이트에 연결할 수 없음 상태가 지속되다가 어느 순간 console에 올라오는 에러 메시지는 다음과 같습니다.org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDetailsService' defined in class path resource [kr/co/joneconsulting/myrestfulservice/config/SecurityConfig.class]: Failed to instantiate [org.springframework.security.core.userdetails.UserDetailsService]: Factory method 'userDetailsService' threw exception with message: null 강의와 동일하게 작성한 것 같은데 원인을 잘 모르겠습니다.
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
안드로이드 앱 서버개발 질문
안드로이드 앱 개발에서 백엔드를 맡아 서버를 개발해야 하는데요 강좌는 웹을 기반으로 rest api를 작성하는데 앱에 적용 시켜도 별반 차이가 없을까요?
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
MSA 강의는 언제쯤 업데이트 될까요?
이 강의와 연속성이 있는 강의라서 여쭤봐요!!
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
안녕하세요 사용자 전체 목록 보기 count, users 리스트를 반환하도록 하는 것에 대한 질문입니다.
response { "count": 5, "users": [ { "id": 90001, "name": "User1", "joinDate": "2024-02-04T07:40:02.160+00:00" }, { "id": 90002, "name": "User2", "joinDate": "2024-02-04T07:40:02.163+00:00" }, { "id": 90003, "name": "User3", "joinDate": "2024-02-04T07:40:02.163+00:00" }, { "id": 90004, "name": "User4", "joinDate": "2024-02-04T07:40:02.164+00:00" }, { "id": 90005, "name": "User5", "joinDate": "2024-02-04T07:40:02.164+00:00" } ]}hashmap 에 담아서 결과값을 반환해주는 식으로 했는데..상황에 따라 다르겠지만 의도하신 정답에 가까울까요..?
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
Intellij Database에서 테이블 조회
브라우저로 접속하였을 때는 테이블이 정상적으로 생성되는데인텔리제이 자체에서 확인하면 왜 테이블이 보이지 않는걸까요?새로고침해봐도 나타나지 않습니다
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
제 json은 왜 이렇게 나올까요?
(사진)
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
제 json은 왜 이렇게 나올까요?
(사진)