localhost:8080/h2-console 에러

pyungjong·2024년 5월 9일

웹 프로젝트

목록 보기
1/3

H2 데이터베이스에 연결하고자 localhost:8080/h2-console을 입력하였지만 아무 페이지도 나오지 않는 에러가 발생했다.
localhost:8080은 에러 없이 접속이 되었고, 데이터베이스도 생성된 것을 확인하였다.

  spring:
    datasource:
      url: jdbc:h2:~/balance-db2
      username: sa
      password:
      driver-class-name: org.h2.Driver
    jpa:
      hibernate:
        ddl-auto: create

초기 YML 파일에서 코드를 추가했다.

    h2:
      console:
        enabled: true

잘 접속되는 것을 확인할수 있다.

  spring:
    h2:
      console:
        enabled: true
    datasource:
      url: jdbc:h2:~/balance-db2
      username: sa
      password:
      driver-class-name: org.h2.Driver
    jpa:
      hibernate:
        ddl-auto: create
profile
코린이

0개의 댓글