설치는 해당 블로그 참조
https://velog.io/@bi-sz/MySQL-설치하기
DB와 테이블 초기화를 위해 아래의 SQL문을 MySQL 콘솔에 입력
create database capstone;
use capstone;
show tables ;
create table test (
user_id int auto_increment,
name varchar(50),
age int,
primary key (user_id)
);
select * from test;
delete from test where name = '홍길동';
해당 프로젝트의 내용은 다음과 같음
1. controller에서 서버 호출을 받음
2. service에서 전달받은 dto를 domain 객체로 바꿔 repository로 전달
(이때 JPA 문법을 사용)
3. repository는 JPARepository를 상속받음
해당 프로젝트를 바로 실행시키면 에러 발생
DB_USERNAME=mysql_설치_때_사용한_user이름 (따로 설정한게 없다면 root)
DB_PASSWORD=mysql_설치_때_사용한_비밀번호 (따로 설정한게 없다면 빈칸)


http://localhost:8080/db-connection-test-find?id=1 로 접속시 이름 노출
parameter 값으로 id를 넘겨주면서 조회 가능
