Spring

[Spring] H2 데이터베이스 사용하기 & 인텔리제이 DB도구 추가

P.젤리비 2022. 8. 26.
반응형

웹 콘솔을 이용한 접속 방법

application.yml

  • H2 DB를 인메모리 DB로 만들어준다.
spring:
  h2:
    console:
      enabled: true

localhost:8080/h2-console/ 로 접속한다.

IDE 로그에 뜬 jdbc주소를 복사해서 페이지의 jdbc URL에 붙여넣어준다.

 

인텔리제이에서의 사용법

유료버전에서는 database기능에서 생성해주기만하면 사용가능한데.

커뮤니티 버젼은 지원을 하지 않는다.

 

이의 대체품으로 플러그인 Database Navigator 를 설치해준다.

몇가지 DB를 제공해주는데. H2는 없다.

 

jpa buddy 페이지에서 H2링크를 타고 H2를 설치한 후

https://www.jpa-buddy.com/documentation/database-connections/#database-connections

 

Database Connections

Introduction JPA Structure panel is responsible for everything related to DB configurations. To create a new DB connection, click on the “Plus” button and choose “DB Connection”. To use Reverse Engineering and Database Versioning features, the firs

www.jpa-buddy.com

.jar파일을 커스텀으로 하여 추가해준다.

대충 감으로 해보니 똑같진않아도 비슷하게 나마 제공해주는 듯하다.

반응형

댓글

💲 추천 글