8000 chore: upgrade spring-boot-sample to unleash 10 by gastonfournier · Pull Request #304 · Unleash/unleash-client-java · GitHub
[go: up one dir, main page]

Skip to content

chore: upgrade spring-boot-sample to unleash 10 #304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/spring-boot-example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories {

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.getunleash.unleash.example;

import io.getunleash.Unleash;
import jakarta.websocket.server.PathParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -33,7 +33,7 @@ public Map<String, Boolean> getAllToggles() {
}

@GetMapping("/toggle/{toggleName}")
public Boolean getToggle(@PathParam("toggleName") String name) {
public Boolean getToggle(@PathVariable("toggleName") String name) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct way of getting the path variable

return unleash.isEnabled(name);
}

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
apiKey: demo-app:production.614a75cf68bef8703aa1bd8304938a81ec871f86ea40c975468eabd6
apiKey: "*:development.25a06b75248528f8ca93ce179dcdd141aedfb632231e0d21fd8ff349"
appname: "Java-Spring-Boot-example"
Loading
0