본문 바로가기

공부/Tools

(5)
[SpringBoot] YamlPropertySourceFactory 기록 - 클래스 설정 public class YamlPropertySourceFactory implements PropertySourceFactory { @Override public PropertySource createPropertySource(String name, EncodedResource resource) throws IOException { Properties propertiesFromYaml = loadYamlIntoProperties(resource); String sourceName = name != null ? name : resource.getResource().getFilename(); return new PropertiesPropertySource(sourceName, properti..
[H2] Intellij IDE에 embedded H2 연동 .properties/yml 를 다음과 같이 설정 AUTO_SERVER=TRUE spring: datasource: url: jdbc:h2:~/{DB 이름};AUTO_SERVER=TRUE;MODE=MySQL;DB_CLOSE_DELAY=-1 Intellij 콘솔에서 Connection Type을 Embedded로 설정 후 URL을 jdbc:h2:~/{DB 이름};AUTO_SERVER=TRUE 와 같이 동일하게 맞출 것 H2에서 제공하는 AutoMatic Mixed Mode를 이용한다. IntelliJ 에서 embedded H2에 연결하기 개요 SpringBoot를 사용하여 로컬에서 개발할 때 H2를 많이 사용하게 된다. h2는 일반적으로 h2-console이라는 웹 콘솔을 사용하여 데이터를 조회하고 조작할..
[Docker] docker-compose.yml 기록용 docker-compose.yml 예시 services: mysql: user: X:X # 포트번호 image: mysql:8.0.32 ports: - X:X # 포트번호 container_name: my_container volumes: # {연결될 실제 물리 folder path}:/{docker 안에 folder path} - ./.mysql:/var/lib/mysql # {sql path}:/docker-entrypoint-initdb.d - ./src/main/resources/initdb:/docker-entrypoint-initdb.d command: - '--character-set-server=utf8mb4' - '--collation-server=utf8mb4_unicode_520_ci..
[MySQL] utf8mb4 (ut8mb4_0900 사용시 주의점) mysql 사용중 여러 character set이 혼동되는 경우가 있다. utf8mb4_unicode_ci utf8mb4_unicode_520_ci utf8mb4_general_ci utf8mb4_bin utf8mb4_0900_ai_ci 등.. - 0900 : 데이터 정렬 알고리즘 버전 - ai ( accent insensitivity ) : 악센트 구분 없음 - ci ( case insensitivity ) : 대소문자 구분 없음 bin collation 각 문자를 hex값 기준으로 판단하기 때문에, 알파벳 대소문자, 반각/전각, 이모지 등을 다른 값으로 판단한다. SELECT '😀' COLLATE utf8mb4_unicode_ci = '🤣' COLLATE utf8mb4_unicode_ci AS uni..
[hibernate] properties/yml 설정 SpringBoot3/Hibernate6 binding parameter 확인 logging.level.org.hibernate.orm.jdbc.bind=trace ex) org.hibernate.orm.jdbc.bind : binding parameter (1:INTEGER)