Skip to content

Commit

Permalink
Fix database references
Browse files Browse the repository at this point in the history
  • Loading branch information
luizgustavocosta committed Feb 7, 2021
1 parent 6b5a37f commit 25638f5
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 36 deletions.
9 changes: 4 additions & 5 deletions quarkus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm</artifactId>
</dependency>
<!-- JDBC driver dependencies -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-postgresql</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>io.quarkus</groupId>-->
<!-- <artifactId>quarkus-jdbc-postgresql</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
Expand Down
55 changes: 28 additions & 27 deletions quarkus/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
#quarkus.datasource."users".db-kind=h2
#quarkus.datasource."users".jdbc.url=jdbc:h2:mem:users;DB_CLOSE_DELAY=-1
# For H2
quarkus.datasource.db-kind=h2
quarkus.datasource.jdbc.url=jdbc:h2:mem:default;DB_CLOSE_DELAY=-1

quarkus.datasource."users".db-kind=h2
quarkus.datasource."users".jdbc.url=jdbc:h2:mem:users;DB_CLOSE_DELAY=-1

# For PostgreSQL
quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.hibernate-orm."users".database.generation=drop-and-create
quarkus.hibernate-orm."users".datasource=users
quarkus.datasource."item".db-kind=h2
quarkus.datasource."item".jdbc.url=jdbc:h2:mem:item;DB_CLOSE_DELAY=-1

quarkus.hibernate-orm."item".database.generation=drop-and-create
quarkus.hibernate-orm."item".datasource=item
quarkus.datasource."auction".db-kind=h2
quarkus.datasource."auction".jdbc.url=jdbc:h2:mem:auction;DB_CLOSE_DELAY=-1

# For PostgreSQL
#quarkus.hibernate-orm."auction".datasource=auction
#quarkus.datasource."auction".db-kind=postgresql
#quarkus.datasource."auction".jdbc.url=jdbc:postgresql://localhost:5432/ecommerce
#quarkus.hibernate-orm."auction".database.generation=drop-and-create

#quarkus.hibernate-orm."item".datasource=item
#quarkus.datasource."item".db-kind=postgresql
#quarkus.datasource."item".jdbc.url=jdbc:postgresql://localhost:5432/store
#quarkus.hibernate-orm."item".database.generation=drop-and-create

#quarkus.hibernate-orm."users".database.generation=drop-and-create
#quarkus.hibernate-orm."users".datasource=users
#quarkus.datasource."users".db-kind=postgresql
#quarkus.datasource."users".jdbc.url=jdbc:postgresql://localhost:5432/backoffice

#Common
quarkus.hibernate-orm."auction".database.generation=drop-and-create
quarkus.hibernate-orm."auction".datasource=auction

quarkus.datasource."users".db-kind=postgresql
quarkus.datasource."users".jdbc.url=jdbc:postgresql://localhost:5432/backoffice

#quarkus.datasource."item".db-kind=h2
#quarkus.datasource."item".jdbc.url=jdbc:h2:mem:item;DB_CLOSE_DELAY=-1


quarkus.datasource."item".db-kind=postgresql
quarkus.datasource."item".jdbc.url=jdbc:postgresql://localhost:5432/store


#quarkus.datasource."auction".db-kind=h2
#quarkus.datasource."auction".jdbc.url=jdbc:h2:mem:auction;DB_CLOSE_DELAY=-1

quarkus.datasource."auction".db-kind=postgresql
quarkus.datasource."auction".jdbc.url=jdbc:postgresql://localhost:5432/ecommerce

quarkus.hibernate-orm."item".database.generation=drop-and-create
quarkus.hibernate-orm."user".database.generation=drop-and-create
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import static org.hamcrest.CoreMatchers.is;

@QuarkusTest
public class GreetingResourceTest {
class GreetingResourceTest {

@Test
public void testHelloEndpoint() {
void testHelloEndpoint() {
given()
.when().get("/hello-resteasy")
.then()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.quarkus.test.junit.QuarkusTest;
import org.apache.http.HttpStatus;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

Expand Down
2 changes: 0 additions & 2 deletions spring/src/main/resources/schema.sql

This file was deleted.

0 comments on commit 25638f5

Please sign in to comment.