diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 967b5a32..e677f6ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,28 @@ env: MAVEN_OPTS: -Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true jobs: + # TODO + test-graalvm-ce-ci: + name: NativeTest CI - GraalVM CE ${{ matrix.java-version }} on ${{ matrix.os }} (This CI failure is reasonable) + runs-on: ${{ matrix.os }} + timeout-minutes: 90 + continue-on-error: true + strategy: + matrix: + os: [ ubuntu-latest ] + java-version: [ '17.0.8' ] + steps: + - uses: actions/checkout@v3 + - uses: graalvm/setup-graalvm@v1 + with: + java-version: ${{ matrix.java-version }} + distribution: 'graalvm-community' + github-token: ${{ secrets.GITHUB_TOKEN }} + cache: 'maven' + - name: Build Spring Boot Starter 3 test with Maven + run: | + ./mvnw -T1C -B -PgenerateMetadata -DskipNativeTests clean test +# ./mvnw -am -pl dynamic-datasource-spring-boot3-starter -PnativeTestInSpringBoot clean test test-maximum-jdk-ci: name: Test CI - JDK ${{ matrix.java-version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} diff --git a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/AddRemoveDatasourceTest.java b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/AddRemoveDatasourceTest.java similarity index 98% rename from dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/AddRemoveDatasourceTest.java rename to dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/AddRemoveDatasourceTest.java index 064e0345..4b1ba80a 100644 --- a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/AddRemoveDatasourceTest.java +++ b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/AddRemoveDatasourceTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture; +package com.baomidou.dynamic.datasource.fixture.v1; import com.baomidou.dynamic.datasource.DynamicRoutingDataSource; import com.baomidou.dynamic.datasource.creator.DataSourceProperty; diff --git a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/LoadDatasourceFromJDBCTest.java b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/LoadDatasourceFromJDBCTest.java similarity index 98% rename from dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/LoadDatasourceFromJDBCTest.java rename to dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/LoadDatasourceFromJDBCTest.java index b93364cd..20cf5499 100644 --- a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/LoadDatasourceFromJDBCTest.java +++ b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/LoadDatasourceFromJDBCTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture; +package com.baomidou.dynamic.datasource.fixture.v1; import com.baomidou.dynamic.datasource.DynamicRoutingDataSource; import com.baomidou.dynamic.datasource.creator.DataSourceProperty; diff --git a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/NestDataSourceTest.java b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/NestDataSourceTest.java similarity index 91% rename from dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/NestDataSourceTest.java rename to dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/NestDataSourceTest.java index 14ab6284..0640c2fc 100644 --- a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/NestDataSourceTest.java +++ b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/NestDataSourceTest.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture; +package com.baomidou.dynamic.datasource.fixture.v1; import com.baomidou.dynamic.datasource.DynamicRoutingDataSource; import com.baomidou.dynamic.datasource.creator.DataSourceProperty; import com.baomidou.dynamic.datasource.creator.DefaultDataSourceCreator; -import com.baomidou.dynamic.datasource.fixture.service.nest.SchoolService; -import com.baomidou.dynamic.datasource.fixture.service.nest.Student; -import com.baomidou.dynamic.datasource.fixture.service.nest.StudentService; -import com.baomidou.dynamic.datasource.fixture.service.nest.TeacherService; +import com.baomidou.dynamic.datasource.fixture.v1.service.nest.SchoolService; +import com.baomidou.dynamic.datasource.fixture.v1.service.nest.Student; +import com.baomidou.dynamic.datasource.fixture.v1.service.nest.StudentService; +import com.baomidou.dynamic.datasource.fixture.v1.service.nest.TeacherService; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; diff --git a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/SPELTest.java b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/SPELTest.java similarity index 95% rename from dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/SPELTest.java rename to dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/SPELTest.java index 0c509792..2c9bf5f5 100644 --- a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/SPELTest.java +++ b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/SPELTest.java @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture; +package com.baomidou.dynamic.datasource.fixture.v1; import com.baomidou.dynamic.datasource.DynamicRoutingDataSource; import com.baomidou.dynamic.datasource.creator.DataSourceProperty; import com.baomidou.dynamic.datasource.creator.DefaultDataSourceCreator; -import com.baomidou.dynamic.datasource.fixture.service.spel.CustomResultHandler; -import com.baomidou.dynamic.datasource.fixture.service.spel.User; -import com.baomidou.dynamic.datasource.fixture.service.spel.UserService; +import com.baomidou.dynamic.datasource.fixture.v1.service.spel.CustomResultHandler; +import com.baomidou.dynamic.datasource.fixture.v1.service.spel.User; +import com.baomidou.dynamic.datasource.fixture.v1.service.spel.UserService; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/controller/UserController.java b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/controller/UserController.java similarity index 87% rename from dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/controller/UserController.java rename to dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/controller/UserController.java index a5af057c..e8ae82a8 100644 --- a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/controller/UserController.java +++ b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/controller/UserController.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.controller; +package com.baomidou.dynamic.datasource.fixture.v1.controller; -import com.baomidou.dynamic.datasource.fixture.service.spel.User; -import com.baomidou.dynamic.datasource.fixture.service.spel.UserService; +import com.baomidou.dynamic.datasource.fixture.v1.service.spel.User; +import com.baomidou.dynamic.datasource.fixture.v1.service.spel.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/SchoolService.java b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/SchoolService.java similarity index 95% rename from dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/SchoolService.java rename to dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/SchoolService.java index 55c7ea03..516d87f3 100644 --- a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/SchoolService.java +++ b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/SchoolService.java @@ -13,14 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.nest; +package com.baomidou.dynamic.datasource.fixture.v1.service.nest; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service public class SchoolService { - private final TeacherService teacherService; private final StudentService studentService; diff --git a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/Student.java b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/Student.java similarity index 92% rename from dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/Student.java rename to dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/Student.java index 5a9e20bf..ba220300 100644 --- a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/Student.java +++ b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/Student.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.nest; +package com.baomidou.dynamic.datasource.fixture.v1.service.nest; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/StudentService.java b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/StudentService.java similarity index 97% rename from dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/StudentService.java rename to dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/StudentService.java index 299fa788..34b6e798 100644 --- a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/StudentService.java +++ b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/StudentService.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.nest; +package com.baomidou.dynamic.datasource.fixture.v1.service.nest; import com.baomidou.dynamic.datasource.annotation.DS; import org.springframework.stereotype.Service; @@ -32,7 +32,6 @@ @Service @DS("student") public class StudentService { - private final DataSource dataSource; public StudentService(DataSource dataSource) { diff --git a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/Teacher.java b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/Teacher.java similarity index 92% rename from dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/Teacher.java rename to dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/Teacher.java index ec8b1a72..4e871d9f 100644 --- a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/Teacher.java +++ b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/Teacher.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.nest; +package com.baomidou.dynamic.datasource.fixture.v1.service.nest; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/TeacherService.java b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/TeacherService.java similarity index 97% rename from dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/TeacherService.java rename to dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/TeacherService.java index b8d2b58f..ae639a2c 100644 --- a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/TeacherService.java +++ b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/nest/TeacherService.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.nest; +package com.baomidou.dynamic.datasource.fixture.v1.service.nest; import com.baomidou.dynamic.datasource.annotation.DS; import org.springframework.stereotype.Service; @@ -32,7 +32,6 @@ @Service @DS("teacher") public class TeacherService { - private final DataSource dataSource; public TeacherService(DataSource dataSource) { diff --git a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/CustomResultHandler.java b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/spel/CustomResultHandler.java similarity index 84% rename from dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/CustomResultHandler.java rename to dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/spel/CustomResultHandler.java index e707c911..bf470921 100644 --- a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/CustomResultHandler.java +++ b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/spel/CustomResultHandler.java @@ -1,4 +1,4 @@ -package com.baomidou.dynamic.datasource.fixture.service.spel; +package com.baomidou.dynamic.datasource.fixture.v1.service.spel; import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.ResultHandler; diff --git a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/User.java b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/spel/User.java similarity index 93% rename from dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/User.java rename to dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/spel/User.java index f42a3352..1c88c098 100644 --- a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/User.java +++ b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/spel/User.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.spel; +package com.baomidou.dynamic.datasource.fixture.v1.service.spel; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/UserService.java b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/spel/UserService.java similarity index 97% rename from dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/UserService.java rename to dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/spel/UserService.java index b00d4965..1daa95fc 100644 --- a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/UserService.java +++ b/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v1/service/spel/UserService.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.spel; +package com.baomidou.dynamic.datasource.fixture.v1.service.spel; import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; diff --git a/dynamic-datasource-spring-boot3-starter/pom.xml b/dynamic-datasource-spring-boot3-starter/pom.xml index 511d0cff..e77d217f 100644 --- a/dynamic-datasource-spring-boot3-starter/pom.xml +++ b/dynamic-datasource-spring-boot3-starter/pom.xml @@ -14,7 +14,6 @@ https://github.com/baomidou/dynamic-datasource-spring-boot-starter/tree/master/dynamic-datasource-spring-boot3-starter - 17 3.1.1 @@ -51,5 +50,4 @@ test - - \ No newline at end of file + diff --git a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/AddRemoveDatasourceTest.java b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/AddRemoveDatasourceTest.java similarity index 98% rename from dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/AddRemoveDatasourceTest.java rename to dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/AddRemoveDatasourceTest.java index 41996968..2da9bce6 100644 --- a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/AddRemoveDatasourceTest.java +++ b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/AddRemoveDatasourceTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture; +package com.baomidou.dynamic.datasource.fixture.v3; import com.baomidou.dynamic.datasource.DynamicRoutingDataSource; import com.baomidou.dynamic.datasource.creator.DataSourceProperty; diff --git a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/LoadDatasourceFromJDBCTest.java b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/LoadDatasourceFromJDBCTest.java similarity index 98% rename from dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/LoadDatasourceFromJDBCTest.java rename to dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/LoadDatasourceFromJDBCTest.java index 753b9b1d..a3778d90 100644 --- a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/LoadDatasourceFromJDBCTest.java +++ b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/LoadDatasourceFromJDBCTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture; +package com.baomidou.dynamic.datasource.fixture.v3; import com.baomidou.dynamic.datasource.DynamicRoutingDataSource; import com.baomidou.dynamic.datasource.creator.DataSourceProperty; diff --git a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/NestDataSourceTest.java b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/NestDataSourceTest.java similarity index 91% rename from dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/NestDataSourceTest.java rename to dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/NestDataSourceTest.java index e0d42190..b01a674d 100644 --- a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/NestDataSourceTest.java +++ b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/NestDataSourceTest.java @@ -13,15 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture; +package com.baomidou.dynamic.datasource.fixture.v3; import com.baomidou.dynamic.datasource.DynamicRoutingDataSource; import com.baomidou.dynamic.datasource.creator.DataSourceProperty; import com.baomidou.dynamic.datasource.creator.DefaultDataSourceCreator; -import com.baomidou.dynamic.datasource.fixture.service.nest.SchoolService; -import com.baomidou.dynamic.datasource.fixture.service.nest.Student; -import com.baomidou.dynamic.datasource.fixture.service.nest.StudentService; -import com.baomidou.dynamic.datasource.fixture.service.nest.TeacherService; +import com.baomidou.dynamic.datasource.fixture.v3.service.nest.SchoolService; +import com.baomidou.dynamic.datasource.fixture.v3.service.nest.Student; +import com.baomidou.dynamic.datasource.fixture.v3.service.nest.StudentService; +import com.baomidou.dynamic.datasource.fixture.v3.service.nest.TeacherService; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; diff --git a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/SPELTest.java b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/SPELTest.java similarity index 93% rename from dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/SPELTest.java rename to dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/SPELTest.java index 25799d1f..5813c1dd 100644 --- a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/SPELTest.java +++ b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/SPELTest.java @@ -13,15 +13,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture; +package com.baomidou.dynamic.datasource.fixture.v3; import com.baomidou.dynamic.datasource.DynamicRoutingDataSource; import com.baomidou.dynamic.datasource.creator.DataSourceProperty; import com.baomidou.dynamic.datasource.creator.DefaultDataSourceCreator; -import com.baomidou.dynamic.datasource.fixture.service.spel.User; -import com.baomidou.dynamic.datasource.fixture.service.spel.UserService; +import com.baomidou.dynamic.datasource.fixture.v3.service.spel.User; +import com.baomidou.dynamic.datasource.fixture.v3.service.spel.UserService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledInNativeImage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -42,7 +43,11 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppContextSetup; +/** + * TODO It looks like SPEL is not available under the test with GraalVM Tracing Agent. + */ @SpringBootTest(classes = SPELApplication.class, webEnvironment = RANDOM_PORT) +@DisabledInNativeImage public class SPELTest { MockMvc mockMvc; diff --git a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/controller/UserController.java b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/controller/UserController.java similarity index 87% rename from dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/controller/UserController.java rename to dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/controller/UserController.java index cf4fe810..031ae7ae 100644 --- a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/controller/UserController.java +++ b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/controller/UserController.java @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.controller; +package com.baomidou.dynamic.datasource.fixture.v3.controller; -import com.baomidou.dynamic.datasource.fixture.service.spel.User; -import com.baomidou.dynamic.datasource.fixture.service.spel.UserService; +import com.baomidou.dynamic.datasource.fixture.v3.service.spel.User; +import com.baomidou.dynamic.datasource.fixture.v3.service.spel.UserService; import jakarta.servlet.http.HttpServletRequest; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/SchoolService.java b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/SchoolService.java similarity index 95% rename from dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/SchoolService.java rename to dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/SchoolService.java index 3608baba..93e8aaf5 100644 --- a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/SchoolService.java +++ b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/SchoolService.java @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.nest; +package com.baomidou.dynamic.datasource.fixture.v3.service.nest; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service public class SchoolService { + private final TeacherService teacherService; private final StudentService studentService; diff --git a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/Student.java b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/Student.java similarity index 91% rename from dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/Student.java rename to dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/Student.java index 3af25b22..47cba3c3 100644 --- a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/Student.java +++ b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/Student.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.nest; +package com.baomidou.dynamic.datasource.fixture.v3.service.nest; public record Student(Integer id, String name, Integer age) { } diff --git a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/StudentService.java b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/StudentService.java similarity index 97% rename from dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/StudentService.java rename to dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/StudentService.java index 4eaf0689..ed988f0b 100644 --- a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/StudentService.java +++ b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/StudentService.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.nest; +package com.baomidou.dynamic.datasource.fixture.v3.service.nest; import com.baomidou.dynamic.datasource.annotation.DS; import org.springframework.stereotype.Service; @@ -32,6 +32,7 @@ @Service @DS("student") public class StudentService { + private final DataSource dataSource; public StudentService(DataSource dataSource) { diff --git a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/Teacher.java b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/Teacher.java similarity index 91% rename from dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/Teacher.java rename to dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/Teacher.java index 4a6d014d..dcb431a9 100644 --- a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/Teacher.java +++ b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/Teacher.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.nest; +package com.baomidou.dynamic.datasource.fixture.v3.service.nest; public record Teacher(Integer id, String name, Integer age) { } diff --git a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/TeacherService.java b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/TeacherService.java similarity index 97% rename from dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/TeacherService.java rename to dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/TeacherService.java index 868a74e7..cc239dcf 100644 --- a/dynamic-datasource-spring-boot-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/nest/TeacherService.java +++ b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/nest/TeacherService.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.nest; +package com.baomidou.dynamic.datasource.fixture.v3.service.nest; import com.baomidou.dynamic.datasource.annotation.DS; import org.springframework.stereotype.Service; @@ -32,6 +32,7 @@ @Service @DS("teacher") public class TeacherService { + private final DataSource dataSource; public TeacherService(DataSource dataSource) { diff --git a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/User.java b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/spel/User.java similarity index 92% rename from dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/User.java rename to dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/spel/User.java index c4b59f33..cfa7062d 100644 --- a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/User.java +++ b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/spel/User.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.spel; +package com.baomidou.dynamic.datasource.fixture.v3.service.spel; public record User(Integer id, String name, Integer age, String tenantName) { public User(String tenantName) { diff --git a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/UserService.java b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/spel/UserService.java similarity index 97% rename from dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/UserService.java rename to dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/spel/UserService.java index b00d4965..1b3affb3 100644 --- a/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/service/spel/UserService.java +++ b/dynamic-datasource-spring-boot3-starter/src/test/java/com/baomidou/dynamic/datasource/fixture/v3/service/spel/UserService.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.baomidou.dynamic.datasource.fixture.service.spel; +package com.baomidou.dynamic.datasource.fixture.v3.service.spel; import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; diff --git a/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/jni-config.json b/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/jni-config.json new file mode 100644 index 00000000..0d4f101c --- /dev/null +++ b/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/jni-config.json @@ -0,0 +1,2 @@ +[ +] diff --git a/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/predefined-classes-config.json b/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/predefined-classes-config.json new file mode 100644 index 00000000..0e79b2c5 --- /dev/null +++ b/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/predefined-classes-config.json @@ -0,0 +1,8 @@ +[ + { + "type":"agent-extracted", + "classes":[ + ] + } +] + diff --git a/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/proxy-config.json b/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/proxy-config.json new file mode 100644 index 00000000..0d4f101c --- /dev/null +++ b/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/proxy-config.json @@ -0,0 +1,2 @@ +[ +] diff --git a/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/reflect-config.json b/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/reflect-config.json new file mode 100644 index 00000000..5a357503 --- /dev/null +++ b/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/reflect-config.json @@ -0,0 +1,148 @@ +[ +{ + "name":"com.alibaba.druid.filter.stat.StatFilter", + "methods":[{"name":"setDbType","parameterTypes":["java.lang.String"] }] +}, +{ + "name":"com.alibaba.druid.pool.DruidDataSource", + "methods":[{"name":"close","parameterTypes":[] }, {"name":"configFromPropeties","parameterTypes":["java.util.Properties"] }] +}, +{ + "name":"com.baomidou.dynamic.datasource.creator.druid.DruidConfig", + "methods":[{"name":"getAsyncInit","parameterTypes":[] }, {"name":"getBreakAfterAcquireFailure","parameterTypes":[] }, {"name":"getClearFiltersEnable","parameterTypes":[] }, {"name":"getConnectTimeout","parameterTypes":[] }, {"name":"getConnectionErrorRetryAttempts","parameterTypes":[] }, {"name":"getDefaultAutoCommit","parameterTypes":[] }, {"name":"getDefaultCatalog","parameterTypes":[] }, {"name":"getDefaultReadOnly","parameterTypes":[] }, {"name":"getDefaultTransactionIsolation","parameterTypes":[] }, {"name":"getFailFast","parameterTypes":[] }, {"name":"getFilters","parameterTypes":[] }, {"name":"getInitConnectionSqls","parameterTypes":[] }, {"name":"getInitGlobalVariants","parameterTypes":[] }, {"name":"getInitVariants","parameterTypes":[] }, {"name":"getInitialSize","parameterTypes":[] }, {"name":"getKeepAlive","parameterTypes":[] }, {"name":"getKeepAliveBetweenTimeMillis","parameterTypes":[] }, {"name":"getKillWhenSocketReadTimeout","parameterTypes":[] }, {"name":"getLogAbandoned","parameterTypes":[] }, {"name":"getMaxActive","parameterTypes":[] }, {"name":"getMaxEvictableIdleTimeMillis","parameterTypes":[] }, {"name":"getMaxPoolPreparedStatementPerConnectionSize","parameterTypes":[] }, {"name":"getMaxWait","parameterTypes":[] }, {"name":"getMaxWaitThreadCount","parameterTypes":[] }, {"name":"getMinEvictableIdleTimeMillis","parameterTypes":[] }, {"name":"getMinIdle","parameterTypes":[] }, {"name":"getNotFullTimeoutRetryCount","parameterTypes":[] }, {"name":"getPhyMaxUseCount","parameterTypes":[] }, {"name":"getPhyTimeoutMillis","parameterTypes":[] }, {"name":"getPoolPreparedStatements","parameterTypes":[] }, {"name":"getPublicKey","parameterTypes":[] }, {"name":"getQueryTimeout","parameterTypes":[] }, {"name":"getRemoveAbandoned","parameterTypes":[] }, {"name":"getRemoveAbandonedTimeoutMillis","parameterTypes":[] }, {"name":"getResetStatEnable","parameterTypes":[] }, {"name":"getSharePreparedStatements","parameterTypes":[] }, {"name":"getSocketTimeout","parameterTypes":[] }, {"name":"getStatSqlMaxSize","parameterTypes":[] }, {"name":"getTestOnBorrow","parameterTypes":[] }, {"name":"getTestOnReturn","parameterTypes":[] }, {"name":"getTestWhileIdle","parameterTypes":[] }, {"name":"getTimeBetweenConnectErrorMillis","parameterTypes":[] }, {"name":"getTimeBetweenEvictionRunsMillis","parameterTypes":[] }, {"name":"getTimeBetweenLogStatsMillis","parameterTypes":[] }, {"name":"getTransactionQueryTimeout","parameterTypes":[] }, {"name":"getUseGlobalDataSourceStat","parameterTypes":[] }, {"name":"getUseUnfairLock","parameterTypes":[] }, {"name":"getValidationQuery","parameterTypes":[] }, {"name":"getValidationQueryTimeout","parameterTypes":[] }] +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.AddRemoveDatasourceApplication$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.LoadDatasourceFromJDBCApplication", + "queryAllDeclaredMethods":true +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.LoadDatasourceFromJDBCApplication$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.NestApplication$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.SPELApplication$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.nest.SchoolService", + "queryAllDeclaredMethods":true +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.nest.SchoolService$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.nest.SchoolService$$SpringCGLIB$$1" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.nest.SchoolService$$SpringCGLIB$$2" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.nest.StudentService", + "queryAllDeclaredMethods":true +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.nest.StudentService$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.nest.StudentService$$SpringCGLIB$$1" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.nest.StudentService$$SpringCGLIB$$2" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.nest.TeacherService", + "queryAllDeclaredMethods":true +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.nest.TeacherService$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.nest.TeacherService$$SpringCGLIB$$1" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.nest.TeacherService$$SpringCGLIB$$2" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.spel.UserService", + "queryAllDeclaredMethods":true +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.spel.UserService$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.spel.UserService$$SpringCGLIB$$1" +}, +{ + "name":"com.baomidou.dynamic.datasource.fixture.v3.service.spel.UserService$$SpringCGLIB$$2" +}, +{ + "name":"com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DruidDynamicDataSourceConfiguration$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAopConfiguration", + "queryAllDeclaredMethods":true +}, +{ + "name":"com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAopConfiguration$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAssistConfiguration", + "queryAllDeclaredMethods":true +}, +{ + "name":"com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAssistConfiguration$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration", + "queryAllDeclaredMethods":true +}, +{ + "name":"com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceCreatorAutoConfiguration", + "queryAllDeclaredMethods":true +}, +{ + "name":"com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceCreatorAutoConfiguration$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceCreatorAutoConfiguration$DruidDataSourceCreatorConfiguration", + "queryAllDeclaredMethods":true +}, +{ + "name":"com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceCreatorAutoConfiguration$DruidDataSourceCreatorConfiguration$$SpringCGLIB$$0" +}, +{ + "name":"com.baomidou.dynamic.datasource.strategy.LoadBalanceDynamicDataSourceStrategy", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"com.baomidou.mybatisplus.core.override.MybatisMapperProxy" +}, +{ + "name":"com.baomidou.mybatisplus.core.override.PageMapperProxy" +}, +{ + "name":"java.lang.Object", + "queryAllDeclaredMethods":true +}, +{ + "name":"org.apache.ibatis.binding.MapperProxy" +}, +{ + "name":"org.h2.Driver" +}, +{ + "name":"org.springframework.beans.factory.BeanFactoryAware", + "queryAllDeclaredMethods":true +}, +{ + "name":"org.springframework.boot.jdbc.DataSourceBuilder", + "methods":[{"name":"build","parameterTypes":[] }, {"name":"create","parameterTypes":[] }, {"name":"driverClassName","parameterTypes":["java.lang.String"] }, {"name":"password","parameterTypes":["java.lang.String"] }, {"name":"type","parameterTypes":["java.lang.Class"] }, {"name":"url","parameterTypes":["java.lang.String"] }, {"name":"username","parameterTypes":["java.lang.String"] }] +} +] diff --git a/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/resource-config.json b/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/resource-config.json new file mode 100644 index 00000000..40d26709 --- /dev/null +++ b/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/resource-config.json @@ -0,0 +1,443 @@ +{ + "resources":{ + "includes":[{ + "pattern":"\\QMETA-INF/druid-driver.properties\\E" + }, { + "pattern":"\\QMETA-INF/druid-filter.properties\\E" + }, { + "pattern":"\\QMETA-INF/services/ch.qos.logback.classic.spi.Configurator\\E" + }, { + "pattern":"\\QMETA-INF/services/java.sql.Driver\\E" + }, { + "pattern":"\\QMETA-INF/services/org.apache.maven.surefire.spi.MasterProcessChannelProcessorFactory\\E" + }, { + "pattern":"\\QMETA-INF/services/org.junit.platform.engine.TestEngine\\E" + }, { + "pattern":"\\QMETA-INF/services/org.junit.platform.launcher.TestExecutionListener\\E" + }, { + "pattern":"\\QMETA-INF/services/org.slf4j.spi.SLF4JServiceProvider\\E" + }, { + "pattern":"\\QMETA-INF/spring-autoconfigure-metadata.properties\\E" + }, { + "pattern":"\\QMETA-INF/spring.factories\\E" + }, { + "pattern":"\\QMETA-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports\\E" + }, { + "pattern":"\\Qapplication.properties\\E" + }, { + "pattern":"\\Qcom/alibaba/druid/spring/boot3/autoconfigure/DruidDataSourceAutoConfigure.class\\E" + }, { + "pattern":"\\Qcom/alibaba/druid/spring/boot3/autoconfigure/stat/DruidFilterConfiguration.class\\E" + }, { + "pattern":"\\Qcom/alibaba/druid/spring/boot3/autoconfigure/stat/DruidSpringAopConfiguration.class\\E" + }, { + "pattern":"\\Qcom/alibaba/druid/spring/boot3/autoconfigure/stat/DruidStatViewServletConfiguration.class\\E" + }, { + "pattern":"\\Qcom/alibaba/druid/spring/boot3/autoconfigure/stat/DruidWebStatFilterConfiguration.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/annotation/DS.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/fixture/v3/AddRemoveDatasourceApplication.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/fixture/v3/LoadDatasourceFromJDBCApplication.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/fixture/v3/NestApplication.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/fixture/v3/SPELApplication.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/fixture/v3/\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/fixture/v3/controller/UserController.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/fixture/v3/service/nest/SchoolService.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/fixture/v3/service/nest/StudentService.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/fixture/v3/service/nest/TeacherService.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/fixture/v3/service/spel/UserService.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/spring/boot/autoconfigure/DruidDynamicDataSourceConfiguration.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/spring/boot/autoconfigure/DynamicDataSourceAopConfiguration.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/spring/boot/autoconfigure/DynamicDataSourceAssistConfiguration.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/spring/boot/autoconfigure/DynamicDataSourceAutoConfiguration.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/spring/boot/autoconfigure/DynamicDataSourceCreatorAutoConfiguration$AtomikosDataSourceCreatorConfiguration.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/spring/boot/autoconfigure/DynamicDataSourceCreatorAutoConfiguration$BeeCpDataSourceCreatorConfiguration.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/spring/boot/autoconfigure/DynamicDataSourceCreatorAutoConfiguration$Dbcp2DataSourceCreatorConfiguration.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/spring/boot/autoconfigure/DynamicDataSourceCreatorAutoConfiguration$DruidDataSourceCreatorConfiguration.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/spring/boot/autoconfigure/DynamicDataSourceCreatorAutoConfiguration$HikariDataSourceCreatorConfiguration.class\\E" + }, { + "pattern":"\\Qcom/baomidou/dynamic/datasource/spring/boot/autoconfigure/DynamicDataSourceCreatorAutoConfiguration.class\\E" + }, { + "pattern":"\\Qdb/add-remove-datasource.sql\\E" + }, { + "pattern":"\\Qorg/apache/catalina/core/RestrictedFilters.properties\\E" + }, { + "pattern":"\\Qorg/apache/catalina/core/RestrictedListeners.properties\\E" + }, { + "pattern":"\\Qorg/apache/catalina/core/RestrictedServlets.properties\\E" + }, { + "pattern":"\\Qorg/apache/catalina/util/ServerInfo.properties\\E" + }, { + "pattern":"\\Qorg/h2/util/data.zip\\E" + }, { + "pattern":"\\Qorg/json/JSONObject.class\\E" + }, { + "pattern":"\\Qorg/springframework/aot/hint/annotation/Reflective.class\\E" + }, { + "pattern":"\\Qorg/springframework/beans/factory/Aware.class\\E" + }, { + "pattern":"\\Qorg/springframework/beans/factory/BeanFactoryAware.class\\E" + }, { + "pattern":"\\Qorg/springframework/beans/factory/InitializingBean.class\\E" + }, { + "pattern":"\\Qorg/springframework/beans/factory/config/BeanFactoryPostProcessor.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/SpringBootConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/AbstractDependsOnBeanFactoryPostProcessor.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/AutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/AutoConfigurationImportSelector.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/AutoConfigurationPackage.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/AutoConfigurationPackages$Registrar.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/AutoConfigureAfter.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/AutoConfigureBefore.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/AutoConfigureOrder.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/EnableAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/SpringBootApplication.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/admin/SpringApplicationAdminJmxAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/aop/AopAutoConfiguration$AspectJAutoProxyingConfiguration$CglibAutoProxyConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/aop/AopAutoConfiguration$AspectJAutoProxyingConfiguration$JdkDynamicAutoProxyConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/aop/AopAutoConfiguration$AspectJAutoProxyingConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/aop/AopAutoConfiguration$ClassProxyingConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/aop/AopAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/availability/ApplicationAvailabilityAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/cache/CacheAutoConfiguration$CacheConfigurationImportSelector.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/cache/CacheAutoConfiguration$CacheManagerEntityManagerFactoryDependsOnPostProcessor.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/cache/CacheAutoConfiguration$CacheManagerValidator.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/cache/GenericCacheConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/cache/NoOpCacheConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/cache/SimpleCacheConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/condition/ConditionalOnBean.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/condition/ConditionalOnClass.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/condition/ConditionalOnMissingBean.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/condition/ConditionalOnNotWarDeployment.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/condition/ConditionalOnProperty.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/condition/ConditionalOnSingleCandidate.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/condition/ConditionalOnWebApplication.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/context/ConfigurationPropertiesAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/context/LifecycleAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/context/MessageSourceAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/context/PropertyPlaceholderAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/dao/PersistenceExceptionTranslationAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/http/GsonHttpMessageConvertersConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfiguration$HttpMessageConvertersAutoConfigurationRuntimeHints.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfiguration$NotReactiveWebApplicationCondition$ReactiveWebApplication.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfiguration$NotReactiveWebApplicationCondition.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfiguration$StringHttpMessageConverterConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration$MappingJackson2XmlHttpMessageConverterConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/http/JacksonHttpMessageConvertersConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/http/JsonbHttpMessageConvertersConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/info/ProjectInfoAutoConfiguration$GitResourceAvailableCondition.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/info/ProjectInfoAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration$StandardJackson2ObjectMapperBuilderCustomizer.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$Jackson2ObjectMapperBuilderCustomizerConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonAutoConfigurationRuntimeHints.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonMixinConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperBuilderConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$ParameterNamesModuleConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration$EmbeddedDatabaseCondition.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration$EmbeddedDatabaseConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration$PooledDataSourceAvailableCondition.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration$PooledDataSourceCondition$ExplicitType.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration$PooledDataSourceCondition$PooledDataSourceAvailable.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration$PooledDataSourceCondition.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration$PooledDataSourceConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/DataSourceTransactionManagerAutoConfiguration$JdbcTransactionManagerConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/DataSourceTransactionManagerAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/JdbcTemplateAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/JdbcTemplateConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/JndiDataSourceAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/NamedParameterJdbcTemplateConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/metadata/DataSourcePoolMetadataProvidersConfiguration$CommonsDbcp2PoolDataSourceMetadataProviderConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/metadata/DataSourcePoolMetadataProvidersConfiguration$HikariPoolDataSourceMetadataProviderConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/metadata/DataSourcePoolMetadataProvidersConfiguration$OracleUcpPoolDataSourceMetadataProviderConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/metadata/DataSourcePoolMetadataProvidersConfiguration$TomcatDataSourcePoolMetadataProviderConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jdbc/metadata/DataSourcePoolMetadataProvidersConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/jmx/JmxAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/orm/jpa/EntityManagerFactoryDependsOnPostProcessor.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/sql/init/R2dbcInitializationConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/sql/init/SqlInitializationAutoConfiguration$SqlInitializationModeCondition$ModeIsNever.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/sql/init/SqlInitializationAutoConfiguration$SqlInitializationModeCondition.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/sql/init/SqlInitializationAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/ssl/SslAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/task/TaskExecutionAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/transaction/TransactionAutoConfiguration$EnableTransactionManagementConfiguration$CglibAutoProxyConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/transaction/TransactionAutoConfiguration$EnableTransactionManagementConfiguration$JdkDynamicAutoProxyConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/transaction/TransactionAutoConfiguration$EnableTransactionManagementConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/transaction/TransactionAutoConfiguration$TransactionTemplateConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/transaction/TransactionAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/client/RestTemplateAutoConfiguration$NotReactiveWebApplicationCondition$ReactiveWebApplication.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/client/RestTemplateAutoConfiguration$NotReactiveWebApplicationCondition.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/client/RestTemplateAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/embedded/EmbeddedWebServerFactoryCustomizerAutoConfiguration$JettyWebServerFactoryCustomizerConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/embedded/EmbeddedWebServerFactoryCustomizerAutoConfiguration$NettyWebServerFactoryCustomizerConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/embedded/EmbeddedWebServerFactoryCustomizerAutoConfiguration$TomcatWebServerFactoryCustomizerConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/embedded/EmbeddedWebServerFactoryCustomizerAutoConfiguration$UndertowWebServerFactoryCustomizerConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/embedded/EmbeddedWebServerFactoryCustomizerAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration$DefaultDispatcherServletCondition.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration$DispatcherServletConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration$DispatcherServletRegistrationCondition.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration$DispatcherServletRegistrationConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/DispatcherServletAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/HttpEncodingAutoConfiguration$LocaleCharsetMappingsCustomizer.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/HttpEncodingAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/MultipartAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration$BeanPostProcessorsRegistrar.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration$ForwardedHeaderFilterConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration$ForwardedHeaderFilterCustomizer.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryConfiguration$EmbeddedJetty.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryConfiguration$EmbeddedTomcat.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryConfiguration$EmbeddedUndertow.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$OptionalPathExtensionContentNegotiationStrategy.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$ProblemDetailsErrorHandlingConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$ResourceChainCustomizerConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$ResourceChainResourceHandlerRegistrationCustomizer.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$ResourceHandlerRegistrationCustomizer.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$WelcomePageHandlerMappingFactory.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration$DefaultErrorViewResolverConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration$ErrorPageCustomizer.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration$ErrorTemplateMissingCondition.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration$PreserveErrorControllerTargetClassPostProcessor.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration$StaticView.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/websocket/servlet/WebSocketServletAutoConfiguration$JettyWebSocketConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/websocket/servlet/WebSocketServletAutoConfiguration$TomcatWebSocketConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/websocket/servlet/WebSocketServletAutoConfiguration$UndertowWebSocketConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/autoconfigure/websocket/servlet/WebSocketServletAutoConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/context/annotation/DeterminableImports.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/context/properties/EnableConfigurationProperties.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/context/properties/EnableConfigurationPropertiesRegistrar.class\\E" + }, { + "pattern":"\\Qorg/springframework/boot/sql/init/dependency/DatabaseInitializationDependencyConfigurer.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/ApplicationContextAware.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/ResourceLoaderAware.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/annotation/AdviceModeImportSelector.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/annotation/AspectJAutoProxyRegistrar.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/annotation/AutoProxyRegistrar.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/annotation/ComponentScan.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/annotation/Conditional.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/annotation/Configuration.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/annotation/DeferredImportSelector.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/annotation/EnableAspectJAutoProxy.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/annotation/Import.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/annotation/ImportAware.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/annotation/ImportBeanDefinitionRegistrar.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/annotation/ImportRuntimeHints.class\\E" + }, { + "pattern":"\\Qorg/springframework/context/annotation/Role.class\\E" + }, { + "pattern":"\\Qorg/springframework/core/Ordered.class\\E" + }, { + "pattern":"\\Qorg/springframework/core/annotation/Order.class\\E" + }, { + "pattern":"\\Qorg/springframework/transaction/annotation/AbstractTransactionManagementConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/transaction/annotation/EnableTransactionManagement.class\\E" + }, { + "pattern":"\\Qorg/springframework/transaction/annotation/ProxyTransactionManagementConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/transaction/annotation/TransactionManagementConfigurationSelector.class\\E" + }, { + "pattern":"\\Qorg/springframework/web/bind/annotation/Mapping.class\\E" + }, { + "pattern":"\\Qorg/springframework/web/bind/annotation/RequestMapping.class\\E" + }, { + "pattern":"\\Qorg/springframework/web/bind/annotation/ResponseBody.class\\E" + }, { + "pattern":"\\Qorg/springframework/web/bind/annotation/RestController.class\\E" + }, { + "pattern":"\\Qorg/springframework/web/context/ServletContextAware.class\\E" + }, { + "pattern":"\\Qorg/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class\\E" + }, { + "pattern":"\\Qorg/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport$NoOpValidator.class\\E" + }, { + "pattern":"\\Qorg/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.class\\E" + }, { + "pattern":"\\Qorg/springframework/web/servlet/config/annotation/WebMvcConfigurer.class\\E" + }]}, + "bundles":[] +} diff --git a/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/serialization-config.json b/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/serialization-config.json new file mode 100644 index 00000000..fc967f7f --- /dev/null +++ b/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter/serialization-config.json @@ -0,0 +1,11 @@ +{ + "types":[ + { + "name":"org.junit.platform.launcher.TestIdentifier$SerializedForm" + } + ], + "lambdaCapturingTypes":[ + ], + "proxies":[ + ] +} diff --git a/native-image/access-filter.json b/native-image/access-filter.json new file mode 100644 index 00000000..0d7dc012 --- /dev/null +++ b/native-image/access-filter.json @@ -0,0 +1,7 @@ +{ + "rules": [ + {"includeClasses": "**"} + ], + "regexRules": [ + ] +} diff --git a/native-image/caller-filter.json b/native-image/caller-filter.json new file mode 100644 index 00000000..9d9a9867 --- /dev/null +++ b/native-image/caller-filter.json @@ -0,0 +1,6 @@ +{ + "rules": [ + {"excludeClasses": "**"}, + {"includeClasses": "com.baomidou.dynamic.datasource.**"} + ] +} diff --git a/pom.xml b/pom.xml index fa63d899..48c25118 100644 --- a/pom.xml +++ b/pom.xml @@ -61,6 +61,8 @@ 1.4.2 1.18.28 2.2.220 + 3.9.3 + 1.9.3 3.3.1 3.1.1 @@ -73,6 +75,7 @@ 4.2 3.1.0 1.6.13 + 0.9.25 @@ -99,11 +102,6 @@ pom import - - org.springframework.boot - spring-boot-starter-web - ${spring-boot-dependencies.version} - com.baomidou mybatis-plus @@ -130,9 +128,9 @@ ${druid.version} - org.springframework.boot - spring-boot-starter-jta-atomikos - ${spring-boot-dependencies.version} + com.atomikos + transactions-jdbc + ${atomikos.version} com.github.chris2018998 @@ -150,11 +148,6 @@ commons-dbcp2 ${commons-dbcp2.version} - - org.springframework.boot - spring-boot-configuration-processor - ${spring-boot-dependencies.version} - p6spy p6spy @@ -360,6 +353,142 @@ + + generateMetadata + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + 17 + 17 + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + com.baomidou.dynamic.datasource.fixture.v1.** + + --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED + + + + org.graalvm.buildtools + native-maven-plugin + ${native-maven-plugin.version} + true + + + build-native + + compile-no-fork + + package + + + test-native + + test + + test + + + + + true + Direct + + + config-output-dir=${project.basedir}/src/test/resources/META-INF/native-image/${project.groupId}/${project.artifactId} + + + + ${user.dir}/native-image/caller-filter.json + + + ${user.dir}/native-image/access-filter.json + + + + + + + + + + nativeTestInSpringBoot + + + org.junit.platform + junit-platform-launcher + ${junit-platform-launcher.version} + test + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + 17 + 17 + + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + com.baomidou.dynamic.datasource.fixture.v3.** + + + com.baomidou.dynamic.datasource.fixture.v1.** + + --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED + + + + org.springframework.boot + spring-boot-maven-plugin + + + process-test-aot + + process-test-aot + + + + + + org.graalvm.buildtools + native-maven-plugin + true + + ${project.build.outputDirectory} + + true + + + + + native-test + + test + + + + + + +