1. H2 ์ค์น
https://www.h2database.com/html/main.html
H2 Database Engine
H2 Database Engine Welcome to H2, the Java SQL database. The main features of H2 are: Very fast, open source, JDBC API Embedded and server modes; in-memory databases Browser based Console application Small footprint: around 2.5 MB jar file size Supp
www.h2database.com
2. . H2์์ ๋ฐ์ดํฐ๋ฒ ์ด์ค ์์ฑ
h2\bin ๋ฐ์ h2 ๋ฐฐ์นํ์ผ ์คํ
์คํ๋ ์ฝ์์ ์ค์ ํ connect ํด๋ฆญ
- JDBC URL : jdbc:h2:~/testDB
- User Name : rruro
C:\Users\์ฌ์ฉ์id ๋ฐ์ study.mv ํ์ผ ์์ฑ ํ์ธ ํ ์ฐ๊ฒฐ ๋๊ธฐ
โป ์ฐ๊ฒฐ ์ ๋๊ณ localhost๋ก ์ ์ํ๋ฉด ์๋ฌ๋ธ
3. build.gradle - dependencies ์ถ๊ฐ
runtimeOnly 'com.h2database:h2'
4. application.properties ํ์ผ ๋ณ๊ฒฝ
ํ์ฅ์๋ช ๋ง ๋ฐ๊ฟ์ application.yml ํ์ผ๋ก ๋ณ๊ฒฝ
5. application.yml ํ์ผ ์ค์
spring:
h2:
console:
enabled: true
path: /h2-console
datasource:
driver-class-name: org.h2.Driver
url: jdbc:h2:~/testDB
username: rruro
password:
6. Gradle ์๋ก๊ณ ์นจ
7. ํ๋ก์ ํธ ์คํ
8. ์ ์
localhost:8080/h2-console ์ ์ ์ (study-h2๋ application.yml์์ ์ค์ ํ h2 path ์ ๋ ฅ)
'โจ๐ฑ ํ๋ก๊ทธ๋๋ฐ > ๐ ํ๋ก์ ํธ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[3] ํ ์ด๋ธ ์์ฑ (0) | 2023.09.18 |
---|---|
[1] ํ๋ก์ ํธ ์์ (0) | 2023.09.17 |