diff --git a/build.gradle b/build.gradle index d29ab42..2bfa3b7 100644 --- a/build.gradle +++ b/build.gradle @@ -34,6 +34,7 @@ repositories { dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.postgresql:postgresql:42.6.0' + runtimeOnly 'com.h2database:h2' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' testImplementation 'org.testcontainers:testcontainers:1.19.1' diff --git a/src/main/resources/application-sandbox.properties b/src/main/resources/application-sandbox.properties deleted file mode 100644 index e166b60..0000000 --- a/src/main/resources/application-sandbox.properties +++ /dev/null @@ -1,8 +0,0 @@ -spring.datasource.url= jdbc:postgresql://db:5432/petstore -spring.datasource.username= postgres -spring.datasource.password= postgres123 -spring.datasource.driver-class-name=org.postgresql.Driver -spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect -spring.jpa.show-sql=true -## Hibernate ddl auto (create, create-drop, validate, update) -spring.jpa.hibernate.ddl-auto=update diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 9cba4d2..3bbd15f 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,8 +1,8 @@ -spring.datasource.url= jdbc:postgresql://localhost:5432/petstore -spring.datasource.username= postgres -spring.datasource.password= postgres123 -spring.datasource.driver-class-name=org.postgresql.Driver -spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect +spring.datasource.url=jdbc:h2:mem:testdb +spring.datasource.driverClassName=org.h2.Driver +spring.datasource.username=sa +spring.datasource.password=password +spring.jpa.database-platform=org.hibernate.dialect.H2Dialect spring.jpa.show-sql=true ## Hibernate ddl auto (create, create-drop, validate, update) spring.jpa.hibernate.ddl-auto=update \ No newline at end of file