Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions mybatis-plus/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,11 @@
<artifactId>quarkus-test-h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-derby</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-h2-deployment</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-derby</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
8 changes: 0 additions & 8 deletions mybatis-plus/integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-h2</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-derby</artifactId>
</dependency>

<!-- test dependencies -->
<dependency>
Expand All @@ -57,10 +53,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-h2</artifactId>
<scope>test</scope>
</dependency><dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-derby</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down
10 changes: 0 additions & 10 deletions mybatis/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,11 @@
<artifactId>quarkus-test-h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-derby</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-h2-deployment</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-derby</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import java.util.UUID;

import jakarta.inject.Inject;
import jakarta.inject.Named;

import org.apache.ibatis.session.SqlSessionFactory;
import org.jboss.shrinkwrap.api.ShrinkWrap;
Expand All @@ -29,9 +28,6 @@ public class MyBatisTest {
@Inject
SqlSessionFactory h2SqlSessionFactory;

@Named("derby")
SqlSessionFactory derbySqlSessionFactory;

@Test
public void test() throws Exception {
assertTrue(h2SqlSessionFactory.getConfiguration().getMapperRegistry().hasMapper(UserMapper.class));
Expand All @@ -40,8 +36,5 @@ public void test() throws Exception {
assertEquals(user.getId(), 1);
assertEquals(user.getName(), "Test User1");
assertEquals(user.getExternalId(), UUID.fromString("8c5034fe-1a00-43b7-9c75-f83ef14e3507"));

assertEquals("Apache Derby",
derbySqlSessionFactory.openSession().getConnection().getMetaData().getDatabaseProductName());
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package io.quarkiverse.mybatis.test;

import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.derby.DerbyDatabaseTestResource;
import io.quarkus.test.h2.H2DatabaseTestResource;

@QuarkusTestResource(H2DatabaseTestResource.class)
@QuarkusTestResource(DerbyDatabaseTestResource.class)
public class TestResources {
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@ quarkus.datasource.db-kind=h2
quarkus.datasource.username=username-default
quarkus.datasource.jdbc.url=jdbc:h2:tcp://localhost/mem:default
quarkus.mybatis.initial-sql=insert.sql

# Derby
quarkus.datasource.derby.db-kind=derby
quarkus.datasource.derby.jdbc.url=jdbc:derby://localhost:1527/memory:testDB;create=true
8 changes: 0 additions & 8 deletions mybatis/integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-h2</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jdbc-derby</artifactId>
</dependency>

<!-- test dependencies -->
<dependency>
Expand All @@ -57,10 +53,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-h2</artifactId>
<scope>test</scope>
</dependency><dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-derby</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ public class MyBatisResource {
@Inject
BookMapper bookMapper;

@Inject
DerbyUserMapper derbyUserMapper;

@Path("/user/{id}")
@GET
@Produces(MediaType.APPLICATION_JSON)
Expand Down Expand Up @@ -68,13 +65,6 @@ public int getUserCount() {
return userMapper.getUserCount();
}

@Path("/user/count/derby")
@GET
@Produces(MediaType.APPLICATION_JSON)
public int getDerbyUserCount() {
return derbyUserMapper.getUserCount();
}

@Path("/user/cursor")
@GET
@Produces(MediaType.APPLICATION_JSON)
Expand Down Expand Up @@ -109,11 +99,4 @@ public Book findBookById(@PathParam("id") Integer id) {
public User findUserById(@PathParam("id") Integer id) {
return userMapper.findById(id);
}

@Path("/user/xmlMapper/derby/{id}")
@GET
@Produces(MediaType.APPLICATION_JSON)
public User findDerbyUserById(@PathParam("id") Integer id) {
return derbyUserMapper.findById(id);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,4 @@ quarkus.datasource.jdbc.url=jdbc:h2:tcp://localhost/mem:default
quarkus.mybatis.initial-sql=insert.sql
quarkus.mybatis.configuration-factory=io.quarkiverse.it.mybatis.PageConfigurationFactory

# Derby
quarkus.datasource.derby.db-kind=derby
quarkus.datasource.derby.jdbc.url=jdbc:derby://localhost:1527/memory:testDB;create=true
quarkus.mybatis.derby.initial-sql=insert-derby.sql

quarkus.mybatis.mapper-locations=mapper,otherMapper/
11 changes: 0 additions & 11 deletions mybatis/integration-tests/src/main/resources/insert-derby.sql

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ public void runTest() {
RestAssured.when().get("/mybatis/user/xmlMapper/1").then()
.body(is("{\"id\":1,\"name\":\"Test User1\",\"externalId\":\"ccb16b65-8924-4c3f-8c55-681d85a16e79\"}"));

RestAssured.when().get("/mybatis/user/xmlMapper/derby/1").then()
.body(is("{\"id\":1,\"name\":\"Test User1\",\"externalId\":\"ccb16b65-8924-4c3f-8c55-681d85a16e79\"}"));

RestAssured.when().get("/mybatis/user/cursor").then()
.body(is("[\"Test User1\",\"Test User2\",\"New User\"]"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@ class MultipleDataSourcesTest {
public void test() {
RestAssured.when().get("/mybatis/user/count/h2").then()
.body(is("3"));

RestAssured.when().get("/mybatis/user/count/derby").then()
.body(is("4"));
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package io.quarkiverse.it.mybatis;

import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.derby.DerbyDatabaseTestResource;
import io.quarkus.test.h2.H2DatabaseTestResource;

@QuarkusTestResource(H2DatabaseTestResource.class)
@QuarkusTestResource(DerbyDatabaseTestResource.class)
public class TestResources {
}