<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.2.224</version>
<scope>runtime</scope>
</dependency>
spring:
application:
name: e-user-service
h2: #추가
console:
enabled: true
settings:
web-allow-others: true
path: /h2-console
server:
port: 0
eureka:
instance:
instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}}
client:
fetch-registry: true
register-with-eureka: true
service-url:
defaultZone: http://127.0.0.1:8761/eureka
greeting:
message: Welcome to the Simple E-commerce.
(🔗 출처: H2를 최신버전(현재는 2.1.214)으로 사용 시 오류 임시 해결 방법)

Open Library Settings 실행 시 .jar 파일의 경로가 뜸..jar 파일 더블 클릭하여 실행



실행 유지 시킨 채로 진행
spring.h2.path는 /h2-consolespring:
application:
name: e-user-service
h2:
console:
enabled: true
settings:
web-allow-others: true
path: /h2-console
datasource: #설정 추가
driver-class-name: org.h2.Driver
url: jdbc:h2:mem:testdb
server:
port: 0
eureka:
instance:
instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}}
client:
fetch-registry: true
register-with-eureka: true
service-url:
defaultZone: http://127.0.0.1:8761/eureka
greeting:
message: Welcome to the Simple E-commerce.

jdbc:h2:mem:testdb 가 생성되어 있음 확인 가능