Study (300) 썸네일형 리스트형 hibernate SqlType.JSON (json data) 사용해 보기 Java entitiy domain에서 특정 class나 map으로 db의 json 데이터를 바인딩하여 사용할 수 있다.Java domain class에 변경 사항이나 추가 사항을 계속 추가하면서 db에 조금씩 column을 수정/추가하는 것보다db의 json data 저장 column 하나에 가변적으로 값을 계속 추가하여java 쪽 entitiy class에선 json domain class의 최소한의 수정이나 map에서 변경되거나 추가된 값을 호출하여 사용하는 식으로 관리할 수 있다.Java Entity Domain Entity JSON type 선언https://bootify.io/spring-data/hibernate-json-type.htmlHibernate 6.0 이상에선 json type을 .. Spring Cloud Context의 @RefreshScope를 사용하여 properties 설정 갱신하기 기본적인 @ConfigurationProperties , @PropertySource 사용Spring Boot 기반 프로젝트에서 @ConfigurationProperties 로 지정된 bean은 처음 application이 startup 할 때 bean이 생성되고 여러 properties 파일에서 읽어와 Environment에 저장된 값을 가져와 해당 bean에 바인딩해 준다.다음과 같이 @ConfigurationProperties 를 선언하고@ConfigurationProperties(prefix = "someProperties")@Datapublic class SomeProperties { private String someKey1; private long someKey2; //.. .. springdoc swagger ui에 authorize 사용해 보기 swagger ui에서 api를 테스트하면서 인증을 사용하고 싶은 경우 어떻게 하면 될까?swagger는 이와 관련하여 securityScheme를 제공한다.@SecurityScheme annotation을 사용하거나 OpenAPI 설정의 securityScheme 항목을 설정하면 된다.springdoc 문서에는 OpenAPI 설정에 대한 예시가 있다.https://springdoc.org/#how-can-i-define-securityschemeSecuritySchema 설정하기 @Bean public OpenAPI customOpenAPI(@Value("${springdoc.version}") String appVersion) { return new OpenAPI() .components(new.. Nexus 3.71.0 버전 이후 OrientDB 지원 중단 관련 설정 변경하기 Nexus 3.71.0 버전 이후 OrientDB 지원 중단kubernetes pod에 띄워 잘 사용하던 nexus가 어느 날부터 뜨지 않는다.로그를 살펴보니 다음과 같이 안내되어 있다.-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------This instance is using a legacy Orient database.You must migrate to H2 or PostgreSQL before upgrading to this version. Se.. JDK 23 New Features JDK의 버전별 변경 사항은 여기를 참고하세요SpecJava SE 23 Platform JSR 398 에 정의된 바와 같이 JSR 398 구현이 목표실제 Spec은 Final Release Specification 문서를 참고Final Release Specification Feature Summary전체 JEP Feature 목록은 OpenJDK의 JDK 23 문서 에서 확인할 수 있다.JEPComponentFeatureJEP 455specification / languagePrimitive Types in Patterns, instanceof, and switch (Preview)JEP 466core-libs / java.lang.classfileClass-File API (Second Preview.. spring-boot-properties-migrator로 custom property report 하기 spring-boot-properties-migrator 소개Spring Boot 기반 프로젝트에서 버전 변경 시 property가 변경되는 경우가 있다.spring-boot-properties-migrator depnedency를 추가하면 application 실행 시 변경된 property가 어떤 것인지 쉽게 확인할 수 있다.log로 대략 다음과 같이 안내해 준다.The use of configuration keys that have been renamed was found in the environment:Property source 'configserver:class path resource [xxxx.properties]': Key: spring.http.encoding.charset .. Antora 사용해 보기 Spring Framework 문서가 antora로 제공된 지 꽤 시간이 지났는데 Spring Boot 문서도 이번 3.3.0부터 antora로 변경되었다.https://antora.org/요즘 오픈 소스 사이트 문서들을 보면 antora로 빌드하는 경우가 상당히 많아 antora 사용 방법에 대해 살펴보았다.Antora 소개Antora는 asciidoc 기반 문서를 기반으로 site 문서 (웹 기반 문서)를 생성하는 도구이다.https://www.algolia.com/antora를 사용하면 여러 git repository에 위치한 adoc 문서들을 취합하고 템플릿을 사용하여 하나의 통일된 스타일의 site 문서로 구성할 수 있다.git repository의 branch 단위의 문서를 가져와 버전별 문서.. LangChain, RAG, Gradio 구경해 보기 이전 글에서 ollama로 llama 3를 로컬에서 실행해서 사용해 보았었다.ollama 프롬프트에 몇 가지 질문을 던져보면 원하는 답변을 얻을 경우도 있지만 말도 안 되는 엉터리 답변도 그럴싸하게 진실인 것처럼 답변을 한다.이런 현상을 AI 할루시네이션(Hallucination : 환각)이라고 하는데 다양한 원인들로 인해 발생하고 이를 줄이기 위해 다양한 해결 방법을 사용해야 한다.LLM에 학습되지 않은 지식을 주입하는 방법이 몇 가지 있다.Fine-Tuning : 현재 사용하는 model에 새로운 지식에 대한 dataset을 추가 학습Retrieval-Augmented Generation (RAG) : 응답을 생성하기 전 학습 datasource 외부의 신뢰할 수 있는 지식 베이스를 참조하도록 하는 .. 이전 1 2 3 4 5 6 ··· 38 다음 목록 더보기