diff --git a/autovalue/pom.xml b/autovalue/pom.xml
index 3ec2d26b35..a10e8ef055 100644
--- a/autovalue/pom.xml
+++ b/autovalue/pom.xml
@@ -29,6 +29,12 @@
+
+ com.google.auto.service
+ auto-service
+ ${auto-service.version}
+ true
+
com.google.inject
@@ -40,6 +46,7 @@
1.3
1.0-beta5
+ 1.0-rc5
4.2.0
diff --git a/autovalue/src/main/java/com/baeldung/autoservice/BingTranslateServiceProvider.java b/autovalue/src/main/java/com/baeldung/autoservice/BingTranslateServiceProvider.java
new file mode 100644
index 0000000000..93ab8f4fe4
--- /dev/null
+++ b/autovalue/src/main/java/com/baeldung/autoservice/BingTranslateServiceProvider.java
@@ -0,0 +1,11 @@
+package com.baeldung.autoservice;
+
+import java.util.Locale;
+
+@AutoService(TranslateService.class)
+public class BingTranslateServiceProvider implements TranslateService {
+
+ public String translate(String message, Locale from, Locale to) {
+ return "translated by Bing";
+ }
+}
diff --git a/autovalue/src/main/java/com/baeldung/autoservice/GoogleTranslateServiceProvider.java b/autovalue/src/main/java/com/baeldung/autoservice/GoogleTranslateServiceProvider.java
new file mode 100644
index 0000000000..07772e2afe
--- /dev/null
+++ b/autovalue/src/main/java/com/baeldung/autoservice/GoogleTranslateServiceProvider.java
@@ -0,0 +1,11 @@
+package com.baeldung.autoservice;
+
+import java.util.Locale;
+
+@AutoService(TranslateService.class)
+public class GoogleTranslateServiceProvider implements TranslateService {
+
+ public String translate(String message, Locale from, Locale to) {
+ return "translated by Google";
+ }
+}
diff --git a/autovalue/src/main/java/com/baeldung/autoservice/TranslateService.java b/autovalue/src/main/java/com/baeldung/autoservice/TranslateService.java
new file mode 100644
index 0000000000..6d68f6aca3
--- /dev/null
+++ b/autovalue/src/main/java/com/baeldung/autoservice/TranslateService.java
@@ -0,0 +1,8 @@
+package com.baeldung.autoservice;
+
+import java.util.Locale;
+
+public interface TranslateService {
+
+ String translate(String message, Locale from, Locale to);
+}