diff --git a/11-quickstart/Dockerfile b/11-quickstart/Dockerfile index d68a30d8e3..0bdf435008 100644 --- a/11-quickstart/Dockerfile +++ b/11-quickstart/Dockerfile @@ -1,5 +1,5 @@ # This is the demo Dockerfile for the generated template project, please change accordingly before building image from it. -# Run the following command to build image: docker build -f ./Dockerfile --build-arg APP_FILE=demo-0.0.1-SNAPSHOT.jar -t demo:latest . +# Run the following command to build image: docker build -f ./Dockerfile --build-arg APP_FILE=quickstart-service--0.0.1-SNAPSHOT.jar -t demo:latest . FROM openjdk:17-jdk-alpine # Set the working directory to /build @@ -7,7 +7,7 @@ WORKDIR /build COPY . /build RUN chmod +x ./mvnw -RUN ./mvnw clean package -U +RUN ./mvnw clean package -U -DskipTests # JAR file will be specified by passing in a build time argument to docker build ARG APP_FILE @@ -16,7 +16,7 @@ ARG APP_FILE EXPOSE 50051 # copy the JAR file into the root and rename -RUN cp ./target/${APP_FILE} app.jar +RUN cp ./quickstart-service/target/${APP_FILE} app.jar # Run java with the jar file when the container starts up CMD ["java","-jar","app.jar"] diff --git a/4-governance/dubbo-samples-spring-boot-tracing-skywalking/dubbo-samples-spring-boot-tracing-skwalking-consumer/src/main/java/org/apache/dubbo/springboot/skywalking/consumer/ObservationConfiguration.java b/4-governance/dubbo-samples-spring-boot-tracing-skywalking/dubbo-samples-spring-boot-tracing-skwalking-consumer/src/main/java/org/apache/dubbo/springboot/skywalking/consumer/ObservationConfiguration.java index f3ce46ca71..e39bb7eede 100644 --- a/4-governance/dubbo-samples-spring-boot-tracing-skywalking/dubbo-samples-spring-boot-tracing-skwalking-consumer/src/main/java/org/apache/dubbo/springboot/skywalking/consumer/ObservationConfiguration.java +++ b/4-governance/dubbo-samples-spring-boot-tracing-skywalking/dubbo-samples-spring-boot-tracing-skwalking-consumer/src/main/java/org/apache/dubbo/springboot/skywalking/consumer/ObservationConfiguration.java @@ -25,14 +25,17 @@ import org.apache.skywalking.apm.toolkit.micrometer.observation.SkywalkingDefaultTracingHandler; import org.apache.skywalking.apm.toolkit.micrometer.observation.SkywalkingReceiverTracingHandler; import org.apache.skywalking.apm.toolkit.micrometer.observation.SkywalkingSenderTracingHandler; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration public class ObservationConfiguration { + @ConditionalOnBean(ObservationRegistry.class) @Bean - ApplicationModel applicationModel(ObservationRegistry observationRegistry) { + ApplicationModel applicationModel(@Autowired ObservationRegistry observationRegistry) { ApplicationModel applicationModel = ApplicationModel.defaultModel(); observationRegistry.observationConfig() .observationHandler(new ObservationHandler.FirstMatchingCompositeObservationHandler( diff --git a/4-governance/dubbo-samples-spring-boot-tracing-skywalking/dubbo-samples-spring-boot-tracing-skwalking-provider/src/main/java/org/apache/dubbo/springboot/skywalking/demo/provider/ObservationConfiguration.java b/4-governance/dubbo-samples-spring-boot-tracing-skywalking/dubbo-samples-spring-boot-tracing-skwalking-provider/src/main/java/org/apache/dubbo/springboot/skywalking/demo/provider/ObservationConfiguration.java index ef81645fc8..d7cd9b1f43 100644 --- a/4-governance/dubbo-samples-spring-boot-tracing-skywalking/dubbo-samples-spring-boot-tracing-skwalking-provider/src/main/java/org/apache/dubbo/springboot/skywalking/demo/provider/ObservationConfiguration.java +++ b/4-governance/dubbo-samples-spring-boot-tracing-skywalking/dubbo-samples-spring-boot-tracing-skwalking-provider/src/main/java/org/apache/dubbo/springboot/skywalking/demo/provider/ObservationConfiguration.java @@ -25,13 +25,16 @@ import org.apache.skywalking.apm.toolkit.micrometer.observation.SkywalkingDefaultTracingHandler; import org.apache.skywalking.apm.toolkit.micrometer.observation.SkywalkingReceiverTracingHandler; import org.apache.skywalking.apm.toolkit.micrometer.observation.SkywalkingSenderTracingHandler; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration public class ObservationConfiguration { + @ConditionalOnBean(ObservationRegistry.class) @Bean - ApplicationModel applicationModel(ObservationRegistry observationRegistry) { + ApplicationModel applicationModel(@Autowired ObservationRegistry observationRegistry) { ApplicationModel applicationModel = ApplicationModel.defaultModel(); observationRegistry.observationConfig() .observationHandler(new ObservationHandler.FirstMatchingCompositeObservationHandler( diff --git a/test/dubbo-test-jacoco-merger/pom.xml b/test/dubbo-test-jacoco-merger/pom.xml index 21c6996c8b..0574ad675a 100644 --- a/test/dubbo-test-jacoco-merger/pom.xml +++ b/test/dubbo-test-jacoco-merger/pom.xml @@ -32,7 +32,7 @@ org.jacoco org.jacoco.cli - 0.8.8 + 0.8.12 - \ No newline at end of file +