From bbaf4258208dde6f86afebb981461a5f592fd4ca Mon Sep 17 00:00:00 2001 From: Hank CP Date: Sun, 29 Jan 2023 20:42:44 +0800 Subject: [PATCH] Separator flyway dependency --- demo-app/build.gradle | 1 + sbp-flyway-spring-boot-starter/build.gradle | 15 +++++++++++++++ .../boot/FlywayClassLoaderConfiguration.java | 0 .../src/main/resources/META-INF/spring.factories | 3 +++ .../src/main/resources/META-INF/spring.factories | 3 +-- settings.gradle | 1 + 6 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 sbp-flyway-spring-boot-starter/build.gradle rename {sbp-spring-boot-starter => sbp-flyway-spring-boot-starter}/src/main/java/org/laxture/sbp/spring/boot/FlywayClassLoaderConfiguration.java (100%) create mode 100644 sbp-flyway-spring-boot-starter/src/main/resources/META-INF/spring.factories diff --git a/demo-app/build.gradle b/demo-app/build.gradle index 057e6a7..12b118d 100644 --- a/demo-app/build.gradle +++ b/demo-app/build.gradle @@ -1,5 +1,6 @@ dependencies { implementation project(':sbp-spring-boot-starter') + implementation project(':sbp-flyway-spring-boot-starter') implementation project(':demo-shared') implementation project(':demo-api') implementation project(':demo-security') diff --git a/sbp-flyway-spring-boot-starter/build.gradle b/sbp-flyway-spring-boot-starter/build.gradle new file mode 100644 index 0000000..bc30dc8 --- /dev/null +++ b/sbp-flyway-spring-boot-starter/build.gradle @@ -0,0 +1,15 @@ +plugins { + id 'java-library' + id 'maven-publish' +} + +group = 'org.laxture.sbp' + +dependencies { + api project(':sbp-core') + + implementation "org.springframework.boot:spring-boot-autoconfigure" + implementation 'org.flywaydb:flyway-core' + + annotationProcessor "org.springframework.boot:spring-boot-autoconfigure-processor" +} \ No newline at end of file diff --git a/sbp-spring-boot-starter/src/main/java/org/laxture/sbp/spring/boot/FlywayClassLoaderConfiguration.java b/sbp-flyway-spring-boot-starter/src/main/java/org/laxture/sbp/spring/boot/FlywayClassLoaderConfiguration.java similarity index 100% rename from sbp-spring-boot-starter/src/main/java/org/laxture/sbp/spring/boot/FlywayClassLoaderConfiguration.java rename to sbp-flyway-spring-boot-starter/src/main/java/org/laxture/sbp/spring/boot/FlywayClassLoaderConfiguration.java diff --git a/sbp-flyway-spring-boot-starter/src/main/resources/META-INF/spring.factories b/sbp-flyway-spring-boot-starter/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..b58f22d --- /dev/null +++ b/sbp-flyway-spring-boot-starter/src/main/resources/META-INF/spring.factories @@ -0,0 +1,3 @@ +# Auto Configure +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + org.laxture.sbp.spring.boot.FlywayClassLoaderConfiguration \ No newline at end of file diff --git a/sbp-spring-boot-starter/src/main/resources/META-INF/spring.factories b/sbp-spring-boot-starter/src/main/resources/META-INF/spring.factories index 671a976..a96b6b4 100644 --- a/sbp-spring-boot-starter/src/main/resources/META-INF/spring.factories +++ b/sbp-spring-boot-starter/src/main/resources/META-INF/spring.factories @@ -2,5 +2,4 @@ org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ org.laxture.sbp.spring.boot.SbpAutoConfiguration,\ org.laxture.sbp.spring.boot.SbpWebMvcPatchAutoConfiguration,\ - org.laxture.sbp.spring.boot.SbpWebFluxPatchAutoConfiguration,\ - org.laxture.sbp.spring.boot.FlywayClassLoaderConfiguration \ No newline at end of file + org.laxture.sbp.spring.boot.SbpWebFluxPatchAutoConfiguration \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index e367a84..cd69293 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,6 +2,7 @@ include 'sbp-core', 'sbp-spring-boot-starter', VersionNumber.parse("${springBootVersion}") >= VersionNumber.parse("2.5") ? 'sbp-adapter-2.5' : 'sbp-adapter-2', + 'sbp-flyway-spring-boot-starter', 'demo-shared', 'demo-security',