diff --git a/build.gradle b/build.gradle index a861c17934c..da6cea26a67 100644 --- a/build.gradle +++ b/build.gradle @@ -371,6 +371,7 @@ tasks.register("writeVersionToExamples") { include(name: 'examples/spring-otel/build.gradle') include(name: 'examples/spring-datadog/build.gradle') include(name: 'examples/spring-datadog-statsd/build.gradle') + include(name: 'examples/spring-dynatrace-oneagent/build.gradle') } } ant.replaceregexp(match: '.+', replace: "${globalVersion}", flags:'g', byline:true) { diff --git a/examples/spring-newrelic/build.gradle b/examples/spring-newrelic/build.gradle index 0365d2dc2a5..0ec07c81533 100644 --- a/examples/spring-newrelic/build.gradle +++ b/examples/spring-newrelic/build.gradle @@ -1,6 +1,6 @@ plugins { id 'java' - id 'org.springframework.boot' version '3.0.4' + id 'org.springframework.boot' version '3.4.0' id 'io.spring.dependency-management' version '1.1.0' id "de.undercouch.download" version "5.3.0" } @@ -21,8 +21,8 @@ repositories { ext { versions = [ - commercetools: "17.19.0", - newrelic: "8.0.1" + commercetools: "17.20.0", + newrelic: "8.16.0" ] } diff --git a/examples/spring-newrelic/gradle/wrapper/gradle-wrapper.properties b/examples/spring-newrelic/gradle/wrapper/gradle-wrapper.properties index 774fae87671..81aa1c0448a 100644 --- a/examples/spring-newrelic/gradle/wrapper/gradle-wrapper.properties +++ b/examples/spring-newrelic/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/examples/spring-newrelic/src/main/java/com/commercetools/sdk/examples/springmvc/service/CtpClientBeanService.java b/examples/spring-newrelic/src/main/java/com/commercetools/sdk/examples/springmvc/service/CtpClientBeanService.java index 10d631ea8ef..f73cd58db5e 100644 --- a/examples/spring-newrelic/src/main/java/com/commercetools/sdk/examples/springmvc/service/CtpClientBeanService.java +++ b/examples/spring-newrelic/src/main/java/com/commercetools/sdk/examples/springmvc/service/CtpClientBeanService.java @@ -46,7 +46,6 @@ public ApiHttpClient client() { } @Bean - @RequestScope @Trace(dispatcher = true) public ProjectScopedApiRoot apiRoot(ApiHttpClient client) { ContextApiHttpClient contextClient = ContextApiHttpClient.of(client, new MDCContext(), false) diff --git a/examples/spring-newrelic/src/main/java/com/commercetools/sdk/examples/springmvc/web/AppController.java b/examples/spring-newrelic/src/main/java/com/commercetools/sdk/examples/springmvc/web/AppController.java index fca6fa394c4..51433bc0752 100644 --- a/examples/spring-newrelic/src/main/java/com/commercetools/sdk/examples/springmvc/web/AppController.java +++ b/examples/spring-newrelic/src/main/java/com/commercetools/sdk/examples/springmvc/web/AppController.java @@ -45,10 +45,10 @@ public String pop(Model model, HttpSession session) throws ExecutionException, I } @GetMapping("/cart") - public String cart(Model model, HttpSession session) { + public String cart(Model model, HttpSession session) throws ExecutionException, InterruptedException { final CompletableFuture cart = new CartRepository(apiRoot, session).meCart(); - model.addAttribute("cart", cart); + model.addAttribute("cart", cart.get()); return "mycart/index"; } diff --git a/examples/spring-newrelic/src/test/java/com/commercetools/sdk/examples/springmvc/SpringmvcApplicationTests.java b/examples/spring-newrelic/src/test/java/com/commercetools/sdk/examples/springmvc/SpringmvcApplicationTests.java deleted file mode 100644 index 471369f2b7f..00000000000 --- a/examples/spring-newrelic/src/test/java/com/commercetools/sdk/examples/springmvc/SpringmvcApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.commercetools.sdk.examples.springmvc; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class SpringmvcApplicationTests { - - @Test - void contextLoads() { - } - -}