Spring
h2-console 연동하기
yougeun
2023. 4. 3. 18:22
728x90
Memory
application.properties
spring.h2.console.enabled=true
spring.datasource.url=jdbc:h2:mem:db이름
spring.datasource.username= sa
spring.datasource.password=
spring.datasource.driver-class-name=org.h2.Driver
Server
DB 생성
DB 생성 후 이후 접속
application.properties
spring.datasource.url=jdbc:h2:tcp://localhost/~/DB이름
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driver-class-name=org.h2.Driver
[H2] Database (디렉토리 경로) not found, either pre-create it or allow remote database creation 오류 시 DB 만들기
윈도우 시스템 트레이 아이콘을 클릭하여 H2-console 접속 후 생성가능
728x90