Skip to content

Commit

Permalink
chore(update): Bring spring-boot example up to speed with Spring Boot…
Browse files Browse the repository at this point in the history
… 3.2 and unleash-client 9.1.1
  • Loading branch information
chriswk committed Nov 24, 2023
1 parent db65acb commit 37c49b8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions examples/spring-boot-example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
plugins {
java
id("org.springframework.boot") version "3.0.0"
id("io.spring.dependency-management") version "1.1.0"
id("org.springframework.boot") version "3.2.0"
id("io.spring.dependency-management") version "1.1.4"
}

repositories {
mavenLocal()
mavenCentral()
}

dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("io.getunleash:unleash-client-java:8.2.0")
implementation("io.getunleash:unleash-client-java:9.1.1")
testImplementation("org.springframework.boot:spring-boot-starter-test")
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.getunleash.unleash.example;


import io.getunleash.DefaultUnleash;
import io.getunleash.Unleash;
import io.getunleash.util.UnleashConfig;
Expand All @@ -12,9 +11,11 @@
public class UnleashSpringConfig {

@Bean
public UnleashConfig unleashConfig(@Value("${unleash.url}") String url, @Value("${unleash.apikey}") String apiKey, @Value("${unleash.appname}") String appName) {
public UnleashConfig unleashConfig(@Value("${unleash.url}") String url, @Value("${unleash.apikey}") String apiKey,
@Value("${unleash.appname}") String appName) {
UnleashConfig config = UnleashConfig.builder().unleashAPI(url).apiKey(apiKey).appName(appName)
.fetchTogglesInterval(15).build();
.synchronousFetchOnInitialisation(true)
.fetchTogglesInterval(15).build();
return config;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
unleash:
url: https://app.unleash-hosted.com/demo/api
url: https://app.unleash-hosted.com/demo/api12312312
apiKey: demo-app:production.614a75cf68bef8703aa1bd8304938a81ec871f86ea40c975468eabd6
appname: "Java-Spring-Boot-example"

0 comments on commit 37c49b8

Please sign in to comment.