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',