-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#4 Fix configuration problem when
SPRING_SLEUTH_ENABLED=false
- Loading branch information
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...sleuthintegration/consumer/TramSpringCloudSleuthIntegrationConsumerAutoConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
package io.eventuate.tram.spring.cloudsleuthintegration.consumer; | ||
|
||
import io.eventuate.tram.consumer.common.MessageHandlerDecorator; | ||
import org.springframework.boot.autoconfigure.AutoConfigureAfter; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.cloud.sleuth.autoconfig.brave.BraveAutoConfiguration; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Import; | ||
|
||
@Configuration | ||
@Import(TramSpringCloudSleuthIntegrationConsumerConfiguration.class) | ||
@ConditionalOnClass(MessageHandlerDecorator.class) | ||
@AutoConfigureAfter(BraveAutoConfiguration.class) | ||
@ConditionalOnProperty(value = "spring.sleuth.enabled", matchIfMissing = true) | ||
public class TramSpringCloudSleuthIntegrationConsumerAutoConfiguration { | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
...mSpringCloudSleuthIntegrationSqlTableBasedDuplicatorMessageDetectorAutoConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
package io.eventuate.tram.spring.cloudsleuthintegration.consumer; | ||
|
||
import io.eventuate.tram.consumer.jdbc.SqlTableBasedDuplicateMessageDetector; | ||
import org.springframework.boot.autoconfigure.AutoConfigureAfter; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.cloud.sleuth.autoconfig.brave.BraveAutoConfiguration; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Import; | ||
|
||
@Configuration | ||
@ConditionalOnClass(SqlTableBasedDuplicateMessageDetector.class) | ||
@Import(TramSpringCloudSleuthIntegrationSqlTableBasedDuplicatorMessageDetectorConfiguration.class) | ||
@AutoConfigureAfter(BraveAutoConfiguration.class) | ||
@ConditionalOnProperty(value = "spring.sleuth.enabled", matchIfMissing = true) | ||
public class TramSpringCloudSleuthIntegrationSqlTableBasedDuplicatorMessageDetectorAutoConfiguration { | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
...sleuthintegration/producer/TramSpringCloudSleuthIntegrationProducerAutoConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
package io.eventuate.tram.spring.cloudsleuthintegration.producer; | ||
|
||
import io.eventuate.tram.messaging.producer.common.MessageProducerImplementation; | ||
import org.springframework.boot.autoconfigure.AutoConfigureAfter; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.cloud.sleuth.autoconfig.brave.BraveAutoConfiguration; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Import; | ||
|
||
@Configuration | ||
@Import(TramSpringCloudSleuthIntegrationProducerConfiguration.class) | ||
@ConditionalOnClass(MessageProducerImplementation.class) | ||
@AutoConfigureAfter(BraveAutoConfiguration.class) | ||
@ConditionalOnProperty(value = "spring.sleuth.enabled", matchIfMissing = true) | ||
public class TramSpringCloudSleuthIntegrationProducerAutoConfiguration { | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
...tram/spring/cloudsleuthintegration/test/SpringCloudSleuthWhenDisabledIntegrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package io.eventuate.tram.spring.cloudsleuthintegration.test; | ||
|
||
import io.eventuate.tram.spring.inmemory.TramInMemoryConfiguration; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Import; | ||
|
||
@SpringBootTest(classes= SpringCloudSleuthWhenDisabledIntegrationTest.TestConfiguration.class, webEnvironment = SpringBootTest | ||
.WebEnvironment.NONE, properties = "spring.sleuth.enabled=false") | ||
public class SpringCloudSleuthWhenDisabledIntegrationTest { | ||
|
||
|
||
@Configuration | ||
@EnableAutoConfiguration | ||
@Import(TramInMemoryConfiguration.class) | ||
static class TestConfiguration { | ||
} | ||
|
||
|
||
@Test | ||
public void applicationContextShouldLoad() { | ||
} | ||
|
||
|
||
|
||
} |