spring boot 11

[Spring Boot] 에러 'java.lang.RuntimeException: Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader'

에러 [java.lang.RuntimeException: Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader] 증상 Spring Boot 기동 시 다음과 같은 에러가 납니다. application-db.yml 설정 중에 문제가 있다고 합니다. Property: spring.datasource.hikari.master.driver-class-name Value: "com.mysql.cj.jdbc.Driver" Origin: class path resource [application-db.yml] - 42:28 Reason: java.lang...

Spring Boot 2024.03.06

[Spring Boot] 에러 'Caused by: java.lang.RuntimeException: Driver com.mysql.cj.jdbc.Driver claims to not accept jdbcUrl'

에러 [Caused by: java.lang.RuntimeException: Driver com.mysql.cj.jdbc.Driver claims to not accept jdbcUrl] 증상 Spring boot 에서 프로젝트 새로 만들고 DB세팅 후 spring을 시작하니 다음과 같은 에러가 났습니다. Caused by: java.lang.RuntimeException: Driver com.mysql.cj.jdbc.Driver claims to not accept jdbcUrl, jdbc:mariadb://localhost:13306/test 원인 이 오류는 스프링 부트 애플리케이션이 MariaDB 데이터베이스에 연결하려고 할 때 발생하며, 해당 문제가 발생하는데 여러 원인이 있지만 다음 두 가지 주..

Spring Boot 2024.03.06

[Docker] Spring Boot 어플리케이션 이미지 생성

[참고] spring Boot application을 Docker 이미지로 생성 https://spring.io/guides/gs/spring-boot-docker/ Spring Boot with Docker this guide is designed to get you productive as quickly as possible and using the latest Spring project releases and techniques as recommended by the Spring team spring.io 0. 필요 사항 Spring Boot Application [참고] https://woopi1087.tistory.com/51?category=972320 Virtual Box(가상화 소프트웨어)..

Docker 2022.08.31

[Spring Boot] Mybatis Sample

● 참고 문서 https://mybatis.org/spring/ko/index.html mybatis-spring – 소개 MyBatis-Spring 은 무엇일까? 마이바티스 스프링 연동모듈은 마이바티스와 스프링을 편하고 간단하게 연동한다. 이 모듈은 마이바티스로 하여금 스프링 트랜잭션에 쉽게 연동되도록 처리한다. mybatis.org ● Mybatis 관련 라이브러리 의존성 추가 pom.xml 에 dependency 추가 org.mybatis mybatis 3.5.7 org.mybatis mybatis-spring 2.0.7 ● Controller, Service, Mapper, Vo 파일 생성 ## 디렉토리 구조 1. vo 생성 package com.project.clone_louisquatorze...

Spring Boot 2022.02.05

[Spring boot] SQL script 를 활용한 DB 초기화

● schema.sql, data.sql 파일로 DB 초기화 1. 샘플용 schema.sql, data.sql 생성 ## 파일 위치 ## schema.sql DROP TABLE tb_sample IF EXISTS; CREATE TABLE tb_sample ( id bigint generated by default as identity, name varchar(255) not null, primary key (id) ); ## data.sql INSERT INTO tb_sample (id, name) values (1, 'sample1'); 2. application.yml 수정 ## spring.datasource.schema : schema.sql 파일 지정 ## spring.datasource.dat..

Spring Boot 2022.02.03

[Spring Boot] profiles 변경

● 다양한 환경에 적용 할 수 있게 profiles 설정파일을 생성 1. spring 프로젝트의 classpath(/main/resource)안에 'application-dev.yml', 'application-local.yml' 파일을 생성 (추가로 같은 경로에 있는 'application.properties' 파일도 'application.yml' 파일로 이름을 변경) ## '.properties' 확장자 파일과 '.yml' 확장자 파일 둘다 spring에서 인식 할 수 있는 설정 파일의 확장자이다. 다만, '.yml' 파일이 가독성이 좀 더 좋기 때문에 .yml을 선호한다. ## 그냥 application.yml 파일을 어플리케이션 공통으로 적용하는 설정을, application-dev.yml 파일..

Spring Boot 2022.02.02

[Jenkins] Jenkins ~ Github 연동(SpringBoot, Gradle)

● 먼저 Jenkins 가 설치되어 있어야 한다. https://woopi1087.tistory.com/69 [Linux, Centos7] Jenkins 설치 ● Centos7에 Jenkins 설치 1. .Jenkins가 설치 되어 있는 지 확인 명령어 =====> yum list installed | grep jenkins 2. Jenkins 설치파일을 저장소에 다운로드 명령어 =====> wget -O /etc/yum.repos.d/.. woopi1087.tistory.com ● Jenkins ~ Github 연동 1. Centos에 Git 설치 명령어 =====> sudo yum install -y git-all 2. Jenkins 콘솔 화면에서 '새로운 item' 항목 선택 프로젝트명 입력 후 '..

Jenkins 2022.01.25