From 59942f5078eb782dbf09cd362bb2e2d1313aefdb Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 15 Jan 2022 21:33:46 +0100 Subject: Quarkus example: Use CDI instead of ServiceLoader for the provider. Change-Id: Ibbb012ea3fe9e32b8bc533724732885b57f87c88 --- .../jsonlogging/example/RandomNumberParameterProvider.java | 4 ++++ ...u.mulk.quarkus.googlecloud.jsonlogging.StructuredParameterProvider | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) delete mode 100644 examples/quarkus/src/main/resources/META-INF/services/eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameterProvider (limited to 'examples') diff --git a/examples/quarkus/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RandomNumberParameterProvider.java b/examples/quarkus/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RandomNumberParameterProvider.java index 7e4158c..93975ae 100644 --- a/examples/quarkus/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RandomNumberParameterProvider.java +++ b/examples/quarkus/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/example/RandomNumberParameterProvider.java @@ -3,8 +3,12 @@ package eu.mulk.quarkus.googlecloud.jsonlogging.example; import eu.mulk.quarkus.googlecloud.jsonlogging.KeyValueParameter; import eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameter; import eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameterProvider; +import io.quarkus.arc.Unremovable; import java.util.concurrent.ThreadLocalRandom; +import javax.inject.Singleton; +@Singleton +@Unremovable public class RandomNumberParameterProvider implements StructuredParameterProvider { @Override diff --git a/examples/quarkus/src/main/resources/META-INF/services/eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameterProvider b/examples/quarkus/src/main/resources/META-INF/services/eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameterProvider deleted file mode 100644 index c0017e6..0000000 --- a/examples/quarkus/src/main/resources/META-INF/services/eu.mulk.quarkus.googlecloud.jsonlogging.StructuredParameterProvider +++ /dev/null @@ -1 +0,0 @@ -eu.mulk.quarkus.googlecloud.jsonlogging.example.RandomNumberParameterProvider -- cgit v1.2.3