diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2022-01-15 21:33:46 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2022-01-15 21:33:46 +0100 |
commit | 59942f5078eb782dbf09cd362bb2e2d1313aefdb (patch) | |
tree | 724d19afdaefbd8b90b1fe3e333a2f717b0f7e7d /examples/quarkus | |
parent | ef37709535a1e9cccd000c42a67e732092e1c9c7 (diff) |
Quarkus example: Use CDI instead of ServiceLoader for the provider.
Change-Id: Ibbb012ea3fe9e32b8bc533724732885b57f87c88
Diffstat (limited to 'examples/quarkus')
2 files changed, 4 insertions, 1 deletions
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 |