This file contains hidden or 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
import lombok.Data; | |
import org.springframework.boot.context.properties.ConfigurationProperties; | |
import org.springframework.cloud.context.config.annotation.RefreshScope; | |
import org.springframework.stereotype.Component; | |
@Component | |
@Data | |
@ConfigurationProperties(prefix = "dispatcher.cargo.selector") | |
@RefreshScope | |
public class DispatcherCargoSelectorConfigServerProperties { |
This file contains hidden or 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
spring.application.name= dispatcherapi | |
spring.cloud.config.uri= https://{DELIVERY_CONFIG_SERVER_URL} | |
spring.cloud.bus.id= dispatcherapi:prod |
This file contains hidden or 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
<dependencies> | |
<dependency> | |
<groupId>org.springframework.cloud</groupId> | |
<artifactId>spring-cloud-starter-bus-amqp</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>org.springframework.cloud</groupId> | |
<artifactId>spring-cloud-starter-config</artifactId> | |
</dependency> | |
</dependencies> |
This file contains hidden or 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
<dependencies> | |
<dependency> | |
<groupId>org.springframework.cloud</groupId> | |
<artifactId>spring-cloud-config-server</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>org.springframework.cloud</groupId> | |
<artifactId>spring-cloud-config-monitor</artifactId> | |
</dependency> | |
<dependency> |
This file contains hidden or 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
import com.trendyol.deliveryconfigserver.model.TrendyolBitbucketResponse; | |
import org.springframework.boot.web.client.RestTemplateBuilder; | |
import org.springframework.web.client.RestTemplate; | |
import org.springframework.cloud.config.monitor.PropertyPathNotification; | |
import org.springframework.cloud.config.monitor.PropertyPathNotificationExtractor; | |
import org.springframework.beans.factory.annotation.*; | |
import org.springframework.core.*; | |
import org.springframework.util.*; | |
import java.util.*; |
This file contains hidden or 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
import lombok.Data; | |
@Data | |
public class TrendyolBitbucketResponse { | |
private Diff[] diffs; | |
@Data | |
public static class Diff { | |
private ChangeSet source; | |
private ChangeSet destination; |
This file contains hidden or 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
import com.trendyol.deliveryconfigserver.extractor.CustomBitbucketPropertyPathNotificationExtractor; | |
import org.springframework.cloud.config.monitor.PropertyPathNotificationExtractor; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
@Configuration | |
public class ExtractorConfiguration { | |
@Bean | |
public PropertyPathNotificationExtractor trendyolBitbucketPathExtractor() { | |
return new CustomBitbucketPropertyPathNotificationExtractor(); |
This file contains hidden or 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
spring.cloud.bus.enabled=true | |
spring.cloud.config.server.health.enabled=false | |
spring.cloud.config.server.monitor.bitbucket.enabled=false | |
spring.cloud.config.server.monitor.gitee.enabled=false | |
spring.cloud.config.server.monitor.gitlab.enabled=false | |
spring.cloud.config.server.monitor.github.enabled=false | |
spring.cloud.config.server.monitor.gogs.enabled=false | |
spring.cloud.config.server.monitor.gitea.enabled=false |
This file contains hidden or 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
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.cloud.config.server.EnableConfigServer; | |
@EnableConfigServer | |
@SpringBootApplication | |
public class DeliveryConfigServerApplication { | |
public static void main(String[] args) { | |
SpringApplication.run(DeliveryConfigServerApplication.class, args); | |
} |