본문 바로가기

반응형

Study/Java

(186)
Playwright 사용해 보기 Playwright 소개Selenium 을 사용해 봤었는데 비슷한 라이브러리로 Playwright 가 있다고 추천받아 살펴보았다.https://playwright.dev/java/Playwright 는 Microsoft에서 만든 end-to-end 테스트를 위해 사용되는 라이브러리인데 Chromium , WebKit , Firefox 를 포함한 모든 최신 rendering engine을 지원하고 Windows , Linux 및 MacOS 에서 로컬 또는 CI에서 headless 또는 native mobile emulation을 사용한 headed 테스트를 지원한다.Java , Node.js , Python , .Net 중 원하는 언어를 선택해 사용하면 된다.내 경우 Java에 익숙하여 Java에서 사용해..
Spring Boot ConfigurationMetaData 사용해 보기 Spring Boot Configuration MetaData 소개https://docs.spring.io/spring-boot/specification/configuration-metadata/index.htmlSpring Boot는 java에서 @ConfigurationProperties 를 선언한 properties에 대한 정보를 /META-INF/spring-configuration-metadata.json 파일로 Configuration Metadata를 제공한다.spring-boot-autoconfigure 에 있는 /META-INF/spring-configuration-metadata.json 파일을 보면 대략 다음과 같다.{ "groups": [ { "name": "serv..
JDK 24 New Features JDK의 버전별 변경 사항은 여기를 참고하세요SpecJava SE 24 Platform JSR 399 에 정의된 바와 같이 JSR 399 구현이 목표실제 Spec은 Final Release Specification 문서를 참고Final Release Specification Feature Summary전체 JEP Feature 목록은 OpenJDK의 JDK 24 문서 에서 확인할 수 있다.JEPComponentFeatureJEP 404hotspot / gcGenerational Shenandoah (Experimental)JEP 450hotspot / runtimeCompact Object Headers (Experimental)JEP 472core-libsPrepare to Restrict the Us..
Copilot4Eclipse 사용해 보기 Copilot4Eclipse 소개Github Copilot 은 IDE에서 코드 작성 시 AI를 이용해 코드 작성을 도와주는 생산성 도구이다.2024년 12월 18일부터 무료 플랜을 제공하기 시작했다.https://github.blog/news-insights/product-news/github-copilot-in-vscode-free/VS code에는 자동으로 통합되어 업데이트만 하면 바로 사용이 가능하지만 Eclipse 사용자의 경우 Copilot4Eclipse plugin( 무료 plugin)을 marketplace에서 검색하여 설치하면 Github Copilot을 Eclipse에서 바로 사용할 수 있다.Github Copilot을 써본 적이 없어서 불편함을 느끼지 못했던 터라 사용해 볼 생각을 안 ..
Window 개발 환경에서 https로 Spring Boot Application 개발하기 Https 환경의 개발이 필요한 경우요즘은 대부분의 사이트가 Https 로 동작한다.개발 시 보통 별다른 설정 없이 http로 사용하지만 https로 개발을 하고 싶은 경우가 있다.https에서만 사용이 허용되는 기능들이 아래와 같이 다양하게 있다.Service WorkersGeolocation APIWeb Push NotificationsCredential Management APIPayment Request APIWeb Bluetooth APIWebRTCClipboard APISubresource IntegritySecure ContextCookie Secure Flag이런 것들을 개발하려고 하면 로컬 개발 환경도 https여야 한다.보통 localhost 같은 도메인은 별다른 설정을 하지 않아도 브..
Mybatis에서 custom MapTypeHandler 사용해 보기 mysql / mariadb를 사용하면서 db table에 JsonType column (LongText 유형에 json_valid 제약 조건이 걸려있는 column)을 사용하는 경우 해당 column은 json 형태로 데이터를 저장할 수 있다.json data는 java object에선 특정 도메인 또는 Map으로 지정하여 사용할 수 있고 Spring Data Jpa를 사용하는 경우 @JdbcTypeCode(SqlTypes.JSON) 을 해당 값에 지정하면 된다.Mybatis에서는 db table column의 json data를 java의 Map으로 변환해 주는 처리가 없어서 mysql 쿼리 사용 시 오류가 발생한다.https://mybatis.org/mybatis-3/configuration.htm..
ApplicationContextRunner에서 Condition Evaluation Report 확인하기 Spring Boot 기반 autoconfigure 환경을 제공하는 프로젝트 경우 테스트 코드 작성 시 Spring이 제공하는 ApplicationContextRunner , WebApplicationContextRunner , ReactiveWebApplicationContextRunner 를 사용하여 작성하게 된다.예전엔 ApplicationContextRunner 또는 WebApplicationContextRunner 사용 시 debug=true 옵션을 추가하면 boot 관련 로그를 확인할 수 있었다.버전이 올라가면서 로그를 확인하는 방식이 바뀌었고 기존 코드의 runner 실행 시 로그가 보이지 않게 되었다.아래처럼 initializer로 ConditionEvaluationReportLogging..
Spring Boot 3.4 Release Notes 전체 Release Notes 목록은 이곳에서 확인할 수 있습니다.https://luvstudy.tistory.com/tag/Release%20Noteshttps://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes17 revision 기준으로 작성됨Spring Boot 3.4 Release NotesUpgrading from Spring Boot 3.3RestClient and RestTemplateReactor Netty의 HttpClient 또는 JDK의 HttpClient 를 사용하도록 RestClient 및 RestTemplate 을 auto-configure 하는 지원이 추가되었습니다.우선순위에 따라 지원되는 c..

반응형