-
5. SpringBoot + Rancher + VsCode Mysql ClientProject/React+Java 2022. 7. 22. 11:51
https://github.com/dchkang83/project-board
GitHub - dchkang83/project-board
Contribute to dchkang83/project-board development by creating an account on GitHub.
github.com
1. Rancher - Mysql Run
$ nerdctl run -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=<패스워드> mysql:latest $ nerdctl run -d -p 3306:3306 --restart=always -e MYSQL_ROOT_PASSWORD=<패스워드> mysql:latest $ nerdctl ps -a
2. VS Code - Mysql Client 설치
3. root database 연결
4. database 및 user 생성
CREATE DATABASE `test-board-server`; CREATE USER 'test-board-user'@'%' IDENTIFIED BY 'test1234@'; GRANT ALL PRIVILEGES ON `test-board-server`.* TO 'test-board-user'@'%'; flush privileges; SELECT * from user;
5. mysql connect - 의존성 추가
// runtimeOnly 'com.h2database:h2' runtimeOnly 'mysql:mysql-connector-java'
6. application.yml 수정
spring: datasource: # driver-class-name: org.h2.Driver # url: jdbc:h2:mem:test # username: sa # password: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/test-board-server?serverTimezone=Asia/Seoul username: test-board-user password: test1234@
7. Repository Test Case 실행 및 확인
'Project > React+Java' 카테고리의 다른 글
7. Spring Boot + Spring Security + JWT + access token + refresh token + 토큰 갱신 (0) 2022.08.02 6. Spring Boot + Spring Security + JWT + access token (0) 2022.07.22 4. SpringBoot + JPA + H2 database (0) 2022.07.21 3. SpringBoot + Logback 설정 (0) 2022.07.21 2. SpringBoot + Controller TestCase 설정 확인 (0) 2022.07.21