전체 글 110

[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 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 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 2022.02.02

[Jenkins] Jenkins ~ Github 연동, 자동 빌드, 배포 (SpringBoot, Maven)

● 먼저 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.26

[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

[Linux, Centos7] Jenkins 설치

● Centos7에 Jenkins 설치 1. .Jenkins가 설치 되어 있는 지 확인 명령어 =====> yum list installed | grep jenkins 2. Jenkins 설치파일을 저장소에 다운로드 명령어 =====> wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo ##만약 bash: wget: command not found 문구가 나오면 아래 명령어를 입력 명령어 =====> yum install -y wget ##만약 wget 명령어 사용 시 아래와 같은 문구가 나오면 다음 명령어 입력ERROR: cannot verify pkg.jenkins.io's certificate,..

Linux 2022.01.24

[Linux , Centos7] MariaDB 설치

● Centos7에 mariadb 설치 1. 설치한 os의 버전 확인 명령어 =====> cat /etc/*release 2. 아래 사이트에서 os 버전 및 MariaDB 설치할 버전을 선택하면 Repository 정보와 설치 명령어를 설명해줌 https://mariadb.org/download/?t=repo-config Download MariaDB Server - MariaDB.org REST API Release Schedule Reporting Bugs … Continue reading "Download MariaDB Server" mariadb.org 3. repository 정보 입력 명령어 =====> vi /etc/yum.repos.d/MariaDB.repo MariaDB 파일 입력 정보 ..

Linux 2022.01.24

[Linux, Centos7] java(Openjdk 11) 설치

● Centos7에서 openjdk11 설치하기 1. root 계정으로 로그인 명령어 =====> sudo su 2. yum 명령어로 설치 가능한 jdk 리스트 확인 명령어 =====> yum list java*openjdk* 3. 원하는 버전의 openjdk 설치 list에 있는 openjdk 패키지가 JRE이고 openjdk-devel 이라고 되어 있는 패키지가 JDK라고 생각하면 됨 (본글에서는 open jdk 11버전을 설치할 것) 명령어 =====> yum install -y java-11-openjdk-devel.x86_64 4. 설치 확인 명령어1 =====> java -version 명령어2 =====> javac -version 명령어3 =====> which java

Linux 2022.01.23