diff --git a/ffc-java-springboot/src/main/java/co/featureflags/spring/FFCClientConfigProperties.java b/ffc-java-springboot/src/main/java/co/featureflags/spring/FFCClientConfigProperties.java index f526ba4..31948ee 100644 --- a/ffc-java-springboot/src/main/java/co/featureflags/spring/FFCClientConfigProperties.java +++ b/ffc-java-springboot/src/main/java/co/featureflags/spring/FFCClientConfigProperties.java @@ -10,9 +10,9 @@ public class FFCClientConfigProperties { private int startWait = 15; - private String streamUri = "wss://api.feature-flags.co"; + private String streamUri; - private String eventUri = "https://api.feature-flags.co"; + private String eventUri; private String proxyHost; diff --git a/ffc-java-springboot/src/main/java/co/featureflags/spring/FFCClientConfiguration.java b/ffc-java-springboot/src/main/java/co/featureflags/spring/FFCClientConfiguration.java index dcfd939..b759537 100644 --- a/ffc-java-springboot/src/main/java/co/featureflags/spring/FFCClientConfiguration.java +++ b/ffc-java-springboot/src/main/java/co/featureflags/spring/FFCClientConfiguration.java @@ -8,6 +8,7 @@ import co.featureflags.server.exterior.FFCClient; import co.featureflags.server.exterior.HttpConfigurationBuilder; import org.apache.commons.codec.binary.Base64; +import org.apache.commons.lang3.StringUtils; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -23,25 +24,34 @@ public class FFCClientConfiguration { @Bean public FFCClient ffcClient(FFCClientConfigProperties properties) { checkArgument(Base64.isBase64(properties.getEnvSecret()), "envSecret is invalid"); - HttpConfigurationBuilder builder = Factory.httpConfigFactory(); + HttpConfigurationBuilder httpConfigFactory = Factory.httpConfigFactory(); if (properties.getProxyHost() != null && properties.getProxyPort() > 0) { - builder.httpProxy(properties.getProxyHost(), properties.getProxyPort()); + httpConfigFactory.httpProxy(properties.getProxyHost(), properties.getProxyPort()); if (properties.getProxyUser() != null && properties.getProxyPassword() != null) { - builder.passwordAuthenticator(properties.getProxyUser(), properties.getProxyPassword()); + httpConfigFactory.passwordAuthenticator(properties.getProxyUser(), properties.getProxyPassword()); } } - StreamingBuilder streamingBuilder = Factory.streamingBuilder() - .newStreamingURI(properties.getStreamUri()); - InsightProcessorBuilder insightProcessorBuilder = Factory.insightProcessorFactory() - .eventUri(properties.getEventUri()); - FFCConfig config = new FFCConfig.Builder() + String streamUri = properties.getStreamUri(); + StreamingBuilder streamingBuilder = + StringUtils.isBlank(streamUri) ? null : Factory.streamingBuilder().newStreamingURI(streamUri); + + String eventUri = properties.getEventUri(); + InsightProcessorBuilder insightProcessorBuilder = + StringUtils.isBlank(eventUri) ? null : Factory.insightProcessorFactory().eventUri(eventUri); + + FFCConfig.Builder builder = new FFCConfig.Builder() .offline(properties.isOffline()) .startWaitTime(Duration.ofSeconds(properties.getStartWait())) - .httpConfigFactory(builder) - .updateProcessorFactory(streamingBuilder) - .insightProcessorFactory(insightProcessorBuilder) - .build(); - return new FFCClientImp(properties.getEnvSecret(), config); + .httpConfigFactory(httpConfigFactory); + + if (streamingBuilder != null) { + builder.updateProcessorFactory(streamingBuilder); + } + + if (insightProcessorBuilder != null) { + builder.insightProcessorFactory(insightProcessorBuilder); + } + return new FFCClientImp(properties.getEnvSecret(), builder.build()); } } diff --git a/maven-repo/co/featureflags/ffc-java-springboot-parent/maven-metadata.xml b/maven-repo/co/featureflags/ffc-java-springboot-parent/maven-metadata.xml index dcc863b..65f30d7 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot-parent/maven-metadata.xml +++ b/maven-repo/co/featureflags/ffc-java-springboot-parent/maven-metadata.xml @@ -9,6 +9,6 @@ 1.0 1.1 - 20220504030153 + 20220504203900 diff --git a/maven-repo/co/featureflags/ffc-java-springboot-parent/maven-metadata.xml.md5 b/maven-repo/co/featureflags/ffc-java-springboot-parent/maven-metadata.xml.md5 index 4fb4f5b..37eef24 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot-parent/maven-metadata.xml.md5 +++ b/maven-repo/co/featureflags/ffc-java-springboot-parent/maven-metadata.xml.md5 @@ -1 +1 @@ -f70c4276b224f28d4ab8cb9abbfae581 \ No newline at end of file +3e6df89b227a30b1fdf0956a8a68e82a \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot-parent/maven-metadata.xml.sha1 b/maven-repo/co/featureflags/ffc-java-springboot-parent/maven-metadata.xml.sha1 index 90413e3..23dc7af 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot-parent/maven-metadata.xml.sha1 +++ b/maven-repo/co/featureflags/ffc-java-springboot-parent/maven-metadata.xml.sha1 @@ -1 +1 @@ -4295e3255ec78c7e446c96f791a41b05796b598b \ No newline at end of file +1d60cfcddbad34dc9480ba02faaaccc268fe6ae2 \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-javadoc.jar b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-javadoc.jar index 57fa608..87d6c1f 100644 Binary files a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-javadoc.jar and b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-javadoc.jar differ diff --git a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-javadoc.jar.md5 b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-javadoc.jar.md5 index f8c27b1..45d6a61 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-javadoc.jar.md5 +++ b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-javadoc.jar.md5 @@ -1 +1 @@ -171598ee5cd366e44127011109e78fd8 \ No newline at end of file +2adf24b1cba9a6654d679fef156d23f3 \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-javadoc.jar.sha1 b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-javadoc.jar.sha1 index 129be03..b777414 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-javadoc.jar.sha1 +++ b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-javadoc.jar.sha1 @@ -1 +1 @@ -aff1fa5ecbffd7a5c38a935dc60802c92380d4ab \ No newline at end of file +2667e9747d1da7fff049495d309b3aac91840447 \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-sources.jar b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-sources.jar index 4beb44e..3c928a5 100644 Binary files a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-sources.jar and b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-sources.jar differ diff --git a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-sources.jar.md5 b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-sources.jar.md5 index 3c2873e..52a9c4a 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-sources.jar.md5 +++ b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-sources.jar.md5 @@ -1 +1 @@ -8a83947a1aa7ba781f4f99c12b770cd5 \ No newline at end of file +63ffbf969d5ab3874025c48e50ceb930 \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-sources.jar.sha1 b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-sources.jar.sha1 index f9854d0..9ee71e9 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-sources.jar.sha1 +++ b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1-sources.jar.sha1 @@ -1 +1 @@ -cd1d571eb900490027bc78df3d46ba6805946758 \ No newline at end of file +90c2f3d4d9f157b7b241adc9bb96f613575179c8 \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1.jar b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1.jar index 583f66b..286122a 100644 Binary files a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1.jar and b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1.jar differ diff --git a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1.jar.md5 b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1.jar.md5 index 7150066..ec8a0bf 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1.jar.md5 +++ b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1.jar.md5 @@ -1 +1 @@ -cf67236151ef53fab2eb44b112645e30 \ No newline at end of file +c230919ca03de657a9cc4a42b4eeacb0 \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1.jar.sha1 b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1.jar.sha1 index 986b12a..c9899e5 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1.jar.sha1 +++ b/maven-repo/co/featureflags/ffc-java-springboot-web/1.1/ffc-java-springboot-web-1.1.jar.sha1 @@ -1 +1 @@ -2d7d3a20cde27367a7e54eae2b614bf6f371574e \ No newline at end of file +40c4fe0bd732cd76806f94430729addc4550e25a \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot-web/maven-metadata.xml b/maven-repo/co/featureflags/ffc-java-springboot-web/maven-metadata.xml index 7199a49..5733869 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot-web/maven-metadata.xml +++ b/maven-repo/co/featureflags/ffc-java-springboot-web/maven-metadata.xml @@ -9,6 +9,6 @@ 1.0 1.1 - 20220504030156 + 20220504203903 diff --git a/maven-repo/co/featureflags/ffc-java-springboot-web/maven-metadata.xml.md5 b/maven-repo/co/featureflags/ffc-java-springboot-web/maven-metadata.xml.md5 index fb903e5..6eb98fd 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot-web/maven-metadata.xml.md5 +++ b/maven-repo/co/featureflags/ffc-java-springboot-web/maven-metadata.xml.md5 @@ -1 +1 @@ -03fdc6ac4ddd2d9969f032dad9afc237 \ No newline at end of file +c3a891a9bf167f3124e50b01d4f6899e \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot-web/maven-metadata.xml.sha1 b/maven-repo/co/featureflags/ffc-java-springboot-web/maven-metadata.xml.sha1 index a521d63..ea00816 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot-web/maven-metadata.xml.sha1 +++ b/maven-repo/co/featureflags/ffc-java-springboot-web/maven-metadata.xml.sha1 @@ -1 +1 @@ -a32dae5bfbcb52780ed8be07387da1dbb527d229 \ No newline at end of file +c2a53f4a07be2830596755d021290fa5a78abd18 \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-javadoc.jar b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-javadoc.jar index 344663f..8bf19e8 100644 Binary files a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-javadoc.jar and b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-javadoc.jar differ diff --git a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-javadoc.jar.md5 b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-javadoc.jar.md5 index 9e68467..dc6751a 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-javadoc.jar.md5 +++ b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-javadoc.jar.md5 @@ -1 +1 @@ -062c0ab790f6e9735fc39d821789f191 \ No newline at end of file +ee66a30357bd125b7fedea3ad6a17bc8 \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-javadoc.jar.sha1 b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-javadoc.jar.sha1 index 57ea6b6..3311912 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-javadoc.jar.sha1 +++ b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-javadoc.jar.sha1 @@ -1 +1 @@ -c72027d23d3afd3133ff2a8edb84b678a05b703f \ No newline at end of file +522bf7df1ccba7d6fbaa8365976e24f734783367 \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-sources.jar b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-sources.jar index 52c3885..76c7e9b 100644 Binary files a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-sources.jar and b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-sources.jar differ diff --git a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-sources.jar.md5 b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-sources.jar.md5 index c6d8b07..611cb80 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-sources.jar.md5 +++ b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-sources.jar.md5 @@ -1 +1 @@ -a2662957e4e2c5fb318b14e9d911c791 \ No newline at end of file +f6b677fdde64256a2951bf865d593d35 \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-sources.jar.sha1 b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-sources.jar.sha1 index 7742a4c..72e32fc 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-sources.jar.sha1 +++ b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1-sources.jar.sha1 @@ -1 +1 @@ -66a59633f6c7f3e92fbf780631414d2b0b2ac76c \ No newline at end of file +b8b23eef82c4dacdd933e0bfc46246fc11ffca29 \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1.jar b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1.jar index 742a830..9027f12 100644 Binary files a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1.jar and b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1.jar differ diff --git a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1.jar.md5 b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1.jar.md5 index 4b8f15f..519617c 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1.jar.md5 +++ b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1.jar.md5 @@ -1 +1 @@ -331802dc8181160b70f81fb4a2119d16 \ No newline at end of file +762fabd44a73f090de73dad267c18e7c \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1.jar.sha1 b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1.jar.sha1 index edf01a3..7e2667f 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1.jar.sha1 +++ b/maven-repo/co/featureflags/ffc-java-springboot/1.1/ffc-java-springboot-1.1.jar.sha1 @@ -1 +1 @@ -e6509a2a53fcd87524bb8eacaf134e0ed1a2d1de \ No newline at end of file +7bcc4204322d72572e455777a4bf6f18c8af171b \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot/maven-metadata.xml b/maven-repo/co/featureflags/ffc-java-springboot/maven-metadata.xml index 4b9a2be..f0a0927 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot/maven-metadata.xml +++ b/maven-repo/co/featureflags/ffc-java-springboot/maven-metadata.xml @@ -9,6 +9,6 @@ 1.0 1.1 - 20220504030155 + 20220504203902 diff --git a/maven-repo/co/featureflags/ffc-java-springboot/maven-metadata.xml.md5 b/maven-repo/co/featureflags/ffc-java-springboot/maven-metadata.xml.md5 index 74f84ec..6636f34 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot/maven-metadata.xml.md5 +++ b/maven-repo/co/featureflags/ffc-java-springboot/maven-metadata.xml.md5 @@ -1 +1 @@ -fe9928113f54bfad1d907ba969701695 \ No newline at end of file +86cab12878a7f7b971c36979631afad3 \ No newline at end of file diff --git a/maven-repo/co/featureflags/ffc-java-springboot/maven-metadata.xml.sha1 b/maven-repo/co/featureflags/ffc-java-springboot/maven-metadata.xml.sha1 index 7d19228..6597adb 100644 --- a/maven-repo/co/featureflags/ffc-java-springboot/maven-metadata.xml.sha1 +++ b/maven-repo/co/featureflags/ffc-java-springboot/maven-metadata.xml.sha1 @@ -1 +1 @@ -abc97df308470038dead090b6115622017fb905a \ No newline at end of file +4148dbe324d1a3961ed0cc8539a7fd7a7e41c922 \ No newline at end of file