20%
23,760원
다른 수강생들이 자주 물어보는 질문이 궁금하신가요?
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
강의 자료를 따로 제공하고 있나요?
PPT 자료를 제공하고 있다면 다운로드 받고 싶습니다.
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
Spring AOP를 이용한 Exception Handling
@ExceptionHandler(UserNotFoundException.class) public final ResponseEntity<Object> handleUserNotFoundException(Exception ex, WebRequest request) { ExceptionResponse exceptionResponse = new ExceptionResponse(new Date(), ex.getMessage(), request.getDescription(false)); return new ResponseEntity<>(exceptionResponse, HttpStatus.NOT_FOUND); } 강의에서 WebRequest를 이용하여 exception handling을 하고 있는데, 아래처럼 BindingResult를 사용하는 방법과 어떤 부분이 다른가요? 개발 스타일에 따라 사용하면 될까요? @ExceptionHandler(MethodArgumentNotValidException.class) public ResponseEntity<ErrorResponse> handleMethodArgumentNotValidException(MethodArgumentNotValidException e) { List<String> errorMessages = e.getBindingResult().getFieldErrors() .stream() .map(FieldError::getDefaultMessage) .collect(Collectors.toList()); String combinedErrorMessage = String.join(", ", errorMessages); return ResponseEntity.badRequest().body(new ErrorResponse(combinedErrorMessage)); }
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
create posts 부분에서의 에러 발생
https://www.inflearn.com/course/lecture?courseSlug=spring-boot-restful-web-services&unitId=39127&tab=community&category=questionDetail&q=222413해당 강의에서의 posts create 부분에 500 interna error가 발생해서 문의드립니다 package com.example.restfulwebservice.bean; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; @Entity @Data @NoArgsConstructor @AllArgsConstructor public class Post { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; private String description; // 게시물:사용자는 N:1 관계 // JsonIgnore 통해서 정보를 가져오지 않음 @ManyToOne(fetch = FetchType.LAZY) // FetchType.LAZY는 지연 로딩, 사용자 데이터를 필요한 시점에 가져옴. 즉시 로딩 안함 @JsonIgnore // 다른 엄한 JsonIgnore를 불러오는 바람에 N+1 문제가 너무 크게 발생함.... private User user; } Post.java package com.example.restfulwebservice.Controller; import com.example.restfulwebservice.bean.Post; import com.example.restfulwebservice.bean.User; import com.example.restfulwebservice.exception.UserNotFoundException; import com.example.restfulwebservice.exception.UsersAndCountResponse; import com.example.restfulwebservice.repository.PostRepository; import com.example.restfulwebservice.repository.UserRepository; import org.springframework.hateoas.EntityModel; import org.springframework.hateoas.server.mvc.WebMvcLinkBuilder; import org.springframework.http.ResponseEntity; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.support.ServletUriComponentsBuilder; import javax.validation.Valid; import java.net.URI; import java.util.Date; import java.util.List; import java.util.Optional; import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo; import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.methodOn; @RestController @RequestMapping("/jpa") public class UserJPAController { private UserRepository userRepository; private PostRepository postRepository; public UserJPAController(UserRepository userRepository){ this.userRepository = userRepository; } // /jpa/users @GetMapping("/users") public List<User> retrieveAllUsers(){ return userRepository.findAll(); } // ResponseEntity를 사옹한 정답 코드 @GetMapping("/usersAndCount") public ResponseEntity retrieveAllUsersAndCount(){ List<User> users = userRepository.findAll(); int count = users.size(); UsersAndCountResponse result = UsersAndCountResponse.builder() .count(users.isEmpty() ? 0 : users.size()) .users(users) .build(); EntityModel entityModel = EntityModel.of(result); WebMvcLinkBuilder linkTo = linkTo(methodOn(this.getClass()).retrieveAllUsers()); entityModel.add(linkTo.withSelfRel()); return ResponseEntity.ok(entityModel); } // jpa/users/{id} @GetMapping("/users/{id}") public ResponseEntity retrieveUsersById(@PathVariable int id){ Optional<User> user = userRepository.findById(id); if (!user.isPresent()){ throw new UserNotFoundException("id - " + id); } EntityModel entityModel = EntityModel.of(user.get()); WebMvcLinkBuilder lintTo = linkTo(methodOn(this.getClass()).retrieveAllUsers()); entityModel.add(lintTo.withRel("all-users")); return ResponseEntity.ok(entityModel); } @DeleteMapping("/users/{id}") public void deleteUser(@PathVariable int id){ userRepository.deleteById(id); } // /jpa/users @PostMapping("/users") public ResponseEntity<User> createUser(@Valid @RequestBody User user){ if(user.getJoinDate() == null) user.setJoinDate(new Date()); User savedUser = userRepository.save(user); // USER CREATED // /users/4 // 생성된 User의 URI를 저장 후 반환하기 URI location = ServletUriComponentsBuilder .fromCurrentRequest() .path("/{id}") .buildAndExpand(savedUser.getId()) .toUri(); return ResponseEntity.created(location).build(); } @GetMapping("/users/{id}/posts") public List<Post> retrieveAllPostByUser(@PathVariable int id){ Optional<User> user = userRepository.findById(id); if(!user.isPresent()){ throw new UserNotFoundException("id-" + id + " user not found"); } return user.get().getPosts(); } @PostMapping("/users/{id}/posts") public ResponseEntity<Post> createPost(@PathVariable int id, @RequestBody Post post) { Optional<User> userOptional = userRepository.findById(id); if (!userOptional.isPresent()) { throw new UserNotFoundException("id-" + id); } User user = userOptional.get(); post.setUser(user); postRepository.save(post); URI location = ServletUriComponentsBuilder .fromCurrentRequest() .path("/{id}") .buildAndExpand(post.getId()) .toUri(); return ResponseEntity.created(location).build(); } } UserJPAController.java 파일이고, user의 post 통한 생성과 get 통한 id로 해당 사용자 post 조회는 이상 없습니다
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
퀴즈 완료 후 질문드립니다
// UserAndCountResponse.java @AllArgsConstructor @ToString @Data public class UsersAndCountResponse { private int count; private List<User> users; } // UserJPAController.java @GetMapping("/usersAndCount") public UsersAndCountResponse retrieveAllUsersAndCount(){ List<User> users = userRepository.findAll(); int count = users.size(); System.out.println(new UsersAndCountResponse(count, users)); return new UsersAndCountResponse(count, users); } UserAndCountResponse.java 파일을 exception 혹은 response 폴더에 생성하여 다음과 같은 코드를 작성하였고, 406 error가 발생하였으나 @Data 어노테이션 추가하자 잘 동작했습니다 그런데 문제의 의도는 ResponseEntity 부분에 두 정보를 포함하는 것 같은데, 관련 키워드로 찾아봐도 복수의 응답을 포함하는 방법을 찾을 수 없었기에 질문드립니다
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
퀴즈 해설 질문드립니다
JPA를 이용한 사용자 추가와 삭제 - HTTP POST/DELETE method 강의의 과제 부분의 해설이나 정답지가 있으신가요?새로운 response를 생성하거나, 혹은 ResponseEntity에서 복수 정보를 반환하는 식으로 접근하려 하는데 맞는 접근 방법인지 모르겠습니다
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
yml파일에서 jpa설정을하고 에러가나요
Caused by: org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [boolean] for value [ture]이런 오류가나는데 뭐가 문제일까요?
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
yml 파일 수정 후에는 SecurityConfig 클래스를 삭제해야 하나요?
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> <version>3.0.4</version> </dependency>import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.provisioning.InMemoryUserDetailsManager; @Configuration public class SecurityConfig { @Bean UserDetailsService userDetailsService() { InMemoryUserDetailsManager userDetailsManager = new InMemoryUserDetailsManager(); UserDetails newUser = User.withUsername("user") .password(passwordEncoder().encode("passw0rd")) .authorities("read") .build(); userDetailsManager.createUser(newUser); return userDetailsManager; } @Bean BCryptPasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } } pom.xml에 있는 spring-boot-starter-security를 주석처리하게 되면 SecurityConfig 클래스에서 오류가 발생합니다. 이 클래스는 그대로 주석처리 하면 되는 건가요?
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
Exception Class 생성문의 추가 질문
안녕하세요. 강사님 답변 감사합니다.답변해 주신 것으로는실무에서도 사용자 정의 예외 클래스를 사용하는 것으로 이해했습니다. 추가로 질문드리고 싶은 것이 있는데첫 번째 질문으로는 사용자 정의 클래스를 사용할 때 상위 예외를 상속할 때 보통 RuntimeException을 상속해서 만드는지 디테일한 Exception을 상속하여 생성하는지 질문드리고 싶습니다! 두 번째 질문으로는 자바의 예외 클래스를 사용할 때보다 사용자 정의 클래스를 생성하여 사용하는 게 답변해 주신 것처럼"직접 예외 클래스를 생성하면 메시지나 처리 제어 등이 가능합니다."라는 장점으로예외 처리를 할 때 사용 빈도가 훨씬 더 많을 것 같다고 개인적으로 생각을 하고 있는데실무에서는 자바의 예외 클래스를 사용하는 것보다는예외 클래스를 직접 생성하여 사용하는 경우가 훨씬 더 많을까요?
- 해결됨[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
Exception Class 생성 문의
안녕하세요예외 클래스 생성하는 것에 대해서 질문드립니다.일반적으로 API를 클라이언트에서 호출 했을 때Exception이 발생하면실무에서는 보통 해당 강의와 같이 Exception을 직접 만들어서 사용하는지 여쭤보고자 합니다.
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
완강이 안됩니다.
모든 강의를 완료하였으나 98.11%에서 올라가지 않습니다.그래서 수료증을 받을 수 없습니다.
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
delete 로직 문의
POST 맨으로 삭제 요청을 하였을 때 로그를 확인해 보니삭제 요청 아이디로 select를 한번 날리고 아이디가 존재시에만delete 로직이 수행되는데 이는 jpa 내부 프로세스 자체 로직 인가요?
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
마지막 1분 코스가 완료가 안되서, 완강처리가 안됩니다.
마지막 1분 코스가 완료가 안되서, 완강처리가 안됩니다.그래서 수료증을 받을 수가 없습니다.
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
HATEOAS 3단계 적용 질문입니다 !
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-hateoas</artifactId> </dependency>섹션 4 Level3 단계의 REST API 구현을 위한 HATEOAS 적용에서 오류가 발생했습니다.retrieveAllUsers@GetMapping("/users") public List<User> retrieveAllUsers() { return service.findAll(); }전체 조회 메서드는 잘 작동이 되는데retrieveUser @GetMapping("/users/{id}") public EntityModel<User> retrieveUser(@PathVariable int id) { User user = service.findOne(id); if (user == null){ throw new UserNotFoundException(String.format("ID[%s] not found", id)); } EntityModel<User> entityModel = EntityModel.of(user); WebMvcLinkBuilder linkTo = linkTo(methodOn(this.getClass()).retrieveAllUsers()); entityModel.add(linkTo.withRel("all-users")); return entityModel; }이런 오류가 발생했습니다.어떻게 해결해야 할까요?
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
테이블 insert
Spring Data JPA 를 이용한 Entity 설정과 초기 데이터 생성 강의를 학습하는 도중에 data.sql에 insert into users values(1, now(), 'User1', 'test111', '701010-1111111'); 라고 하면 Error executing DDL insert into users values 이런 오류가 생성되는데 users에 파라미터를 써주고 하니 테이블에 잘 올라갔습니다. 무슨 차이가 있는지 궁금합니다!insert into users(id, join_date, name, password, ssn) values(1, now(), 'User1', 'test111', '701010-1111111');
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
swagger거 실행할려고 서버실행시 문제 발생
swaggerConfigpackage com.example.restfulness.config; import io.swagger.v3.oas.annotations.OpenAPIDefinition; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration @OpenAPIDefinition public class SwaggerConfig { @Bean public OpenAPI api() { Info info=new Info().title("").version("v3").description("api"); // Info info=new Info().title().version("v3").description("api"); // Info info=new Info().title("").version return new OpenAPI().components(new Components()).info(info); } }gradle.buildplugins { id 'java' id 'org.springframework.boot' version '3.1.4' id 'io.spring.dependency-management' version '1.1.3' } group = 'com.example' version = '0.0.1-SNAPSHOT' java { sourceCompatibility = '17' } configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' implementation 'org.springframework.boot:spring-boot-starter-validation' //@XML implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' //@헤테오스 implementation 'org.springframework.boot:spring-boot-starter-hateoas' //implementation 'org.springframework.boot:spring-boot-starter-parent' //@스웨거 implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.4' //implementation 'org.springdoc:springdoc-openapi-ui' } tasks.named('test') { useJUnitPlatform() } 그리고 서버를 재 구동했는데 다음과 같은 메세지가 나타났습니다. 어떻게 해야 할까요? 4:23:01 AM: Executing 'dependencies'...> Task :dependencies------------------------------------------------------------Root project 'restfulness'------------------------------------------------------------annotationProcessor - Annotation processors and their dependencies for source set 'main'.\--- org.projectlombok:lombok -> 1.18.30bootArchives - Configuration for Spring Boot archive artifacts. (n)No dependenciescompileClasspath - Compile classpath for source set 'main'.+--- org.projectlombok:lombok -> 1.18.30+--- org.springframework.boot:spring-boot-starter-data-jpa -> 3.1.4| +--- org.springframework.boot:spring-boot-starter-aop:3.1.4| | +--- org.springframework.boot:spring-boot-starter:3.1.4| | | +--- org.springframework.boot:spring-boot:3.1.4| | | | +--- org.springframework:spring-core:6.0.12| | | | | \--- org.springframework:spring-jcl:6.0.12| | | | \--- org.springframework:spring-context:6.0.12| | | | +--- org.springframework:spring-aop:6.0.12| | | | | +--- org.springframework:spring-beans:6.0.12| | | | | | \--- org.springframework:spring-core:6.0.12 (*)| | | | | \--- org.springframework:spring-core:6.0.12 (*)| | | | +--- org.springframework:spring-beans:6.0.12 (*)| | | | +--- org.springframework:spring-core:6.0.12 (*)| | | | \--- org.springframework:spring-expression:6.0.12| | | | \--- org.springframework:spring-core:6.0.12 (*)| | | +--- org.springframework.boot:spring-boot-autoconfigure:3.1.4| | | | \--- org.springframework.boot:spring-boot:3.1.4 (*)| | | +--- org.springframework.boot:spring-boot-starter-logging:3.1.4| | | | +--- ch.qos.logback:logback-classic:1.4.11| | | | | +--- ch.qos.logback:logback-core:1.4.11| | | | | \--- org.slf4j:slf4j-api:2.0.7 -> 2.0.9| | | | +--- org.apache.logging.log4j:log4j-to-slf4j:2.20.0| | | | | +--- org.apache.logging.log4j:log4j-api:2.20.0| | | | | \--- org.slf4j:slf4j-api:1.7.36 -> 2.0.9| | | | \--- org.slf4j:jul-to-slf4j:2.0.9| | | | \--- org.slf4j:slf4j-api:2.0.9| | | +--- jakarta.annotation:jakarta.annotation-api:2.1.1| | | +--- org.springframework:spring-core:6.0.12 (*)| | | \--- org.yaml:snakeyaml:1.33| | +--- org.springframework:spring-aop:6.0.12 (*)| | \--- org.aspectj:aspectjweaver:1.9.20| +--- org.springframework.boot:spring-boot-starter-jdbc:3.1.4| | +--- org.springframework.boot:spring-boot-starter:3.1.4 (*)| | +--- com.zaxxer:HikariCP:5.0.1| | | \--- org.slf4j:slf4j-api:1.7.30 -> 2.0.9| | \--- org.springframework:spring-jdbc:6.0.12| | +--- org.springframework:spring-beans:6.0.12 (*)| | +--- org.springframework:spring-core:6.0.12 (*)| | \--- org.springframework:spring-tx:6.0.12| | +--- org.springframework:spring-beans:6.0.12 (*)| | \--- org.springframework:spring-core:6.0.12 (*)| +--- org.hibernate.orm:hibernate-core:6.2.9.Final| | +--- jakarta.persistence:jakarta.persistence-api:3.1.0| | \--- jakarta.transaction:jakarta.transaction-api:2.0.1| +--- org.springframework.data:spring-data-jpa:3.1.4| | +--- org.springframework.data:spring-data-commons:3.1.4| | | +--- org.springframework:spring-core:6.0.12 (*)| | | +--- org.springframework:spring-beans:6.0.12 (*)| | | \--- org.slf4j:slf4j-api:2.0.2 -> 2.0.9| | +--- org.springframework:spring-orm:6.0.12| | | +--- org.springframework:spring-beans:6.0.12 (*)| | | +--- org.springframework:spring-core:6.0.12 (*)| | | +--- org.springframework:spring-jdbc:6.0.12 (*)| | | \--- org.springframework:spring-tx:6.0.12 (*)| | +--- org.springframework:spring-context:6.0.12 (*)| | +--- org.springframework:spring-aop:6.0.12 (*)| | +--- org.springframework:spring-tx:6.0.12 (*)| | +--- org.springframework:spring-beans:6.0.12 (*)| | +--- org.springframework:spring-core:6.0.12 (*)| | +--- org.antlr:antlr4-runtime:4.10.1| | +--- jakarta.annotation:jakarta.annotation-api:2.0.0 -> 2.1.1| | \--- org.slf4j:slf4j-api:2.0.2 -> 2.0.9| \--- org.springframework:spring-aspects:6.0.12| \--- org.aspectj:aspectjweaver:1.9.20+--- org.springframework.boot:spring-boot-starter-web -> 3.1.4| +--- org.springframework.boot:spring-boot-starter:3.1.4 (*)| +--- org.springframework.boot:spring-boot-starter-json:3.1.4| | +--- org.springframework.boot:spring-boot-starter:3.1.4 (*)| | +--- org.springframework:spring-web:6.0.12| | | +--- org.springframework:spring-beans:6.0.12 (*)| | | +--- org.springframework:spring-core:6.0.12 (*)| | | \--- io.micrometer:micrometer-observation:1.10.11 -> 1.11.4 중간생략No dependencies(c) - A dependency constraint, not a dependency. The dependency affected by the constraint occurs elsewhere in the tree.(*) - Indicates repeated occurrences of a transitive dependency subtree. Gradle expands transitive dependency subtrees only once per project; repeat occurrences only display the root of the subtree, followed by this annotation.(n) - A dependency or dependency configuration that cannot be resolved.A web-based, searchable dependency report is available by adding the --scan option.BUILD SUCCESSFUL in 825ms1 actionable task: 1 executed4:23:02 AM: Execution finished 'dependencies'. 주소창에 localhost:8088/v2/api-docs를 입력했더니 This application has no explicit mapping for /error, so you are seeing this as a fallback.Thu Oct 12 04:07:11 KST 2023There was an unexpected error (type=Not Found, status=404).No message available가 보입니다.
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
@ApiModel 어노테이션
강의와 같이 ApiModel어노테이션을 달아보려해도 아래와 같이 어노테이션이 뜨지도 않고 다 입력을 해보아도 오류만 뜰 뿐입니다 ㅠㅠ 저 같은 분 있으신가요?
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
질문입니다!
@Size와 @Past의 어노테이션이 뜨질 않습니다.@Valid도 안뜹니다.
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
모든 섹션 강의자료
안녕하세요. 이번에 새로 수강할려고 하는데 혹시 모든 섹션 강의자료는 어디서 다운받을 수 있을까요?
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
서버 실행 시 에러가 납니다
spring 버전으로 springfox대신 springdoc을 사용했습니다. 따로 코드상 오류는 안나지만 서버를 실행시키면 에러가 뜹니다. SwaggerConfig.java 에러내용입니다.023-08-04 18:21:26.795 ERROR 8588 --- [ restartedMain] o.s.boot.SpringApplication : Application run failedorg.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.example.demo.DemoApplication]; nested exception is java.lang.IllegalArgumentException: Unresolvable class definition for class [org.springdoc.core.conditions.MultipleOpenApiSupportCondition] at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:609) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.annotation.ConfigurationClassParser.access$800(ConfigurationClassParser.java:110) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.lambda$processGroupImports$1(ConfigurationClassParser.java:812) ~[spring-context-5.3.25.jar:5.3.25] at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) ~[na:na] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:809) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:780) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:192) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:331) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:746) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[spring-boot-2.7.8.jar:2.7.8] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[spring-boot-2.7.8.jar:2.7.8] at com.example.demo.DemoApplication.main(DemoApplication.java:15) ~[classes/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[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:566) ~[na:na] at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.7.8.jar:2.7.8]Caused by: java.lang.IllegalArgumentException: Unresolvable class definition for class [org.springdoc.core.conditions.MultipleOpenApiSupportCondition] at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:331) ~[spring-core-5.3.25.jar:5.3.25] at org.springframework.context.annotation.ConditionEvaluator.getCondition(ConditionEvaluator.java:124) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:96) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:225) ~[spring-context-5.3.25.jar:5.3.25] at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:599) ~[spring-context-5.3.25.jar:5.3.25] ... 24 common frames omittedCaused by: java.lang.UnsupportedClassVersionError: org/springdoc/core/conditions/MultipleOpenApiSupportCondition has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[na:na] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016) ~[na:na] at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621) ~[na:na] at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na] at java.base/java.lang.Class.forName0(Native Method) ~[na:na] at java.base/java.lang.Class.forName(Class.java:398) ~[na:na] at org.springframework.boot.devtools.restart.classloader.RestartClassLoader.loadClass(RestartClassLoader.java:145) ~[spring-boot-devtools-2.7.8.jar:2.7.8] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na] at java.base/java.lang.Class.forName0(Native Method) ~[na:na] at java.base/java.lang.Class.forName(Class.java:398) ~[na:na] at org.springframework.util.ClassUtils.forName(ClassUtils.java:284) ~[spring-core-5.3.25.jar:5.3.25] at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:324) ~[spring-core-5.3.25.jar:5.3.25] ... 28 common frames omitted
- 미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
Security WebSecurityConfigurerAdapter Deprecated Issue
WebSecurityConfigurerAdapter가 Deprecated 되었으니 SecurityFilterChain를 Bean으로 등록해서 사용해야 할 거 같네요~~ https://devlog-wjdrbs96.tistory.com/434