Spring boot (59) 썸네일형 리스트형 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 Boot Database Initialization Spring Boot를 사용하면서 DataSource initialization에 대한 여러 방법을 알아보자. https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto.data-initialization “How-to” Guides Spring Boot has no mandatory logging dependency, except for the Commons Logging API, which is typically provided by Spring Framework’s spring-jcl module. To use Logback, you need to include it and spring-jcl on the class.. 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 위에 추가되었습니다. (동일한.. JDK LTS release 2년 주기 전환 및 Spring의 release 정책 JDK version Java SE 5 이전 자바는 JDK 1.0, JDK 1.1, J2SE 1.2, J2SE 1.3, J2SE 1.4처럼 1.x로 버전을 관리하였다. 이후 6, 7, 8과 같은 숫자로 변경이 되었는데 이때 이후 각 버전 별 업데이트가 계속 올라가게 된다. (관련 히스토리는 너무 길어 링크로 대체함) https://namu.wiki/w/Java/%EB%B2%84%EC%A0%84%20%EC%A0%95%EB%B3%B4 각 버전 별 업데이트 관리를 해야 하는 부담이 커지자 오라클은 상용과 오픈소스를 나누기로 하고 openjdk와 oraclejdk를 분리하고 6개월 주기로 major 버전을 변경하고 3년 주기로 LTS (Long Term Support) 버전을 관리하기로 하였다. 이에 대해서는 .. Spring Boot 2.6 Release Notes 전체 Release Notes 목록은 이 곳에서 확인할 수 있습니다. https://luvstudy.tistory.com/tag/Release%20Notes https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.6-Release-Notes Upgrading from Spring Boot 2.5 Deprecations from Spring Boot 2.4 Spring Boot 2.4에서 더 이상 사용되지 않는 class, method 및 properties가 이번 release에서 제거되었습니다. upgrade 하기 전에 더 이상 사용되지 않는 method를 호출하지 않는지 확인하세요. Circular References Prohibited .. Spring Boot에서 Resilience4j 사용해보기 공부하면서 기록한 내용 Spring Boot와 Resilienct4j에 대한 내용만 살펴봄 Hystrix -> Resilience4j로 변경되는 이유 Netflix OSS 제품군의 다양한 프로젝트들을 Spring에서 사용하기 위해 Spring 진영에서는 Spring Cloud Netflix 프로젝트를 제공하였다. Netflix는 Hystrix, Ribbon, Turbine, Zuul과 같은 다양한 라이브러리를 공개하여 웹서비스의 장애 대응, 서비스 분산에 대한 좋은 대안들을 제시하였고 많이 쓰였다. 하지만 2018년에 Netflix가 ribbon, hytrix를 유지관리 모드 (maintenance mode, 새로운 기능을 추가하지 않고 버그 및 보안 문제만 수정)로 더 이상 개발하지 않는다고 발표하면서.. Spring Boot Data Redis 사용해보기 Spring Boot 기반에서 Redis를 사용하는 방법 Spring Boot 2.5.0 기준으로 작성함 dependency 설정 org.springframework.boot spring-boot-starter-data-redis redis는 connectionFactory로 Lettuce와 Jedis 두 가지를 제공한다. default로 Lettuce를 제공하고 만약 Jedis를 사용하고 싶은 경우 아래처럼 설정하면 된다. org.springframework.boot spring-boot-starter-data-redis io.lettuce lettuce-core redis.clients jedis Bean 설정 Spring Boot의 RedisAutoConfiguration은 RedisTemplate.. 이전 1 2 3 4 5 6 7 8 다음