Skip to content

Commit

Permalink
fix: resolved issue with embedded wiremock module autoconfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
Volchkov Andrey authored and wolfchkov committed Sep 25, 2023
1 parent 55a74c3 commit 74ba3cf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.MapPropertySource;
import org.testcontainers.containers.GenericContainer;
Expand All @@ -21,10 +20,8 @@
import java.util.Optional;

import static com.playtika.testcontainer.common.utils.ContainerUtils.configureCommonsAndStart;
import static org.springframework.core.Ordered.HIGHEST_PRECEDENCE;

@Slf4j
@Order(HIGHEST_PRECEDENCE)
@Configuration
@ConditionalOnExpression("${embedded.containers.enabled:true}")
@AutoConfigureAfter(DockerPresenceBootstrapConfiguration.class)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.playtika.testcontainers.wiremock;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;

@Slf4j
@AutoConfiguration
@AutoConfigureOrder
@ConditionalOnExpression("${embedded.containers.enabled:true}")
@ConditionalOnProperty(value = "embedded.wiremock.enabled", matchIfMissing = true)
public class EmbeddedWiremockDependenciesAutoConfiguration {

}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
com.playtika.testcontainers.wiremock.EmbeddedWiremockBootstrapConfiguration
com.playtika.testcontainers.wiremock.EmbeddedWiremockDependenciesAutoConfiguration

0 comments on commit 74ba3cf

Please sign in to comment.