From d3698840c39e84955d59ff660852b50cbe7c1307 Mon Sep 17 00:00:00 2001 From: Artem Sidorkin Date: Thu, 27 May 2021 21:30:43 +0300 Subject: [PATCH] #16: Define a CommonSwaggerAutoConfigure @Configuration class that's @ConditionalOnBean(EventuateSwaggerConfig) --- .../util/spring/swagger/CommonSwaggerConfiguration.java | 2 ++ gradle.properties | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/eventuate-util-spring-swagger/src/main/java/io/eventuate/util/spring/swagger/CommonSwaggerConfiguration.java b/eventuate-util-spring-swagger/src/main/java/io/eventuate/util/spring/swagger/CommonSwaggerConfiguration.java index 58882c1..545638c 100644 --- a/eventuate-util-spring-swagger/src/main/java/io/eventuate/util/spring/swagger/CommonSwaggerConfiguration.java +++ b/eventuate-util-spring-swagger/src/main/java/io/eventuate/util/spring/swagger/CommonSwaggerConfiguration.java @@ -1,6 +1,7 @@ package io.eventuate.util.spring.swagger; import com.fasterxml.classmate.TypeResolver; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.ResponseEntity; @@ -11,6 +12,7 @@ @Configuration @EnableSwagger2 +@ConditionalOnBean(EventuateSwaggerConfig.class) public class CommonSwaggerConfiguration { @Bean diff --git a/gradle.properties b/gradle.properties index 81533b7..24b2bdf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,4 +4,4 @@ eventuateMavenRepoUrl=file:///Users/cer/.m2/testdeploy,https://dl.bintray.com/ev springBootVersion=2.2.6.RELEASE swaggerUiVersion=3.17.1 eventuatePluginsGradleVersion=0.8.0.RELEASE -version=0.12.0-SNAPSHOT +version=0.13.0-SNAPSHOT