Study/Java (186) 썸네일형 리스트형 JDK 19 New Features JDK의 버전별 변경 사항은 이곳을 참고하세요. Spec Java SE 19 Platform JSR 394에 정의된 바와 같이 JSR 394 구현이 목표 실제 Spec은 Final Release Specification 문서를 참고해야 함 Final Release Specification Feature Summary 전체 JEP Feature 목록은 OpenJDK의 JDK19 문서로 확인할 수 있다. JEP Component Feature JEP 405 specification/language Record Patterns (Preview) JEP 422 hotspot/compiler Linux/RISC-V port JEP 424 core-libs Foreign Function & Memory API (P.. Spring Boot GraphQL 사용해보기 GraphQL 소개 GraphQL은 페이스북에서 만든 API를 위한 쿼리 언어이다. SQL과 유사하게 사용하는 웹 요청용 쿼리를 정의한 규약이고 많이 사용하는 REST API와 다른 형식의 요청이라고 생각하면 된다. REST API의 경우 요청 주소에 따라 응답 결과를 얻게 되지만 GraphQL은 단일 요청 주소로 질의한 쿼리 별 대한 응답 결과를 얻는 차이가 있다. GraphQL 홈페이지 GraphQL for Java/Kotlin GraphQL은 다양한 언어에 대한 라이브러리를 제공하고 있다. Code using GraphQL 이 중 Java에서 사용하기 위한 라이브러리 항목은 다음을 참고한다. Code using GraphQL Java/Kotlin Spring for GraphQL 이 중 graphq.. Spring Rest Docs로 OpenAPI (Swagger) 문서를 만들어 Swagger UI로 호출하여 보기 이 글의 내용은 Spring Rest Docs를 이미 사용하고 있는 상황에서 OpenAPI 문서를 만들기 위한 내용을 담고 있습니다. OpenAPI Specification 소개 OpenAPI Specification은 예전엔 Swagger Specification으로 알려졌었다. OpenAPI Specification은 Rest API에 대해 문서화를 하기 위한 사양을 정의한 것으로 특정한 소프트웨어나 라이브러리가 아니다. SmartBear Software 회사가 자사 swagger framework에서 REST Api를 문서화하기 위해 사용하던 Swagger Specification을 공개하면서 Linux Foundation의 OpenAPI Initiative project로 관리가 이전되었다. ht.. Spring Cloud Config Server jdbc backend 사용해보기 개인적으로 spring cloud config server를 github repository와 연동해서 사용하고 있었다. 평상시 크게 불편함을 느끼지 못했는데 config server의 설정을 변경할 일이 있을 경우 손쉽게 값을 변경하기 어려워 테스트 하기 불편하여 jdbc로 변경하려고 한다. Spring Cloud Config Server backend 구성 spring cloud config server는 다양한 backend를 구성할 수 있도록 autoconfiguration을 지원하고 있다. EnvironmentRepositoryConfiguration에서 다양한 backend 구성 환경에 대한 설정을 제공하고 있는데 대략 다음과 같다. 이 중에 원하는 환경으로 구성하면 된다. Environmen.. @Validated annotation을 controller가 아닌 service, component layer에서 사용하기 @Controller가 아닌 @Service, @Component 등에서 @Validated 사용하기 일반적으로 @Controller에서 @Validated를 사용하여 validation을 사용한다. @PostMapping public BlogArticle create(@RequestBody @Validated(BlogArticle.Create.class) BlogArticle blogArticle) { return blogArticleService.create(blogArticle); } service나 component에서도 @Validated annotation을 사용할 수 있다. 다만 controller에서 사용하는 것과 그 외의 layer에서 사용하는 방법이 좀 차이가 있다. @Service @.. [troubleshooting] eclipse (STS) 에서 refactor rename이 동작하지 않는 현상 어느 순간 eclipse (STS)에서 rename을 동작하지 않았다. 단축키 alt + shift + r 도 사용이 되지 않는다. https://stackoverflow.com/questions/71763208/after-eclipse-update-refactor-rename-doesnt-work-anymore After Eclipse-Update, refactor-rename doesn't work anymore After Updating to 4.23.0 (2022-03), refactor-rename doesn't work anymore. When I open the refactoring menu, the option "rename" shows up but it doesn't rename the .. Spring Boot project STS에서 열어보기 Spring Boot 소스 보기 Spring의 소스들은 현재 github에 공개되어 있다. 가끔 source jar로 보는 게 아닌 현재 사용하려는 최신 릴리즈(지금의 경우 Spring Boot 2.7.0)의 모든 소스를 보고 싶은 경우가 있다. git 주소를 가져와 STS git repository에 추가하면 main branch를 가져오는데 main branch의 경우 계속 개발이 추가되고 있고 현재 시점에서 2.7.0 다음 버전이 개발 중이다. 따라서 지금 spring boot main branch를 가져오면 개발 중인 3.0.0-SNAPSHOT을 보게 된다. Spring Boot의 경우 각 버전을 releaase 할 때마다 tag를 이용해 표시해둔다. Github Spring Project의 Sp.. Spring Boot 2.7 Release Notes 전체 Release Notes 목록은 이 곳에서 확인할 수 있습니다. https://luvstudy.tistory.com/tag/Release%20Notes https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes Upgrading from Spring Boot 2.6 @SpringBootTest Property Source Precendence properties attribute 또는 @TestPropertySource annotation을 사용하여 @SpringBootTest 가 추가한 test property source가 이제 command line property source 위에 추가되었습니다. (동일한.. 이전 1 ··· 7 8 9 10 11 12 13 ··· 24 다음 목록 더보기