org.mapstruct
@@ -881,6 +881,9 @@
+ 1.8
+ 1.8
+ 1.0.0
-Djava.security.egd=file:/dev/./urandom -Xmx256m
3.6.2
2.0.0
diff --git a/jhipster/jhipster-uaa/gateway/pom.xml b/jhipster/jhipster-uaa/gateway/pom.xml
index 0f815bedad..1b85877a9b 100644
--- a/jhipster/jhipster-uaa/gateway/pom.xml
+++ b/jhipster/jhipster-uaa/gateway/pom.xml
@@ -236,7 +236,7 @@
org.zalando
problem-spring-web
- 0.24.0-RC.0
+ ${spring.web.version}
org.springframework.security.oauth
@@ -559,7 +559,7 @@
org.eclipse.m2e
lifecycle-mapping
- 1.0.0
+ ${lifecycle.mapping.version}
@@ -1012,6 +1012,8 @@
+ 1.0.0
+ 0.24.0-RC.0
3.0.0
1.8
diff --git a/jhipster/jhipster-uaa/quotes/pom.xml b/jhipster/jhipster-uaa/quotes/pom.xml
index 81ab23471f..aacc6f8e36 100644
--- a/jhipster/jhipster-uaa/quotes/pom.xml
+++ b/jhipster/jhipster-uaa/quotes/pom.xml
@@ -232,7 +232,7 @@
org.zalando
problem-spring-web
- 0.24.0-RC.0
+ ${zalando.version}
org.springframework.security.oauth
@@ -910,5 +910,6 @@
${project.basedir}/src/test/
+ 0.24.0-RC.0
diff --git a/jhipster/jhipster-uaa/uaa/pom.xml b/jhipster/jhipster-uaa/uaa/pom.xml
index 2c4dd9d0f0..27a056820d 100644
--- a/jhipster/jhipster-uaa/uaa/pom.xml
+++ b/jhipster/jhipster-uaa/uaa/pom.xml
@@ -232,7 +232,7 @@
org.zalando
problem-spring-web
- 0.24.0-RC.0
+ ${spring.web.version}
org.springframework.security.oauth
@@ -543,7 +543,7 @@
org.eclipse.m2e
lifecycle-mapping
- 1.0.0
+ ${lifecycle.mapping.version}
@@ -834,6 +834,8 @@
+ 1.0.0
+ 0.24.0-RC.0
3.0.0
1.8
diff --git a/json-2/README.md b/json-2/README.md
new file mode 100644
index 0000000000..b0f49f0e48
--- /dev/null
+++ b/json-2/README.md
@@ -0,0 +1,6 @@
+## JSON
+
+This module contains articles about JSON.
+
+### Relevant Articles:
+- [Introduction to Jsoniter](https://www.baeldung.com/java-jsoniter)
diff --git a/json-2/pom.xml b/json-2/pom.xml
new file mode 100644
index 0000000000..72b3295b2b
--- /dev/null
+++ b/json-2/pom.xml
@@ -0,0 +1,41 @@
+
+
+ com.baeldung
+ json-2
+ 0.0.1-SNAPSHOT
+
+
+ parent-modules
+ com.baeldung
+ 1.0.0-SNAPSHOT
+
+ 4.0.0
+
+
+
+ com.jsoniter
+ jsoniter
+ ${jsoniter.version}
+
+
+
+ junit
+ junit
+ ${junit.version}
+ test
+
+
+
+ org.assertj
+ assertj-core
+ ${assertj-core.version}
+ test
+
+
+
+ 0.9.23
+ 3.11.1
+
+
diff --git a/json-2/src/main/java/com/baeldung/jsoniter/model/Name.java b/json-2/src/main/java/com/baeldung/jsoniter/model/Name.java
new file mode 100644
index 0000000000..ed5e221235
--- /dev/null
+++ b/json-2/src/main/java/com/baeldung/jsoniter/model/Name.java
@@ -0,0 +1,22 @@
+package com.baeldung.jsoniter.model;
+
+public class Name {
+ private String firstName;
+ private String surname;
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getSurname() {
+ return surname;
+ }
+
+ public void setSurname(String surname) {
+ this.surname = surname;
+ }
+}
diff --git a/json-2/src/main/java/com/baeldung/jsoniter/model/Student.java b/json-2/src/main/java/com/baeldung/jsoniter/model/Student.java
new file mode 100644
index 0000000000..07c73dd18e
--- /dev/null
+++ b/json-2/src/main/java/com/baeldung/jsoniter/model/Student.java
@@ -0,0 +1,26 @@
+package com.baeldung.jsoniter.model;
+
+import com.jsoniter.annotation.JsonProperty;
+import com.jsoniter.fuzzy.MaybeStringIntDecoder;
+
+public class Student {
+ @JsonProperty(decoder = MaybeStringIntDecoder.class)
+ private int id;
+ private Name name;
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public Name getName() {
+ return name;
+ }
+
+ public void setName(Name name) {
+ this.name = name;
+ }
+}
diff --git a/json-2/src/test/java/com/baeldung/jsoniter/JsoniterIntroUnitTest.java b/json-2/src/test/java/com/baeldung/jsoniter/JsoniterIntroUnitTest.java
new file mode 100644
index 0000000000..09f82567a2
--- /dev/null
+++ b/json-2/src/test/java/com/baeldung/jsoniter/JsoniterIntroUnitTest.java
@@ -0,0 +1,85 @@
+package com.baeldung.jsoniter;
+
+import com.baeldung.jsoniter.model.Name;
+import com.baeldung.jsoniter.model.Student;
+import com.jsoniter.JsonIterator;
+import com.jsoniter.ValueType;
+import com.jsoniter.any.Any;
+
+import org.junit.Test;
+
+import static com.jsoniter.ValueType.STRING;
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class JsoniterIntroUnitTest {
+
+ @Test
+ public void whenParsedUsingBindAPI_thenConvertedToJavaObjectCorrectly() {
+ String input = "{\"id\":1,\"name\":{\"firstName\":\"Joe\",\"surname\":\"Blogg\"}}";
+
+ Student student = JsonIterator.deserialize(input, Student.class);
+
+ assertThat(student.getId()).isEqualTo(1);
+ assertThat(student.getName().getFirstName()).isEqualTo("Joe");
+ assertThat(student.getName().getSurname()).isEqualTo("Blogg");
+ }
+
+ @Test
+ public void givenTypeInJsonFuzzy_whenFieldIsMaybeDecoded_thenFieldParsedCorrectly() {
+ String input = "{\"id\":\"1\",\"name\":{\"firstName\":\"Joe\",\"surname\":\"Blogg\"}}";
+
+ Student student = JsonIterator.deserialize(input, Student.class);
+
+ assertThat(student.getId()).isEqualTo(1);
+ }
+
+ @Test
+ public void whenParsedUsingAnyAPI_thenFieldValueCanBeExtractedUsingTheFieldName() {
+ String input = "{\"id\":1,\"name\":{\"firstName\":\"Joe\",\"surname\":\"Blogg\"}}";
+
+ Any any = JsonIterator.deserialize(input);
+
+ assertThat(any.toInt("id")).isEqualTo(1);
+ assertThat(any.toString("name", "firstName")).isEqualTo("Joe");
+ assertThat(any.toString("name", "surname")).isEqualTo("Blogg");
+ }
+
+ @Test
+ public void whenParsedUsingAnyAPI_thenFieldValueTypeIsCorrect() {
+ String input = "{\"id\":1,\"name\":{\"firstName\":\"Joe\",\"surname\":\"Blogg\"}}";
+
+ Any any = JsonIterator.deserialize(input);
+
+ assertThat(any.get("id").valueType()).isEqualTo(ValueType.NUMBER);
+ assertThat(any.get("name").valueType()).isEqualTo(ValueType.OBJECT);
+ assertThat(any.get("error").valueType()).isEqualTo(ValueType.INVALID);
+ }
+
+ @Test
+ public void whenParsedUsingIteratorAPI_thenFieldValuesExtractedCorrectly() throws Exception {
+ Name name = new Name();
+ String input = "{ \"firstName\" : \"Joe\", \"surname\" : \"Blogg\" }";
+ JsonIterator iterator = JsonIterator.parse(input);
+
+ for (String field = iterator.readObject(); field != null; field = iterator.readObject()) {
+ switch (field) {
+ case "firstName":
+ if (iterator.whatIsNext() == ValueType.STRING) {
+ name.setFirstName(iterator.readString());
+ }
+ continue;
+ case "surname":
+ if (iterator.whatIsNext() == ValueType.STRING) {
+ name.setSurname(iterator.readString());
+ }
+ continue;
+ default:
+ iterator.skip();
+ }
+ }
+
+ assertThat(name.getFirstName()).isEqualTo("Joe");
+ assertThat(name.getSurname()).isEqualTo("Blogg");
+ }
+
+}
diff --git a/json-2/src/test/resources/Student.json b/json-2/src/test/resources/Student.json
new file mode 100644
index 0000000000..7ff3351e8e
--- /dev/null
+++ b/json-2/src/test/resources/Student.json
@@ -0,0 +1 @@
+{"id":1,"name":{"firstName": "Joe", "surname":"Blogg"}}
diff --git a/jta/README.md b/jta/README.md
index 0351177a0d..202019118d 100644
--- a/jta/README.md
+++ b/jta/README.md
@@ -3,4 +3,4 @@
This module contains articles about the Java Transaction API (JTA).
### Relevant Articles:
-- [Guide to Java EE JTA](https://www.baeldung.com/jee-jta)
+- [Guide to Jakarta EE JTA](https://www.baeldung.com/jee-jta)
diff --git a/kotlin-libraries-2/README.md b/kotlin-libraries-2/README.md
index 4064ef67d8..f725048acd 100644
--- a/kotlin-libraries-2/README.md
+++ b/kotlin-libraries-2/README.md
@@ -8,4 +8,7 @@ This module contains articles about Kotlin Libraries.
- [Introduction to RxKotlin](https://www.baeldung.com/rxkotlin)
- [MockK: A Mocking Library for Kotlin](https://www.baeldung.com/kotlin-mockk)
- [Kotlin Immutable Collections](https://www.baeldung.com/kotlin-immutable-collections)
+- [Dependency Injection for Kotlin with Injekt](https://www.baeldung.com/kotlin-dependency-injection-with-injekt)
+- [Fuel HTTP Library with Kotlin](https://www.baeldung.com/kotlin-fuel)
+- [Introduction to Kovenant Library for Kotlin](https://www.baeldung.com/kotlin-kovenant)
- More articles: [[<-- prev]](/kotlin-libraries)
diff --git a/kotlin-libraries-2/pom.xml b/kotlin-libraries-2/pom.xml
index 518142403e..254f2c6907 100644
--- a/kotlin-libraries-2/pom.xml
+++ b/kotlin-libraries-2/pom.xml
@@ -21,7 +21,7 @@
io.reactivex.rxjava2
rxkotlin
- 2.3.0
+ ${rxkotlin.version}
junit
@@ -39,6 +39,37 @@
kotlinx-collections-immutable
${kotlinx-collections-immutable.version}
+
+ uy.kohesive.injekt
+ injekt-core
+ ${injekt-core.version}
+
+
+ com.github.kittinunf.fuel
+ fuel
+ ${fuel.version}
+
+
+ com.github.kittinunf.fuel
+ fuel-gson
+ ${fuel.version}
+
+
+ com.github.kittinunf.fuel
+ fuel-rxjava
+ ${fuel.version}
+
+
+ com.github.kittinunf.fuel
+ fuel-coroutines
+ ${fuel.version}
+
+
+ nl.komponents.kovenant
+ kovenant
+ ${kovenant.version}
+ pom
+
io.mockk
@@ -49,9 +80,13 @@
+ 1.16.1
+ 1.15.0
+ 3.3.0
27.1-jre
1.9.3
0.1
+ 2.3.0
diff --git a/core-kotlin/src/main/kotlin/com/baeldung/fuel/Interceptors.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/fuel/Interceptors.kt
similarity index 100%
rename from core-kotlin/src/main/kotlin/com/baeldung/fuel/Interceptors.kt
rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/fuel/Interceptors.kt
diff --git a/core-kotlin/src/main/kotlin/com/baeldung/fuel/Post.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/fuel/Post.kt
similarity index 100%
rename from core-kotlin/src/main/kotlin/com/baeldung/fuel/Post.kt
rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/fuel/Post.kt
diff --git a/core-kotlin/src/main/kotlin/com/baeldung/fuel/PostRoutingAPI.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/fuel/PostRoutingAPI.kt
similarity index 100%
rename from core-kotlin/src/main/kotlin/com/baeldung/fuel/PostRoutingAPI.kt
rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/fuel/PostRoutingAPI.kt
diff --git a/core-kotlin/src/main/kotlin/com/baeldung/injekt/DelegateInjectionApplication.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/DelegateInjectionApplication.kt
similarity index 100%
rename from core-kotlin/src/main/kotlin/com/baeldung/injekt/DelegateInjectionApplication.kt
rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/DelegateInjectionApplication.kt
diff --git a/core-kotlin/src/main/kotlin/com/baeldung/injekt/KeyedApplication.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/KeyedApplication.kt
similarity index 80%
rename from core-kotlin/src/main/kotlin/com/baeldung/injekt/KeyedApplication.kt
rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/KeyedApplication.kt
index 744459b7fe..4205678981 100644
--- a/core-kotlin/src/main/kotlin/com/baeldung/injekt/KeyedApplication.kt
+++ b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/KeyedApplication.kt
@@ -1,8 +1,12 @@
package com.baeldung.injekt
import org.slf4j.LoggerFactory
-import uy.kohesive.injekt.*
-import uy.kohesive.injekt.api.*
+import uy.kohesive.injekt.Injekt
+import uy.kohesive.injekt.InjektMain
+import uy.kohesive.injekt.api.InjektRegistrar
+import uy.kohesive.injekt.api.addPerKeyFactory
+import uy.kohesive.injekt.api.addSingletonFactory
+import uy.kohesive.injekt.api.get
class KeyedApplication {
companion object : InjektMain() {
diff --git a/core-kotlin/src/main/kotlin/com/baeldung/injekt/ModularApplication.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/ModularApplication.kt
similarity index 94%
rename from core-kotlin/src/main/kotlin/com/baeldung/injekt/ModularApplication.kt
rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/ModularApplication.kt
index e802f3f6d5..96a0c9556a 100644
--- a/core-kotlin/src/main/kotlin/com/baeldung/injekt/ModularApplication.kt
+++ b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/ModularApplication.kt
@@ -1,7 +1,8 @@
package com.baeldung.injekt
import org.slf4j.LoggerFactory
-import uy.kohesive.injekt.*
+import uy.kohesive.injekt.Injekt
+import uy.kohesive.injekt.InjektMain
import uy.kohesive.injekt.api.*
class ModularApplication {
diff --git a/core-kotlin/src/main/kotlin/com/baeldung/injekt/PerThreadApplication.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/PerThreadApplication.kt
similarity index 84%
rename from core-kotlin/src/main/kotlin/com/baeldung/injekt/PerThreadApplication.kt
rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/PerThreadApplication.kt
index a42f314349..f3167bc223 100644
--- a/core-kotlin/src/main/kotlin/com/baeldung/injekt/PerThreadApplication.kt
+++ b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/PerThreadApplication.kt
@@ -1,8 +1,12 @@
package com.baeldung.injekt
import org.slf4j.LoggerFactory
-import uy.kohesive.injekt.*
-import uy.kohesive.injekt.api.*
+import uy.kohesive.injekt.Injekt
+import uy.kohesive.injekt.InjektMain
+import uy.kohesive.injekt.api.InjektRegistrar
+import uy.kohesive.injekt.api.addPerThreadFactory
+import uy.kohesive.injekt.api.addSingletonFactory
+import uy.kohesive.injekt.api.get
import java.util.*
import java.util.concurrent.Executors
import java.util.concurrent.TimeUnit
diff --git a/core-kotlin/src/main/kotlin/com/baeldung/injekt/SimpleApplication.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/SimpleApplication.kt
similarity index 75%
rename from core-kotlin/src/main/kotlin/com/baeldung/injekt/SimpleApplication.kt
rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/SimpleApplication.kt
index 2b07cd059f..5c2dc28ba5 100644
--- a/core-kotlin/src/main/kotlin/com/baeldung/injekt/SimpleApplication.kt
+++ b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/SimpleApplication.kt
@@ -1,8 +1,12 @@
package com.baeldung.injekt
import org.slf4j.LoggerFactory
-import uy.kohesive.injekt.*
-import uy.kohesive.injekt.api.*
+import uy.kohesive.injekt.Injekt
+import uy.kohesive.injekt.InjektMain
+import uy.kohesive.injekt.api.InjektRegistrar
+import uy.kohesive.injekt.api.addSingleton
+import uy.kohesive.injekt.api.addSingletonFactory
+import uy.kohesive.injekt.api.get
class SimpleApplication {
companion object : InjektMain() {
diff --git a/core-kotlin/src/test/kotlin/com/baeldung/fuel/FuelHttpUnitTest.kt b/kotlin-libraries-2/src/test/kotlin/com/baeldung/fuel/FuelHttpUnitTest.kt
similarity index 100%
rename from core-kotlin/src/test/kotlin/com/baeldung/fuel/FuelHttpUnitTest.kt
rename to kotlin-libraries-2/src/test/kotlin/com/baeldung/fuel/FuelHttpUnitTest.kt
diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/KovenantTest.kt b/kotlin-libraries-2/src/test/kotlin/com/baeldung/kovenant/KovenantTest.kt
similarity index 99%
rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/KovenantTest.kt
rename to kotlin-libraries-2/src/test/kotlin/com/baeldung/kovenant/KovenantTest.kt
index 469118f0f6..046b7380f7 100644
--- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/KovenantTest.kt
+++ b/kotlin-libraries-2/src/test/kotlin/com/baeldung/kovenant/KovenantTest.kt
@@ -1,4 +1,4 @@
-package com.baeldung.kotlin
+package com.baeldung.kovenant
import nl.komponents.kovenant.*
import nl.komponents.kovenant.Kovenant.deferred
@@ -12,6 +12,7 @@ import java.util.*
import java.util.concurrent.TimeUnit
class KovenantTest {
+
@Before
fun setupTestMode() {
Kovenant.testMode { error ->
diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/KovenantTimeoutTest.kt b/kotlin-libraries-2/src/test/kotlin/com/baeldung/kovenant/KovenantTimeoutTest.kt
similarity index 96%
rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/KovenantTimeoutTest.kt
rename to kotlin-libraries-2/src/test/kotlin/com/baeldung/kovenant/KovenantTimeoutTest.kt
index e37d2cc2fa..d98f9c538f 100644
--- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/KovenantTimeoutTest.kt
+++ b/kotlin-libraries-2/src/test/kotlin/com/baeldung/kovenant/KovenantTimeoutTest.kt
@@ -1,4 +1,4 @@
-package com.baeldung.kotlin
+package com.baeldung.kovenant
import nl.komponents.kovenant.Promise
import nl.komponents.kovenant.any
diff --git a/kotlin-libraries/README.md b/kotlin-libraries/README.md
index 99a57c8293..570bf9b1e5 100644
--- a/kotlin-libraries/README.md
+++ b/kotlin-libraries/README.md
@@ -10,7 +10,6 @@ This module contains articles about Kotlin Libraries.
- [Writing Specifications with Kotlin and Spek](https://www.baeldung.com/kotlin-spek)
- [Processing JSON with Kotlin and Klaxson](https://www.baeldung.com/kotlin-json-klaxson)
- [Guide to the Kotlin Exposed Framework](https://www.baeldung.com/kotlin-exposed-persistence)
-- [Working with Dates in Kotlin](https://www.baeldung.com/kotlin-dates)
- [Introduction to Arrow in Kotlin](https://www.baeldung.com/kotlin-arrow)
- [Kotlin with Ktor](https://www.baeldung.com/kotlin-ktor)
- [REST API With Kotlin and Kovert](https://www.baeldung.com/kotlin-kovert)
diff --git a/kotlin-libraries/pom.xml b/kotlin-libraries/pom.xml
index dfd1dc363f..0d6e589377 100644
--- a/kotlin-libraries/pom.xml
+++ b/kotlin-libraries/pom.xml
@@ -33,19 +33,19 @@
org.jetbrains.spek
spek-api
- 1.1.5
+ ${spek.version}
test
org.jetbrains.spek
spek-subject-extension
- 1.1.5
+ ${spek.version}
test
org.jetbrains.spek
spek-junit-platform-engine
- 1.1.5
+ ${spek.version}
test
@@ -166,6 +166,7 @@
2.6
2.3.0
0.7.3
+ 1.1.5
diff --git a/kotlin-quasar/pom.xml b/kotlin-quasar/pom.xml
index a12d27c565..ec37fa8059 100644
--- a/kotlin-quasar/pom.xml
+++ b/kotlin-quasar/pom.xml
@@ -48,7 +48,7 @@
junit
junit
- 4.12
+ ${junit.version}
@@ -103,7 +103,7 @@
maven-dependency-plugin
- 3.1.1
+ ${dependency.plugin.version}
getClasspathFilenames
@@ -116,7 +116,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 2.22.1
+ ${surefire.plugin.version}
-Dco.paralleluniverse.fibers.verifyInstrumentation=true
-javaagent:${co.paralleluniverse:quasar-core:jar}
@@ -125,7 +125,7 @@
org.codehaus.mojo
exec-maven-plugin
- 1.3.2
+ ${exec.plugin.version}
target/classes
echo
@@ -145,6 +145,10 @@
1.3.31
1.7.21
1.1.7
+ 3.1.1
+ 2.22.1
+ 1.3.2
+ 4.12
diff --git a/libraries-2/README.md b/libraries-2/README.md
index 95c454edbb..eb45a3e426 100644
--- a/libraries-2/README.md
+++ b/libraries-2/README.md
@@ -18,7 +18,7 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m
- [Key Value Store with Chronicle Map](https://www.baeldung.com/java-chronicle-map)
- [Guide to MapDB](https://www.baeldung.com/mapdb)
- [A Guide to Apache Mesos](https://www.baeldung.com/apache-mesos)
-- [JasperReports with Spring](https://www.baeldung.com/spring-jasper)]
+- [JasperReports with Spring](https://www.baeldung.com/spring-jasper)
- [Jetty ReactiveStreams HTTP Client](https://www.baeldung.com/jetty-reactivestreams-http-client)
- More articles [[<-- prev]](/libraries)
diff --git a/libraries-2/src/test/java/com/baeldung/handlebars/BuiltinHelperUnitTest.java b/libraries-2/src/test/java/com/baeldung/handlebars/BuiltinHelperUnitTest.java
index 6749f7fe0a..357bb7df89 100644
--- a/libraries-2/src/test/java/com/baeldung/handlebars/BuiltinHelperUnitTest.java
+++ b/libraries-2/src/test/java/com/baeldung/handlebars/BuiltinHelperUnitTest.java
@@ -1,14 +1,15 @@
package com.baeldung.handlebars;
-import static org.assertj.core.api.Assertions.assertThat;
-
import com.github.jknack.handlebars.Handlebars;
import com.github.jknack.handlebars.Template;
import com.github.jknack.handlebars.io.ClassPathTemplateLoader;
import com.github.jknack.handlebars.io.TemplateLoader;
-import java.io.IOException;
import org.junit.Test;
+import java.io.IOException;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
/**
* Showcases the built-in template helpers.
*
@@ -27,7 +28,7 @@ public class BuiltinHelperUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\nI live in World \n");
+ assertThat(templateString).contains("I live in World ");
}
@Test
@@ -39,7 +40,7 @@ public class BuiltinHelperUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\nI live in World \n");
+ assertThat(templateString).contains("I live in World ");
}
@Test
@@ -54,8 +55,8 @@ public class BuiltinHelperUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\nJava is my friend. \n"
- + "\nSpring is my friend. \n");
+ assertThat(templateString)
+ .contains("Java is my friend. ", "Spring is my friend. ");
}
@Test
@@ -70,8 +71,8 @@ public class BuiltinHelperUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\nJava is my friend. \n"
- + "\nSpring is my friend. \n");
+ assertThat(templateString)
+ .contains("Java is my friend. ", "Spring is my friend. ");
}
@Test
@@ -83,7 +84,7 @@ public class BuiltinHelperUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\nBaeldung is busy. \n");
+ assertThat(templateString).contains("Baeldung is busy. ");
}
@Test
@@ -95,7 +96,7 @@ public class BuiltinHelperUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\nBaeldung is busy. \n");
+ assertThat(templateString).contains("Baeldung is busy. ");
}
private Person getPerson(String name) {
diff --git a/libraries-2/src/test/java/com/baeldung/handlebars/ReusingTemplatesUnitTest.java b/libraries-2/src/test/java/com/baeldung/handlebars/ReusingTemplatesUnitTest.java
index 36f78f486e..376e44e4bd 100644
--- a/libraries-2/src/test/java/com/baeldung/handlebars/ReusingTemplatesUnitTest.java
+++ b/libraries-2/src/test/java/com/baeldung/handlebars/ReusingTemplatesUnitTest.java
@@ -1,14 +1,15 @@
package com.baeldung.handlebars;
-import static org.assertj.core.api.Assertions.assertThat;
-
import com.github.jknack.handlebars.Handlebars;
import com.github.jknack.handlebars.Template;
import com.github.jknack.handlebars.io.ClassPathTemplateLoader;
import com.github.jknack.handlebars.io.TemplateLoader;
-import java.io.IOException;
import org.junit.Test;
+import java.io.IOException;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
/**
* Showcases reusing the existing templates.
*
@@ -27,7 +28,8 @@ public class ReusingTemplatesUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("Hi Baeldung! \nThis is the page Baeldung
");
+ assertThat(templateString)
+ .contains("Hi Baeldung! ", "This is the page Baeldung
");
}
@Test
@@ -39,11 +41,11 @@ public class ReusingTemplatesUnitTest {
String templateString = template.apply(person);
- assertThat(templateString).isEqualTo("\n\n"
- + "\n"
- + "\n This is the intro\n\n"
- + "\n Hi there!\n\n"
- + "\n"
- + "");
+ assertThat(templateString).contains("",
+ "",
+ "This is the intro",
+ "Hi there!",
+ "",
+ "");
}
}
diff --git a/libraries-3/README.md b/libraries-3/README.md
index a9d48bb389..942f108afd 100644
--- a/libraries-3/README.md
+++ b/libraries-3/README.md
@@ -9,3 +9,5 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m
### Relevant Articles:
- [Parsing Command-Line Parameters with JCommander](https://www.baeldung.com/jcommander-parsing-command-line-parameters)
+- [Guide to the Cactoos Library](https://www.baeldung.com/java-cactoos)
+- [Parsing Command-Line Parameters with Airline](https://www.baeldung.com/java-airline)
diff --git a/libraries-3/pom.xml b/libraries-3/pom.xml
index c8980fd309..4bb1a4fba1 100644
--- a/libraries-3/pom.xml
+++ b/libraries-3/pom.xml
@@ -8,8 +8,9 @@
com.baeldung
- parent-modules
- 1.0.0-SNAPSHOT
+ parent-boot-2
+ 0.0.1-SNAPSHOT
+ ../parent-boot-2
@@ -23,10 +24,132 @@
lombok
${lombok.version}
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ net.sourceforge.barbecue
+ barbecue
+ ${barbecue.version}
+
+
+
+ net.sf.barcode4j
+ barcode4j
+ ${barcode4j.version}
+
+
+
+ com.google.zxing
+ core
+ ${zxing.version}
+
+
+ com.google.zxing
+ javase
+ ${zxing.version}
+
+
+
+ com.github.kenglxn.qrgen
+ javase
+ ${qrgen.version}
+
+
+ com.github.rvesse
+ airline
+ ${airline.version}
+
+
+ org.cactoos
+ cactoos
+ ${cactoos.version}
+
+
+ org.cache2k
+ cache2k-base-bom
+ ${cache2k.version}
+ pom
+
+
+ com.squareup.moshi
+ moshi
+ ${moshi.version}
+
+
+ com.squareup.moshi
+ moshi-adapters
+ ${moshi.version}
+
+
+
+ com.jcabi
+ jcabi-aspects
+ ${jcabi-aspects.version}
+
+
+ org.aspectj
+ aspectjrt
+ ${aspectjrt.version}
+ runtime
+
+
+
+ jitpack.io
+ https://jitpack.io
+
+
+
+
+ libraries-3
+
+
+ com.jcabi
+ jcabi-maven-plugin
+ ${jcabi-maven-plugin.version}
+
+
+
+ ajc
+
+
+
+
+
+ org.aspectj
+ aspectjtools
+ ${aspectjtools.version}
+
+
+ org.aspectj
+ aspectjweaver
+ ${aspectjweaver.version}
+
+
+
+
+
+
1.78
1.18.6
+ 1.5-beta1
+ 2.1
+ 3.3.0
+ 2.6.0
+
+ 0.43
+ 2.7.2
+ 1.2.3.Final
+ 1.9.2
+ 0.22.6
+ 1.9.2
+ 0.14.1
+ 1.9.2
+ 1.9.2
diff --git a/libraries-3/src/main/java/com/baeldung/airline/CommandLine.java b/libraries-3/src/main/java/com/baeldung/airline/CommandLine.java
new file mode 100644
index 0000000000..b4c3fc9b9e
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/airline/CommandLine.java
@@ -0,0 +1,17 @@
+package com.baeldung.airline;
+
+import com.github.rvesse.airline.annotations.Cli;
+import com.github.rvesse.airline.help.Help;
+
+@Cli(name = "baeldung-cli",
+description = "Baeldung Airline Tutorial",
+defaultCommand = Help.class,
+commands = { DatabaseSetupCommand.class, LoggingCommand.class, Help.class })
+public class CommandLine {
+
+ public static void main(String[] args) {
+ com.github.rvesse.airline.Cli cli = new com.github.rvesse.airline.Cli<>(CommandLine.class);
+ Runnable cmd = cli.parse(args);
+ cmd.run();
+ }
+}
diff --git a/libraries-3/src/main/java/com/baeldung/airline/DatabaseSetupCommand.java b/libraries-3/src/main/java/com/baeldung/airline/DatabaseSetupCommand.java
new file mode 100644
index 0000000000..bf67fa33b6
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/airline/DatabaseSetupCommand.java
@@ -0,0 +1,77 @@
+package com.baeldung.airline;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.inject.Inject;
+
+import com.github.rvesse.airline.HelpOption;
+import com.github.rvesse.airline.annotations.Command;
+import com.github.rvesse.airline.annotations.Option;
+import com.github.rvesse.airline.annotations.OptionType;
+import com.github.rvesse.airline.annotations.restrictions.AllowedRawValues;
+import com.github.rvesse.airline.annotations.restrictions.MutuallyExclusiveWith;
+import com.github.rvesse.airline.annotations.restrictions.Pattern;
+import com.github.rvesse.airline.annotations.restrictions.RequiredOnlyIf;
+
+@Command(name = "setup-db", description = "Setup our database")
+public class DatabaseSetupCommand implements Runnable {
+ @Inject
+ private HelpOption help;
+
+ @Option(type = OptionType.COMMAND,
+ name = {"-d", "--database"},
+ description = "Type of RDBMS.",
+ title = "RDBMS type: mysql|postgresql|mongodb")
+ @AllowedRawValues(allowedValues = { "mysql", "postgres", "mongodb" })
+ protected String rdbmsMode = "mysql";
+
+ @Option(type = OptionType.COMMAND,
+ name = {"--rdbms:url", "--url"},
+ description = "URL to use for connection to RDBMS.",
+ title = "RDBMS URL")
+ @MutuallyExclusiveWith(tag="mode")
+ @Pattern(pattern="^(http://.*):(d*)(.*)u=(.*)&p=(.*)")
+ protected String rdbmsUrl = "";
+
+ @Option(type = OptionType.COMMAND,
+ name = {"--rdbms:host", "--host"},
+ description = "Host to use for connection to RDBMS.",
+ title = "RDBMS host")
+ @MutuallyExclusiveWith(tag="mode")
+ protected String rdbmsHost = "";
+
+ @RequiredOnlyIf(names={"--rdbms:host", "--host"})
+ @Option(type = OptionType.COMMAND,
+ name = {"--rdbms:user", "-u", "--user"},
+ description = "User for login to RDBMS.",
+ title = "RDBMS user")
+ protected String rdbmsUser;
+
+ @RequiredOnlyIf(names={"--rdbms:host", "--host"})
+ @Option(type = OptionType.COMMAND,
+ name = {"--rdbms:password", "--password"},
+ description = "Password for login to RDBMS.",
+ title = "RDBMS password")
+ protected String rdbmsPassword;
+
+ @Option(type = OptionType.COMMAND,
+ name = {"--driver", "--jars"},
+ description = "List of drivers",
+ title = "--driver --driver ")
+ protected List jars = new ArrayList<>();
+
+ @Override
+ public void run() {
+ //skipping store our choices...
+ if (!help.showHelpIfRequested()) {
+ if(!"".equals(rdbmsHost)) {
+ System.out.println("Connecting to database host: " + rdbmsHost);
+ System.out.println("Credential: " + rdbmsUser + " / " + rdbmsPassword);
+ } else {
+ System.out.println("Connecting to database url: " + rdbmsUrl);
+ }
+ System.out.println(jars.toString());
+ }
+ }
+}
diff --git a/libraries-3/src/main/java/com/baeldung/airline/LoggingCommand.java b/libraries-3/src/main/java/com/baeldung/airline/LoggingCommand.java
new file mode 100644
index 0000000000..4a269f87fd
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/airline/LoggingCommand.java
@@ -0,0 +1,24 @@
+package com.baeldung.airline;
+
+import javax.inject.Inject;
+
+import com.github.rvesse.airline.HelpOption;
+import com.github.rvesse.airline.annotations.Command;
+import com.github.rvesse.airline.annotations.Option;
+
+@Command(name = "setup-log", description = "Setup our log")
+public class LoggingCommand implements Runnable {
+
+ @Inject
+ private HelpOption help;
+
+ @Option(name = { "-v", "--verbose" }, description = "Set log verbosity on/off")
+ private boolean verbose = false;
+
+ @Override
+ public void run() {
+ //skipping store user choice
+ if (!help.showHelpIfRequested())
+ System.out.println("Verbosity: " + verbose);
+ }
+}
diff --git a/libraries-3/src/main/java/com/baeldung/barcodes/BarcodesController.java b/libraries-3/src/main/java/com/baeldung/barcodes/BarcodesController.java
new file mode 100644
index 0000000000..171d703621
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/barcodes/BarcodesController.java
@@ -0,0 +1,99 @@
+package com.baeldung.barcodes;
+
+import com.baeldung.barcodes.generators.BarbecueBarcodeGenerator;
+import com.baeldung.barcodes.generators.Barcode4jBarcodeGenerator;
+import com.baeldung.barcodes.generators.QRGenBarcodeGenerator;
+import com.baeldung.barcodes.generators.ZxingBarcodeGenerator;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import java.awt.image.BufferedImage;
+
+@RestController
+@RequestMapping("/barcodes")
+public class BarcodesController {
+
+ //Barbecue library
+
+ @GetMapping(value = "/barbecue/upca/{barcode}", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity barbecueUPCABarcode(@PathVariable("barcode") String barcode) throws Exception {
+ return okResponse(BarbecueBarcodeGenerator.generateUPCABarcodeImage(barcode));
+ }
+
+ @GetMapping(value = "/barbecue/ean13/{barcode}", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity barbecueEAN13Barcode(@PathVariable("barcode") String barcode) throws Exception {
+ return okResponse(BarbecueBarcodeGenerator.generateEAN13BarcodeImage(barcode));
+ }
+
+ @PostMapping(value = "/barbecue/code128", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity barbecueCode128Barcode(@RequestBody String barcode) throws Exception {
+ return okResponse(BarbecueBarcodeGenerator.generateCode128BarcodeImage(barcode));
+ }
+
+ @PostMapping(value = "/barbecue/pdf417", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity barbecuePDF417Barcode(@RequestBody String barcode) throws Exception {
+ return okResponse(BarbecueBarcodeGenerator.generatePDF417BarcodeImage(barcode));
+ }
+
+ //Barcode4j library
+
+ @GetMapping(value = "/barcode4j/upca/{barcode}", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity barcode4jUPCABarcode(@PathVariable("barcode") String barcode) {
+ return okResponse(Barcode4jBarcodeGenerator.generateUPCABarcodeImage(barcode));
+ }
+
+ @GetMapping(value = "/barcode4j/ean13/{barcode}", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity barcode4jEAN13Barcode(@PathVariable("barcode") String barcode) {
+ return okResponse(Barcode4jBarcodeGenerator.generateEAN13BarcodeImage(barcode));
+ }
+
+ @PostMapping(value = "/barcode4j/code128", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity barcode4jCode128Barcode(@RequestBody String barcode) {
+ return okResponse(Barcode4jBarcodeGenerator.generateCode128BarcodeImage(barcode));
+ }
+
+ @PostMapping(value = "/barcode4j/pdf417", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity barcode4jPDF417Barcode(@RequestBody String barcode) {
+ return okResponse(Barcode4jBarcodeGenerator.generatePDF417BarcodeImage(barcode));
+ }
+
+ //Zxing library
+
+ @GetMapping(value = "/zxing/upca/{barcode}", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity zxingUPCABarcode(@PathVariable("barcode") String barcode) throws Exception {
+ return okResponse(ZxingBarcodeGenerator.generateUPCABarcodeImage(barcode));
+ }
+
+ @GetMapping(value = "/zxing/ean13/{barcode}", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity zxingEAN13Barcode(@PathVariable("barcode") String barcode) throws Exception {
+ return okResponse(ZxingBarcodeGenerator.generateEAN13BarcodeImage(barcode));
+ }
+
+ @PostMapping(value = "/zxing/code128", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity zxingCode128Barcode(@RequestBody String barcode) throws Exception {
+ return okResponse(ZxingBarcodeGenerator.generateCode128BarcodeImage(barcode));
+ }
+
+ @PostMapping(value = "/zxing/pdf417", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity zxingPDF417Barcode(@RequestBody String barcode) throws Exception {
+ return okResponse(ZxingBarcodeGenerator.generatePDF417BarcodeImage(barcode));
+ }
+
+ @PostMapping(value = "/zxing/qrcode", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity zxingQRCode(@RequestBody String barcode) throws Exception {
+ return okResponse(ZxingBarcodeGenerator.generateQRCodeImage(barcode));
+ }
+
+ //QRGen
+
+ @PostMapping(value = "/qrgen/qrcode", produces = MediaType.IMAGE_PNG_VALUE)
+ public ResponseEntity qrgenQRCode(@RequestBody String barcode) throws Exception {
+ return okResponse(QRGenBarcodeGenerator.generateQRCodeImage(barcode));
+ }
+
+ private ResponseEntity okResponse(BufferedImage image) {
+ return new ResponseEntity<>(image, HttpStatus.OK);
+ }
+}
diff --git a/libraries-3/src/main/java/com/baeldung/barcodes/SpringBootApp.java b/libraries-3/src/main/java/com/baeldung/barcodes/SpringBootApp.java
new file mode 100644
index 0000000000..991b3b11ce
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/barcodes/SpringBootApp.java
@@ -0,0 +1,23 @@
+package com.baeldung.barcodes;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.http.converter.BufferedImageHttpMessageConverter;
+import org.springframework.http.converter.HttpMessageConverter;
+
+import java.awt.image.BufferedImage;
+
+@SpringBootApplication
+public class SpringBootApp {
+
+ public static void main(String[] args) {
+ SpringApplication.run(SpringBootApp.class, args);
+ }
+
+ @Bean
+ public HttpMessageConverter createImageHttpMessageConverter() {
+ return new BufferedImageHttpMessageConverter();
+ }
+
+}
diff --git a/libraries-3/src/main/java/com/baeldung/barcodes/generators/BarbecueBarcodeGenerator.java b/libraries-3/src/main/java/com/baeldung/barcodes/generators/BarbecueBarcodeGenerator.java
new file mode 100644
index 0000000000..353f824d98
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/barcodes/generators/BarbecueBarcodeGenerator.java
@@ -0,0 +1,43 @@
+package com.baeldung.barcodes.generators;
+
+import net.sourceforge.barbecue.Barcode;
+import net.sourceforge.barbecue.BarcodeFactory;
+import net.sourceforge.barbecue.BarcodeImageHandler;
+
+import java.awt.*;
+import java.awt.image.BufferedImage;
+
+public class BarbecueBarcodeGenerator {
+
+ private static final Font BARCODE_TEXT_FONT = new Font(Font.SANS_SERIF, Font.PLAIN, 14);
+
+ public static BufferedImage generateUPCABarcodeImage(String barcodeText) throws Exception {
+ Barcode barcode = BarcodeFactory.createUPCA(barcodeText); //checksum is automatically added
+ barcode.setFont(BARCODE_TEXT_FONT);
+ barcode.setResolution(400);
+
+ return BarcodeImageHandler.getImage(barcode);
+ }
+
+ public static BufferedImage generateEAN13BarcodeImage(String barcodeText) throws Exception {
+ Barcode barcode = BarcodeFactory.createEAN13(barcodeText); //checksum is automatically added
+ barcode.setFont(BARCODE_TEXT_FONT);
+
+ return BarcodeImageHandler.getImage(barcode);
+ }
+
+ public static BufferedImage generateCode128BarcodeImage(String barcodeText) throws Exception {
+ Barcode barcode = BarcodeFactory.createCode128(barcodeText);
+ barcode.setFont(BARCODE_TEXT_FONT);
+
+ return BarcodeImageHandler.getImage(barcode);
+ }
+
+ public static BufferedImage generatePDF417BarcodeImage(String barcodeText) throws Exception {
+ Barcode barcode = BarcodeFactory.createPDF417(barcodeText);
+ barcode.setFont(BARCODE_TEXT_FONT);
+
+ return BarcodeImageHandler.getImage(barcode);
+ }
+
+}
diff --git a/libraries-3/src/main/java/com/baeldung/barcodes/generators/Barcode4jBarcodeGenerator.java b/libraries-3/src/main/java/com/baeldung/barcodes/generators/Barcode4jBarcodeGenerator.java
new file mode 100644
index 0000000000..a2fee044e5
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/barcodes/generators/Barcode4jBarcodeGenerator.java
@@ -0,0 +1,46 @@
+package com.baeldung.barcodes.generators;
+
+import org.krysalis.barcode4j.impl.code128.Code128Bean;
+import org.krysalis.barcode4j.impl.pdf417.PDF417Bean;
+import org.krysalis.barcode4j.impl.upcean.EAN13Bean;
+import org.krysalis.barcode4j.impl.upcean.UPCABean;
+import org.krysalis.barcode4j.output.bitmap.BitmapCanvasProvider;
+
+import java.awt.image.BufferedImage;
+
+public class Barcode4jBarcodeGenerator {
+
+ public static BufferedImage generateUPCABarcodeImage(String barcodeText) {
+ UPCABean barcodeGenerator = new UPCABean();
+ BitmapCanvasProvider canvas = new BitmapCanvasProvider(160, BufferedImage.TYPE_BYTE_BINARY, false, 0);
+
+ barcodeGenerator.generateBarcode(canvas, barcodeText);
+ return canvas.getBufferedImage();
+ }
+
+ public static BufferedImage generateEAN13BarcodeImage(String barcodeText) {
+ EAN13Bean barcodeGenerator = new EAN13Bean();
+ BitmapCanvasProvider canvas = new BitmapCanvasProvider(160, BufferedImage.TYPE_BYTE_BINARY, false, 0);
+
+ barcodeGenerator.generateBarcode(canvas, barcodeText);
+ return canvas.getBufferedImage();
+ }
+
+ public static BufferedImage generateCode128BarcodeImage(String barcodeText) {
+ Code128Bean barcodeGenerator = new Code128Bean();
+ BitmapCanvasProvider canvas = new BitmapCanvasProvider(160, BufferedImage.TYPE_BYTE_BINARY, false, 0);
+
+ barcodeGenerator.generateBarcode(canvas, barcodeText);
+ return canvas.getBufferedImage();
+ }
+
+ public static BufferedImage generatePDF417BarcodeImage(String barcodeText) {
+ PDF417Bean barcodeGenerator = new PDF417Bean();
+ BitmapCanvasProvider canvas = new BitmapCanvasProvider(160, BufferedImage.TYPE_BYTE_BINARY, false, 0);
+ barcodeGenerator.setColumns(10);
+
+ barcodeGenerator.generateBarcode(canvas, barcodeText);
+ return canvas.getBufferedImage();
+ }
+
+}
diff --git a/libraries-3/src/main/java/com/baeldung/barcodes/generators/QRGenBarcodeGenerator.java b/libraries-3/src/main/java/com/baeldung/barcodes/generators/QRGenBarcodeGenerator.java
new file mode 100644
index 0000000000..46d17ac500
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/barcodes/generators/QRGenBarcodeGenerator.java
@@ -0,0 +1,21 @@
+package com.baeldung.barcodes.generators;
+
+import net.glxn.qrgen.javase.QRCode;
+
+import javax.imageio.ImageIO;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+
+public class QRGenBarcodeGenerator {
+
+ public static BufferedImage generateQRCodeImage(String barcodeText) throws Exception {
+ ByteArrayOutputStream stream = QRCode
+ .from(barcodeText)
+ .withSize(250, 250)
+ .stream();
+ ByteArrayInputStream bis = new ByteArrayInputStream(stream.toByteArray());
+
+ return ImageIO.read(bis);
+ }
+}
diff --git a/libraries-3/src/main/java/com/baeldung/barcodes/generators/ZxingBarcodeGenerator.java b/libraries-3/src/main/java/com/baeldung/barcodes/generators/ZxingBarcodeGenerator.java
new file mode 100644
index 0000000000..e9aa2975da
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/barcodes/generators/ZxingBarcodeGenerator.java
@@ -0,0 +1,51 @@
+package com.baeldung.barcodes.generators;
+
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.client.j2se.MatrixToImageWriter;
+import com.google.zxing.common.BitMatrix;
+import com.google.zxing.oned.Code128Writer;
+import com.google.zxing.oned.EAN13Writer;
+import com.google.zxing.oned.UPCAWriter;
+import com.google.zxing.pdf417.PDF417Writer;
+import com.google.zxing.qrcode.QRCodeWriter;
+
+import java.awt.image.BufferedImage;
+
+public class ZxingBarcodeGenerator {
+
+ public static BufferedImage generateUPCABarcodeImage(String barcodeText) throws Exception {
+ UPCAWriter barcodeWriter = new UPCAWriter();
+ BitMatrix bitMatrix = barcodeWriter.encode(barcodeText, BarcodeFormat.UPC_A, 300, 150);
+
+ return MatrixToImageWriter.toBufferedImage(bitMatrix);
+ }
+
+ public static BufferedImage generateEAN13BarcodeImage(String barcodeText) throws Exception {
+ EAN13Writer barcodeWriter = new EAN13Writer();
+ BitMatrix bitMatrix = barcodeWriter.encode(barcodeText, BarcodeFormat.EAN_13, 300, 150);
+
+ return MatrixToImageWriter.toBufferedImage(bitMatrix);
+ }
+
+ public static BufferedImage generateCode128BarcodeImage(String barcodeText) throws Exception {
+ Code128Writer barcodeWriter = new Code128Writer();
+ BitMatrix bitMatrix = barcodeWriter.encode(barcodeText, BarcodeFormat.CODE_128, 300, 150);
+
+ return MatrixToImageWriter.toBufferedImage(bitMatrix);
+ }
+
+ public static BufferedImage generatePDF417BarcodeImage(String barcodeText) throws Exception {
+ PDF417Writer barcodeWriter = new PDF417Writer();
+ BitMatrix bitMatrix = barcodeWriter.encode(barcodeText, BarcodeFormat.PDF_417, 700, 700);
+
+ return MatrixToImageWriter.toBufferedImage(bitMatrix);
+ }
+
+ public static BufferedImage generateQRCodeImage(String barcodeText) throws Exception {
+ QRCodeWriter barcodeWriter = new QRCodeWriter();
+ BitMatrix bitMatrix = barcodeWriter.encode(barcodeText, BarcodeFormat.QR_CODE, 200, 200);
+
+ return MatrixToImageWriter.toBufferedImage(bitMatrix);
+ }
+
+}
\ No newline at end of file
diff --git a/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelper.java b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelper.java
new file mode 100644
index 0000000000..cc646c9e17
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelper.java
@@ -0,0 +1,36 @@
+package com.baeldung.cache2k;
+
+import java.util.Objects;
+
+import org.cache2k.Cache;
+import org.cache2k.Cache2kBuilder;
+
+public class ProductHelper {
+
+ private Cache cachedDiscounts;
+
+ private int cacheMissCount = 0;
+
+ public ProductHelper() {
+ cachedDiscounts = Cache2kBuilder.of(String.class, Integer.class)
+ .name("discount")
+ .eternal(true)
+ .entryCapacity(100)
+ .build();
+ }
+
+ public Integer getDiscount(String productType) {
+ Integer discount = cachedDiscounts.get(productType);
+ if (Objects.isNull(discount)) {
+ cacheMissCount++;
+ discount = "Sports".equalsIgnoreCase(productType) ? 20 : 10;
+ cachedDiscounts.put(productType, discount);
+ }
+ return discount;
+ }
+
+ public int getCacheMissCount() {
+ return cacheMissCount;
+ }
+
+}
diff --git a/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperUsingLoader.java b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperUsingLoader.java
new file mode 100644
index 0000000000..7b2ac4caa1
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperUsingLoader.java
@@ -0,0 +1,38 @@
+package com.baeldung.cache2k;
+
+import java.util.concurrent.TimeUnit;
+
+import org.cache2k.Cache;
+import org.cache2k.Cache2kBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ProductHelperUsingLoader {
+
+ final Logger LOGGER = LoggerFactory.getLogger(ProductHelperUsingLoader.class);
+
+ private Cache cachedDiscounts;
+
+ private int cacheMissCount = 0;
+
+ public ProductHelperUsingLoader() {
+ cachedDiscounts = Cache2kBuilder.of(String.class, Integer.class)
+ .name("discount-loader")
+ .expireAfterWrite(10, TimeUnit.MILLISECONDS)
+ .entryCapacity(100)
+ .loader((key) -> {
+ cacheMissCount++;
+ return "Sports".equalsIgnoreCase(key) ? 20 : 10;
+ })
+ .build();
+ }
+
+ public Integer getDiscount(String productType) {
+ return cachedDiscounts.get(productType);
+ }
+
+ public int getCacheMissCount() {
+ return cacheMissCount;
+ }
+
+}
diff --git a/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperWithEventListener.java b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperWithEventListener.java
new file mode 100644
index 0000000000..90c6ee3adf
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperWithEventListener.java
@@ -0,0 +1,46 @@
+package com.baeldung.cache2k;
+
+import java.util.concurrent.TimeUnit;
+
+import org.cache2k.Cache;
+import org.cache2k.Cache2kBuilder;
+import org.cache2k.CacheEntry;
+import org.cache2k.event.CacheEntryCreatedListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ProductHelperWithEventListener {
+
+ final Logger LOGGER = LoggerFactory.getLogger(ProductHelperWithEventListener.class);
+
+ private Cache cachedDiscounts;
+
+ private int cacheMissCount = 0;
+
+ public ProductHelperWithEventListener() {
+ cachedDiscounts = Cache2kBuilder.of(String.class, Integer.class)
+ .name("discount-listener")
+ .expireAfterWrite(10, TimeUnit.MILLISECONDS)
+ .entryCapacity(100)
+ .loader((key) -> {
+ cacheMissCount++;
+ return "Sports".equalsIgnoreCase(key) ? 20 : 10;
+ })
+ .addListener(new CacheEntryCreatedListener() {
+ @Override
+ public void onEntryCreated(Cache cache, CacheEntry entry) {
+ LOGGER.info("Entry created: [{}, {}].", entry.getKey(), entry.getValue());
+ }
+ })
+ .build();
+ }
+
+ public Integer getDiscount(String productType) {
+ return cachedDiscounts.get(productType);
+ }
+
+ public int getCacheMissCount() {
+ return cacheMissCount;
+ }
+
+}
diff --git a/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperWithExpiry.java b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperWithExpiry.java
new file mode 100644
index 0000000000..22b656fead
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperWithExpiry.java
@@ -0,0 +1,38 @@
+package com.baeldung.cache2k;
+
+import java.util.Objects;
+import java.util.concurrent.TimeUnit;
+
+import org.cache2k.Cache;
+import org.cache2k.Cache2kBuilder;
+
+public class ProductHelperWithExpiry {
+
+ private Cache cachedDiscounts;
+
+ private int cacheMissCount = 0;
+
+ public ProductHelperWithExpiry() {
+ cachedDiscounts = Cache2kBuilder.of(String.class, Integer.class)
+ .name("discount-expiry")
+ .expireAfterWrite(5, TimeUnit.MILLISECONDS)
+ .entryCapacity(100)
+ .build();
+
+ }
+
+ public Integer getDiscount(String productType) {
+ Integer discount = cachedDiscounts.get(productType);
+ if (Objects.isNull(discount)) {
+ cacheMissCount++;
+ discount = "Sports".equalsIgnoreCase(productType) ? 20 : 10;
+ cachedDiscounts.put(productType, discount);
+ }
+ return discount;
+ }
+
+ public int getCacheMissCount() {
+ return cacheMissCount;
+ }
+
+}
diff --git a/libraries-3/src/main/java/com/baeldung/cactoos/CactoosCollectionUtils.java b/libraries-3/src/main/java/com/baeldung/cactoos/CactoosCollectionUtils.java
new file mode 100644
index 0000000000..717c63ae63
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/cactoos/CactoosCollectionUtils.java
@@ -0,0 +1,28 @@
+package com.baeldung.cactoos;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.cactoos.collection.Filtered;
+import org.cactoos.iterable.IterableOf;
+import org.cactoos.list.ListOf;
+import org.cactoos.scalar.And;
+import org.cactoos.text.FormattedText;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class CactoosCollectionUtils {
+
+ final Logger LOGGER = LoggerFactory.getLogger(CactoosCollectionUtils.class);
+
+ public void iterateCollection(List strings) throws Exception {
+ new And((String input) -> LOGGER.info(new FormattedText("%s\n", input).asString()), strings).value();
+ }
+
+ public Collection getFilteredList(List strings) {
+ Collection filteredStrings = new ListOf<>(
+ new Filtered<>(string -> string.length() == 5, new IterableOf<>(strings)));
+ return filteredStrings;
+ }
+
+}
diff --git a/libraries-3/src/main/java/com/baeldung/cactoos/CactoosStringUtils.java b/libraries-3/src/main/java/com/baeldung/cactoos/CactoosStringUtils.java
new file mode 100644
index 0000000000..3e2903ebf4
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/cactoos/CactoosStringUtils.java
@@ -0,0 +1,37 @@
+package com.baeldung.cactoos;
+
+import java.io.IOException;
+
+import org.cactoos.text.FormattedText;
+import org.cactoos.text.IsBlank;
+import org.cactoos.text.Lowered;
+import org.cactoos.text.TextOf;
+import org.cactoos.text.Upper;
+
+public class CactoosStringUtils {
+
+ public String createString() throws IOException {
+ String testString = new TextOf("Test String").asString();
+ return testString;
+ }
+
+ public String createdFormattedString(String stringToFormat) throws IOException {
+ String formattedString = new FormattedText("Hello %s", stringToFormat).asString();
+ return formattedString;
+ }
+
+ public String toLowerCase(String testString) throws IOException {
+ String lowerCaseString = new Lowered(new TextOf(testString)).asString();
+ return lowerCaseString;
+ }
+
+ public String toUpperCase(String testString) throws Exception {
+ String upperCaseString = new Upper(new TextOf(testString)).asString();
+ return upperCaseString;
+ }
+
+ public boolean isBlank(String testString) throws Exception {
+ return new IsBlank(new TextOf(testString)) != null;
+ }
+
+}
diff --git a/libraries-3/src/main/java/com/baeldung/jcabi/JcabiAspectJ.java b/libraries-3/src/main/java/com/baeldung/jcabi/JcabiAspectJ.java
new file mode 100644
index 0000000000..6bd345c59c
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/jcabi/JcabiAspectJ.java
@@ -0,0 +1,112 @@
+package com.baeldung.jcabi;
+
+
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
+import com.jcabi.aspects.Async;
+import com.jcabi.aspects.Cacheable;
+import com.jcabi.aspects.LogExceptions;
+import com.jcabi.aspects.Loggable;
+import com.jcabi.aspects.Quietly;
+import com.jcabi.aspects.RetryOnFailure;
+import com.jcabi.aspects.UnitedThrow;
+
+public class JcabiAspectJ {
+
+ public static void main(String[] args) {
+ try {
+ displayFactorial(10);
+ getFactorial(10).get();
+
+ String result = cacheExchangeRates();
+ if (result != cacheExchangeRates()) {
+ System.out.println(result);
+ }
+
+ divideByZero();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ divideByZeroQuietly();
+ try {
+ processFile();
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ @Loggable
+ @Async
+ public static void displayFactorial(int number) {
+ long result = factorial(number);
+ System.out.println(result);
+ }
+
+ @Loggable
+ @Async
+ public static Future getFactorial(int number) {
+ Future factorialFuture = CompletableFuture.supplyAsync(() -> factorial(number));
+ return factorialFuture;
+ }
+
+ /**
+ * Finds factorial of a number
+ * @param number
+ * @return
+ */
+ public static long factorial(int number) {
+ long result = 1;
+ for(int i=number;i>0;i--) {
+ result *= i;
+ }
+ return result;
+ }
+
+ @Loggable
+ @Cacheable(lifetime = 2, unit = TimeUnit.SECONDS)
+ public static String cacheExchangeRates() {
+ String result = null;
+ try {
+ URL exchangeRateUrl = new URL("https://api.exchangeratesapi.io/latest");
+ URLConnection con = exchangeRateUrl.openConnection();
+ BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
+ result = in.readLine();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return result;
+ }
+
+ @LogExceptions
+ public static void divideByZero() {
+ int x = 1/0;
+ }
+
+ @RetryOnFailure(attempts = 2, types = {java.lang.NumberFormatException.class})
+ @Quietly
+ public static void divideByZeroQuietly() {
+ int x = 1/0;
+ }
+
+ @UnitedThrow(IllegalStateException.class)
+ public static void processFile() throws IOException, InterruptedException {
+ BufferedReader reader = new BufferedReader(new FileReader("baeldung.txt"));
+ reader.readLine();
+
+ Thread thread = new Thread();
+ thread.wait(2000);
+ }
+
+}
diff --git a/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperUnitTest.java b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperUnitTest.java
new file mode 100644
index 0000000000..e9b495279a
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperUnitTest.java
@@ -0,0 +1,18 @@
+package com.baeldung.cache2k;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class ProductHelperUnitTest {
+
+ @Test
+ public void whenInvokedGetDiscountTwice_thenGetItFromCache() {
+ ProductHelper productHelper = new ProductHelper();
+ assertTrue(productHelper.getCacheMissCount() == 0);
+ assertTrue(productHelper.getDiscount("Sports") == 20);
+ assertTrue(productHelper.getDiscount("Sports") == 20);
+ assertTrue(productHelper.getCacheMissCount() == 1);
+ }
+
+}
diff --git a/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperUsingLoaderUnitTest.java b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperUsingLoaderUnitTest.java
new file mode 100644
index 0000000000..3ad77aa2de
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperUsingLoaderUnitTest.java
@@ -0,0 +1,21 @@
+package com.baeldung.cache2k;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class ProductHelperUsingLoaderUnitTest {
+
+ @Test
+ public void whenInvokedGetDiscount_thenPopulateCacheUsingLoader() {
+ ProductHelperUsingLoader productHelper = new ProductHelperUsingLoader();
+ assertTrue(productHelper.getCacheMissCount() == 0);
+
+ assertTrue(productHelper.getDiscount("Sports") == 20);
+ assertTrue(productHelper.getCacheMissCount() == 1);
+
+ assertTrue(productHelper.getDiscount("Electronics") == 10);
+ assertTrue(productHelper.getCacheMissCount() == 2);
+ }
+
+}
diff --git a/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperWithEventListenerUnitTest.java b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperWithEventListenerUnitTest.java
new file mode 100644
index 0000000000..9aeb9f0552
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperWithEventListenerUnitTest.java
@@ -0,0 +1,15 @@
+package com.baeldung.cache2k;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class ProductHelperWithEventListenerUnitTest {
+
+ @Test
+ public void whenEntryAddedInCache_thenEventListenerCalled() {
+ ProductHelperWithEventListener productHelper = new ProductHelperWithEventListener();
+ assertTrue(productHelper.getDiscount("Sports") == 20);
+ }
+
+}
diff --git a/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperWithExpiryUnitTest.java b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperWithExpiryUnitTest.java
new file mode 100644
index 0000000000..a3303ca0aa
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperWithExpiryUnitTest.java
@@ -0,0 +1,22 @@
+package com.baeldung.cache2k;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class ProductHelperWithExpiryUnitTest {
+
+ @Test
+ public void whenInvokedGetDiscountAfterExpiration_thenDiscountCalculatedAgain() throws InterruptedException {
+ ProductHelperWithExpiry productHelper = new ProductHelperWithExpiry();
+ assertTrue(productHelper.getCacheMissCount() == 0);
+ assertTrue(productHelper.getDiscount("Sports") == 20);
+ assertTrue(productHelper.getCacheMissCount() == 1);
+
+ Thread.sleep(20);
+
+ assertTrue(productHelper.getDiscount("Sports") == 20);
+ assertTrue(productHelper.getCacheMissCount() == 2);
+ }
+
+}
diff --git a/libraries-3/src/test/java/com/baeldung/cactoos/CactoosCollectionUtilsUnitTest.java b/libraries-3/src/test/java/com/baeldung/cactoos/CactoosCollectionUtilsUnitTest.java
new file mode 100644
index 0000000000..c6bcbd7df7
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/cactoos/CactoosCollectionUtilsUnitTest.java
@@ -0,0 +1,35 @@
+package com.baeldung.cactoos;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.ArrayList;
+
+import org.junit.Test;
+
+public class CactoosCollectionUtilsUnitTest {
+
+ @Test
+ public void whenFilteredClassIsCalledWithSpecificArgs_thenCorrespondingFilteredCollectionShouldBeReturned() throws IOException {
+
+ CactoosCollectionUtils obj = new CactoosCollectionUtils();
+
+ // when
+ List strings = new ArrayList() {
+ {
+ add("Hello");
+ add("John");
+ add("Smith");
+ add("Eric");
+ add("Dizzy");
+ }
+ };
+ int size = obj.getFilteredList(strings).size();
+
+ // then
+ assertEquals(3, size);
+
+ }
+
+}
diff --git a/libraries-3/src/test/java/com/baeldung/cactoos/CactoosStringUtilsUnitTest.java b/libraries-3/src/test/java/com/baeldung/cactoos/CactoosStringUtilsUnitTest.java
new file mode 100644
index 0000000000..67dd6d91e4
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/cactoos/CactoosStringUtilsUnitTest.java
@@ -0,0 +1,54 @@
+package com.baeldung.cactoos;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+public class CactoosStringUtilsUnitTest {
+
+ @Test
+ public void whenFormattedTextIsPassedWithArgs_thenFormattedStringIsReturned() throws IOException {
+
+ CactoosStringUtils obj = new CactoosStringUtils();
+
+ // when
+ String formattedString = obj.createdFormattedString("John");
+
+ // then
+ assertEquals("Hello John", formattedString);
+
+ }
+
+ @Test
+ public void whenStringIsPassesdToLoweredOrUpperClass_thenCorrespondingStringIsReturned() throws Exception {
+
+ CactoosStringUtils obj = new CactoosStringUtils();
+
+ // when
+ String lowerCaseString = obj.toLowerCase("TeSt StrIng");
+ String upperCaseString = obj.toUpperCase("TeSt StrIng");
+
+ // then
+ assertEquals("test string", lowerCaseString);
+ assertEquals("TEST STRING", upperCaseString);
+
+ }
+
+ @Test
+ public void whenEmptyStringIsPassesd_thenIsBlankReturnsTrue() throws Exception {
+
+ CactoosStringUtils obj = new CactoosStringUtils();
+
+ // when
+ boolean isBlankEmptyString = obj.isBlank("");
+ boolean isBlankNull = obj.isBlank(null);
+
+ // then
+ assertEquals(true, isBlankEmptyString);
+ assertEquals(true, isBlankNull);
+
+ }
+
+}
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/AlternativeAdapterUnitTest.java b/libraries-3/src/test/java/com/baeldung/moshi/AlternativeAdapterUnitTest.java
new file mode 100644
index 0000000000..63d80bfe58
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/moshi/AlternativeAdapterUnitTest.java
@@ -0,0 +1,105 @@
+package com.baeldung.moshi;
+
+import java.io.IOException;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.time.Instant;
+
+import com.squareup.moshi.FromJson;
+import com.squareup.moshi.JsonAdapter;
+import com.squareup.moshi.JsonQualifier;
+import com.squareup.moshi.Moshi;
+import com.squareup.moshi.ToJson;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.junit.Test;
+
+public class AlternativeAdapterUnitTest {
+ @Test
+ public void whenSerializing_thenAlternativeAdapterUsed() {
+ Moshi moshi = new Moshi.Builder()
+ .add(new EpochMillisAdapter())
+ .build();
+ JsonAdapter jsonAdapter = moshi.adapter(Post.class);
+
+ String json = jsonAdapter.toJson(new Post("Introduction to Moshi Json", "Baeldung", Instant.now()));
+ System.out.println(json);
+ }
+
+ @Test
+ public void whenDeserializing_thenAlternativeAdapterUsed() throws IOException {
+ Moshi moshi = new Moshi.Builder()
+ .add(new EpochMillisAdapter())
+ .build();
+ JsonAdapter jsonAdapter = moshi.adapter(Post.class);
+
+ String json = "{\"author\":\"Baeldung\",\"posted\":1582095269204,\"title\":\"Introduction to Moshi Json\"}";
+ Post post = jsonAdapter.fromJson(json);
+ System.out.println(post);
+
+ }
+
+ public static class Post {
+ String title;
+ String author;
+ @EpochMillis Instant posted;
+
+ public Post() {
+ }
+
+ public Post(String title, String author, Instant posted) {
+ this.title = title;
+ this.author = author;
+ this.posted = posted;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getAuthor() {
+ return author;
+ }
+
+ public void setAuthor(String author) {
+ this.author = author;
+ }
+
+ public Instant getPosted() {
+ return posted;
+ }
+
+ public void setPosted(Instant posted) {
+ this.posted = posted;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("title", title).append("author", author).append("posted", posted)
+ .toString();
+ }
+ }
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
+ @JsonQualifier
+ public @interface EpochMillis {
+ }
+
+ public static class EpochMillisAdapter {
+ @ToJson
+ public Long toJson(@EpochMillis Instant input) {
+ return input.toEpochMilli();
+ }
+ @FromJson
+ @EpochMillis
+ public Instant fromJson(Long input) {
+ return Instant.ofEpochMilli(input);
+ }
+
+ }
+}
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/ArrayUnitTest.java b/libraries-3/src/test/java/com/baeldung/moshi/ArrayUnitTest.java
new file mode 100644
index 0000000000..83bb2bb128
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/moshi/ArrayUnitTest.java
@@ -0,0 +1,36 @@
+package com.baeldung.moshi;
+
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.util.Arrays;
+import java.util.List;
+
+import com.squareup.moshi.JsonAdapter;
+import com.squareup.moshi.Moshi;
+import com.squareup.moshi.Types;
+import org.junit.Test;
+
+public class ArrayUnitTest {
+ @Test
+ public void whenSerializingList_thenJsonArrayProduced() {
+ Moshi moshi = new Moshi.Builder()
+ .build();
+ Type type = Types.newParameterizedType(List.class, String.class);
+ JsonAdapter> jsonAdapter = moshi.adapter(type);
+
+ String json = jsonAdapter.toJson(Arrays.asList("One", "Two", "Three"));
+ System.out.println(json);
+ }
+
+ @Test
+ public void whenDeserializingJsonArray_thenListProduced() throws IOException {
+ Moshi moshi = new Moshi.Builder()
+ .build();
+ Type type = Types.newParameterizedType(List.class, String.class);
+ JsonAdapter> jsonAdapter = moshi.adapter(type);
+
+ String json = "[\"One\",\"Two\",\"Three\"]";
+ List result = jsonAdapter.fromJson(json);
+ System.out.println(result);
+ }
+}
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/ComplexAdapterUnitTest.java b/libraries-3/src/test/java/com/baeldung/moshi/ComplexAdapterUnitTest.java
new file mode 100644
index 0000000000..f0f8e9a95d
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/moshi/ComplexAdapterUnitTest.java
@@ -0,0 +1,94 @@
+package com.baeldung.moshi;
+
+import java.io.IOException;
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+
+import com.squareup.moshi.FromJson;
+import com.squareup.moshi.JsonAdapter;
+import com.squareup.moshi.Moshi;
+import com.squareup.moshi.ToJson;
+import org.junit.Test;
+
+public class ComplexAdapterUnitTest {
+ @Test
+ public void whenSerializing_thenCorrectJsonProduced() {
+ Moshi moshi = new Moshi.Builder()
+ .add(new JsonDateTimeAdapter())
+ .build();
+ JsonAdapter jsonAdapter = moshi.adapter(ZonedDateTime.class);
+
+ String json = jsonAdapter.toJson(ZonedDateTime.now());
+ System.out.println(json);
+ }
+
+ @Test
+ public void whenDeserializing_thenCorrectJsonConsumed() throws IOException {
+ Moshi moshi = new Moshi.Builder()
+ .add(new JsonDateTimeAdapter())
+ .build();
+ JsonAdapter jsonAdapter = moshi.adapter(ZonedDateTime.class);
+
+ String json = "{\"date\":\"2020-02-17\",\"time\":\"07:53:27.064\",\"timezone\":\"Europe/London\"}";
+ ZonedDateTime now = jsonAdapter.fromJson(json);
+ System.out.println(now);
+
+ }
+
+ public static class JsonDateTimeAdapter {
+ @ToJson
+ public JsonDateTime toJson(ZonedDateTime input) {
+ String date = input.toLocalDate().toString();
+ String time = input.toLocalTime().toString();
+ String timezone = input.getZone().toString();
+ return new JsonDateTime(date, time, timezone);
+ }
+ @FromJson
+ public ZonedDateTime fromJson(JsonDateTime input) {
+ LocalDate date = LocalDate.parse(input.getDate());
+ LocalTime time = LocalTime.parse(input.getTime());
+ ZoneId timezone = ZoneId.of(input.getTimezone());
+ return ZonedDateTime.of(date, time, timezone);
+ }
+ }
+ public static class JsonDateTime {
+ private String date;
+ private String time;
+ private String timezone;
+
+ public JsonDateTime() {
+ }
+
+ public JsonDateTime(String date, String time, String timezone) {
+ this.date = date;
+ this.time = time;
+ this.timezone = timezone;
+ }
+
+ public String getDate() {
+ return date;
+ }
+
+ public void setDate(String date) {
+ this.date = date;
+ }
+
+ public String getTime() {
+ return time;
+ }
+
+ public void setTime(String time) {
+ this.time = time;
+ }
+
+ public String getTimezone() {
+ return timezone;
+ }
+
+ public void setTimezone(String timezone) {
+ this.timezone = timezone;
+ }
+ }
+}
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/DefaultUnitTest.java b/libraries-3/src/test/java/com/baeldung/moshi/DefaultUnitTest.java
new file mode 100644
index 0000000000..0b4ecc23a5
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/moshi/DefaultUnitTest.java
@@ -0,0 +1,68 @@
+package com.baeldung.moshi;
+
+import java.io.IOException;
+import java.time.Instant;
+
+import com.squareup.moshi.JsonAdapter;
+import com.squareup.moshi.Moshi;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.junit.Test;
+
+public class DefaultUnitTest {
+
+ @Test
+ public void whenDeserializing_thenFieldsGetDefaultValues() throws IOException {
+ Moshi moshi = new Moshi.Builder()
+ .build();
+ JsonAdapter jsonAdapter = moshi.adapter(Post.class);
+
+ String json = "{\"title\":\"My Post\"}";
+ Post post = jsonAdapter.fromJson(json);
+ System.out.println(post);
+ }
+ public static class Post {
+ private String title;
+ private String author;
+ private String posted;
+
+ public Post() {
+ posted = Instant.now().toString();
+ }
+
+ public Post(String title, String author, String posted) {
+ this.title = title;
+ this.author = author;
+ this.posted = posted;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getAuthor() {
+ return author;
+ }
+
+ public void setAuthor(String author) {
+ this.author = author;
+ }
+
+ public String getPosted() {
+ return posted;
+ }
+
+ public void setPosted(String posted) {
+ this.posted = posted;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("title", title).append("author", author).append("posted", posted)
+ .toString();
+ }
+ }
+}
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/PrimitiveUnitTest.java b/libraries-3/src/test/java/com/baeldung/moshi/PrimitiveUnitTest.java
new file mode 100644
index 0000000000..e26e93ba8c
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/moshi/PrimitiveUnitTest.java
@@ -0,0 +1,77 @@
+package com.baeldung.moshi;
+
+import java.io.IOException;
+
+import com.squareup.moshi.JsonAdapter;
+import com.squareup.moshi.Moshi;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.junit.Test;
+
+public class PrimitiveUnitTest {
+ @Test
+ public void whenSerializing_thenCorrectJsonProduced() {
+ Moshi moshi = new Moshi.Builder()
+ .build();
+ JsonAdapter jsonAdapter = moshi.adapter(Post.class);
+
+ Post post = new Post("My Post", "Baeldung", "This is my post");
+ String json = jsonAdapter.toJson(post);
+ System.out.println(json);
+ }
+
+ @Test
+ public void whenDeserializing_thenCorrectJsonConsumed() throws IOException {
+ Moshi moshi = new Moshi.Builder()
+ .build();
+ JsonAdapter jsonAdapter = moshi.adapter(Post.class);
+
+ String json = "{\"author\":\"Baeldung\",\"text\":\"This is my post\",\"title\":\"My Post\"}";
+ Post post = jsonAdapter.fromJson(json);
+ System.out.println(post);
+ }
+
+ public static class Post {
+ private String title;
+ private String author;
+ private String text;
+
+ public Post() {
+ }
+
+ public Post(String title, String author, String text) {
+ this.title = title;
+ this.author = author;
+ this.text = text;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getAuthor() {
+ return author;
+ }
+
+ public void setAuthor(String author) {
+ this.author = author;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("title", title).append("author", author).append("text", text)
+ .toString();
+ }
+ }
+}
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/RenameUnitTest.java b/libraries-3/src/test/java/com/baeldung/moshi/RenameUnitTest.java
new file mode 100644
index 0000000000..2118538a19
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/moshi/RenameUnitTest.java
@@ -0,0 +1,68 @@
+package com.baeldung.moshi;
+
+import java.io.IOException;
+
+import com.squareup.moshi.Json;
+import com.squareup.moshi.JsonAdapter;
+import com.squareup.moshi.Moshi;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.junit.jupiter.api.Test;
+
+public class RenameUnitTest {
+
+ @Test
+ public void whenSerializing_thenFieldsGetRenamed() {
+ Moshi moshi = new Moshi.Builder()
+ .build();
+ JsonAdapter jsonAdapter = moshi.adapter(Post.class);
+
+ Post post = new Post("My Post", "Baeldung");
+ String json = jsonAdapter.toJson(post);
+ System.out.println(json);
+ }
+
+ @Test
+ public void whenSerializing_thenRenamedFieldsGetConsumed() throws IOException {
+ Moshi moshi = new Moshi.Builder()
+ .build();
+ JsonAdapter jsonAdapter = moshi.adapter(Post.class);
+
+ String json = "{\"authored_by\":\"Baeldung\",\"title\":\"My Post\"}";
+ Post post = jsonAdapter.fromJson(json);
+ System.out.println(post);
+ }
+ public static class Post {
+ private String title;
+ @Json(name = "authored_by")
+ private String author;
+
+ public Post() {
+ }
+
+ public Post(String title, String author) {
+ this.title = title;
+ this.author = author;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getAuthor() {
+ return author;
+ }
+
+ public void setAuthor(String author) {
+ this.author = author;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("title", title).append("author", author).toString();
+ }
+ }
+}
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/SimpleAdapterUnitTest.java b/libraries-3/src/test/java/com/baeldung/moshi/SimpleAdapterUnitTest.java
new file mode 100644
index 0000000000..e0be2f8a66
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/moshi/SimpleAdapterUnitTest.java
@@ -0,0 +1,129 @@
+package com.baeldung.moshi;
+
+import java.io.IOException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import com.squareup.moshi.FromJson;
+import com.squareup.moshi.JsonAdapter;
+import com.squareup.moshi.Moshi;
+import com.squareup.moshi.ToJson;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.junit.Test;
+
+public class SimpleAdapterUnitTest {
+ @Test
+ public void whenSerializing_thenAdapterUsed() {
+ Moshi moshi = new Moshi.Builder()
+ .add(new AuthorAdapter())
+ .build();
+ JsonAdapter jsonAdapter = moshi.adapter(Post.class);
+
+ Post post = new Post("My Post", new Author("Baeldung", "baeldung@example.com"), "This is my post");
+ String json = jsonAdapter.toJson(post);
+ System.out.println(json);
+ }
+
+ @Test
+ public void whenDeserializing_thenAdapterUsed() throws IOException {
+ Moshi moshi = new Moshi.Builder()
+ .add(new AuthorAdapter())
+ .build();
+ JsonAdapter jsonAdapter = moshi.adapter(Post.class);
+
+ String json = "{\"author\":\"Baeldung \",\"text\":\"This is my post\",\"title\":\"My Post\"}";
+ Post post = jsonAdapter.fromJson(json);
+ System.out.println(post);
+ }
+ public static class AuthorAdapter {
+ private Pattern pattern = Pattern.compile("^(.*) <(.*)>$");
+ @ToJson
+ public String toJson(Author author) {
+ return author.name + " <" + author.email + ">";
+ }
+
+ @FromJson
+ public Author fromJson(String author) {
+ Matcher matcher = pattern.matcher(author);
+ return matcher.find() ? new Author(matcher.group(1), matcher.group(2)) : null;
+ }
+ }
+
+ public static class Author {
+ private String name;
+ private String email;
+
+ public Author() {
+ }
+
+ public Author(String name, String email) {
+ this.name = name;
+ this.email = email;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("name", name).append("email", email).toString();
+ }
+ }
+ public static class Post {
+ private String title;
+ private Author author;
+ private String text;
+
+ public Post() {
+ }
+
+ public Post(String title, Author author, String text) {
+ this.title = title;
+ this.author = author;
+ this.text = text;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public Author getAuthor() {
+ return author;
+ }
+
+ public void setAuthor(Author author) {
+ this.author = author;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("title", title).append("author", author).append("text", text)
+ .toString();
+ }
+ }
+}
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/TransientUnitTest.java b/libraries-3/src/test/java/com/baeldung/moshi/TransientUnitTest.java
new file mode 100644
index 0000000000..2554e937b3
--- /dev/null
+++ b/libraries-3/src/test/java/com/baeldung/moshi/TransientUnitTest.java
@@ -0,0 +1,66 @@
+package com.baeldung.moshi;
+
+import java.io.IOException;
+
+import com.squareup.moshi.JsonAdapter;
+import com.squareup.moshi.Moshi;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.junit.jupiter.api.Test;
+
+public class TransientUnitTest {
+
+ @Test
+ public void whenSerializing_thenTransientFieldIgnored() {
+ Moshi moshi = new Moshi.Builder()
+ .build();
+ JsonAdapter jsonAdapter = moshi.adapter(Post.class);
+
+ Post post = new Post("My Post", "Baeldung");
+ String json = jsonAdapter.toJson(post);
+ System.out.println(json);
+ }
+
+ @Test
+ public void whenDeserializing_thenTransientFieldIgnored() throws IOException {
+ Moshi moshi = new Moshi.Builder()
+ .build();
+ JsonAdapter jsonAdapter = moshi.adapter(Post.class);
+
+ String json = "{\"authored_by\":\"Baeldung\",\"title\":\"My Post\"}";
+ Post post = jsonAdapter.fromJson(json);
+ System.out.println(post);
+ }
+ public static class Post {
+ private String title;
+ private transient String author;
+
+ public Post() {
+ }
+
+ public Post(String title, String author) {
+ this.title = title;
+ this.author = author;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getAuthor() {
+ return author;
+ }
+
+ public void setAuthor(String author) {
+ this.author = author;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("title", title).append("author", author).toString();
+ }
+ }
+}
diff --git a/libraries-data-db/pom.xml b/libraries-data-db/pom.xml
index 682a6ed185..f028ffe8c3 100644
--- a/libraries-data-db/pom.xml
+++ b/libraries-data-db/pom.xml
@@ -183,7 +183,7 @@
io.ebean
ebean-maven-plugin
- 11.11.2
+ ${ebean.plugin.version}
@@ -202,6 +202,7 @@
+ 11.11.2
16.5.1
3.0.0
1.8
diff --git a/libraries-data-io/src/test/java/com/baeldung/libraries/snakeyaml/MultiLineStringsUnitTest.java b/libraries-data-io/src/test/java/com/baeldung/libraries/snakeyaml/MultiLineStringsUnitTest.java
new file mode 100644
index 0000000000..836ac86339
--- /dev/null
+++ b/libraries-data-io/src/test/java/com/baeldung/libraries/snakeyaml/MultiLineStringsUnitTest.java
@@ -0,0 +1,90 @@
+package com.baeldung.libraries.snakeyaml;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.yaml.snakeyaml.Yaml;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+
+public class MultiLineStringsUnitTest {
+
+ private Yaml yaml;
+
+ @Before
+ public void setup() {
+ yaml = new Yaml();
+ }
+
+ @Test
+ public void whenLiteral_ThenLineBreaksArePresent() {
+ String key = parseYamlKey("literal.yaml", "key");
+ assertEquals("Line1\nLine2\nLine3", key);
+ }
+
+ @Test
+ public void whenLiteral_ThenEndingBreaksAreReducedToOne() {
+ String key = parseYamlKey("literal2.yaml", "key");
+ assertEquals("\n\nLine1\n\nLine2\n\nLine3\n", key);
+ }
+
+ @Test
+ public void whenFolded_ThenLineBreaksAreReplaced() {
+ String key = parseYamlKey("folded.yaml", "key");
+ assertEquals("Line1 Line2 Line3", key);
+ }
+
+ @Test
+ public void whenFolded_ThenEmptyLinesAreReducedToOne() {
+ String key = parseYamlKey("folded2.yaml", "key");
+ assertEquals("Line1 Line2\n\nLine3\n", key);
+ }
+
+ @Test
+ public void whenLiteralKeep_ThenLastEmptyLinesArePresent() {
+ String key = parseYamlKey("literal_keep.yaml", "key");
+ assertEquals("Line1\nLine2\nLine3\n\n", key);
+ }
+
+ @Test
+ public void whenLiteralStrip_ThenLastEmptyLinesAreRemoved() {
+ String key = parseYamlKey("literal_strip.yaml", "key");
+ assertEquals("Line1\nLine2\nLine3", key);
+ }
+
+ @Test
+ public void whenFoldedKeep_ThenLastEmptyLinesArePresent() {
+ String key = parseYamlKey("folded_keep.yaml", "key");
+ assertEquals("Line1 Line2 Line3\n\n\n", key);
+ }
+
+ @Test
+ public void whenFoldedStrip_ThenLastEmptyLinesAreRemoved() {
+ String key = parseYamlKey("folded_strip.yaml", "key");
+ assertEquals("Line1 Line2 Line3", key);
+ }
+
+ @Test
+ public void whenDoubleQuotes_ThenExplicitBreaksArePreserved() {
+ String key = parseYamlKey("plain_double_quotes.yaml", "key");
+ assertEquals("Line1\nLine2\nLine3", key);
+ }
+
+ @Test
+ public void whenSingleQuotes_ThenExplicitBreaksAreIgnored() {
+ String key = parseYamlKey("plain_single_quotes.yaml", "key");
+ assertEquals("Line1\\nLine2\nLine3", key);
+ }
+
+ String parseYamlKey(String fileName, String key) {
+ InputStream inputStream = this.getClass()
+ .getClassLoader()
+ .getResourceAsStream("yaml" + File.separator + "multiline" + File.separator + fileName);
+ Map parsed = yaml.load(inputStream);
+ return parsed.get(key);
+ }
+
+}
diff --git a/libraries-data-io/src/test/resources/yaml/multiline/folded.yaml b/libraries-data-io/src/test/resources/yaml/multiline/folded.yaml
new file mode 100644
index 0000000000..c5fa743a08
--- /dev/null
+++ b/libraries-data-io/src/test/resources/yaml/multiline/folded.yaml
@@ -0,0 +1,4 @@
+key: >
+ Line1
+ Line2
+ Line3
\ No newline at end of file
diff --git a/libraries-data-io/src/test/resources/yaml/multiline/folded2.yaml b/libraries-data-io/src/test/resources/yaml/multiline/folded2.yaml
new file mode 100644
index 0000000000..735abf9b2f
--- /dev/null
+++ b/libraries-data-io/src/test/resources/yaml/multiline/folded2.yaml
@@ -0,0 +1,8 @@
+key: >
+ Line1
+ Line2
+
+
+ Line3
+
+
diff --git a/libraries-data-io/src/test/resources/yaml/multiline/folded_keep.yaml b/libraries-data-io/src/test/resources/yaml/multiline/folded_keep.yaml
new file mode 100644
index 0000000000..555291fd26
--- /dev/null
+++ b/libraries-data-io/src/test/resources/yaml/multiline/folded_keep.yaml
@@ -0,0 +1,6 @@
+key: >+
+ Line1
+ Line2
+ Line3
+
+
diff --git a/libraries-data-io/src/test/resources/yaml/multiline/folded_strip.yaml b/libraries-data-io/src/test/resources/yaml/multiline/folded_strip.yaml
new file mode 100644
index 0000000000..0a3a246dc2
--- /dev/null
+++ b/libraries-data-io/src/test/resources/yaml/multiline/folded_strip.yaml
@@ -0,0 +1,7 @@
+key: >-
+ Line1
+ Line2
+ Line3
+
+
+
diff --git a/libraries-data-io/src/test/resources/yaml/multiline/literal.yaml b/libraries-data-io/src/test/resources/yaml/multiline/literal.yaml
new file mode 100644
index 0000000000..7e02501a33
--- /dev/null
+++ b/libraries-data-io/src/test/resources/yaml/multiline/literal.yaml
@@ -0,0 +1,4 @@
+key: |
+ Line1
+ Line2
+ Line3
\ No newline at end of file
diff --git a/libraries-data-io/src/test/resources/yaml/multiline/literal2.yaml b/libraries-data-io/src/test/resources/yaml/multiline/literal2.yaml
new file mode 100644
index 0000000000..7c7fed0163
--- /dev/null
+++ b/libraries-data-io/src/test/resources/yaml/multiline/literal2.yaml
@@ -0,0 +1,10 @@
+key: |
+
+
+ Line1
+
+ Line2
+
+ Line3
+
+
diff --git a/libraries-data-io/src/test/resources/yaml/multiline/literal_keep.yaml b/libraries-data-io/src/test/resources/yaml/multiline/literal_keep.yaml
new file mode 100644
index 0000000000..37f22684dd
--- /dev/null
+++ b/libraries-data-io/src/test/resources/yaml/multiline/literal_keep.yaml
@@ -0,0 +1,5 @@
+key: |+
+ Line1
+ Line2
+ Line3
+
diff --git a/libraries-data-io/src/test/resources/yaml/multiline/literal_strip.yaml b/libraries-data-io/src/test/resources/yaml/multiline/literal_strip.yaml
new file mode 100644
index 0000000000..0791e13d5d
--- /dev/null
+++ b/libraries-data-io/src/test/resources/yaml/multiline/literal_strip.yaml
@@ -0,0 +1,5 @@
+key: |-
+ Line1
+ Line2
+ Line3
+
diff --git a/libraries-data-io/src/test/resources/yaml/multiline/plain_double_quotes.yaml b/libraries-data-io/src/test/resources/yaml/multiline/plain_double_quotes.yaml
new file mode 100644
index 0000000000..ccab040a27
--- /dev/null
+++ b/libraries-data-io/src/test/resources/yaml/multiline/plain_double_quotes.yaml
@@ -0,0 +1 @@
+key: "Line1\nLine2\nLine3"
\ No newline at end of file
diff --git a/libraries-data-io/src/test/resources/yaml/multiline/plain_single_quotes.yaml b/libraries-data-io/src/test/resources/yaml/multiline/plain_single_quotes.yaml
new file mode 100644
index 0000000000..acbf35a462
--- /dev/null
+++ b/libraries-data-io/src/test/resources/yaml/multiline/plain_single_quotes.yaml
@@ -0,0 +1,3 @@
+key: 'Line1\nLine2
+
+ Line3'
\ No newline at end of file
diff --git a/libraries-data/pom.xml b/libraries-data/pom.xml
index 2086ecb614..1267982c49 100644
--- a/libraries-data/pom.xml
+++ b/libraries-data/pom.xml
@@ -74,19 +74,19 @@
commons-cli
commons-cli
- 1.2
+ ${commons.cli.version}
provided
commons-io
commons-io
- 2.1
+ ${commons.io.version}
provided
commons-httpclient
commons-httpclient
- 3.0.1
+ ${httpclient.version}
provided
@@ -133,7 +133,7 @@
org.apache.maven.plugins
maven-assembly-plugin
- 2.3
+ ${assembly.plugin.version}
src/main/resources/assembly/hadoop-job.xml
@@ -158,6 +158,10 @@
+ 2.3
+ 1.2
+ 2.1
+ 3.0.1
1.2.2
1.0.0
2.4.0
diff --git a/libraries-http/README.md b/libraries-http/README.md
index f5afb2d277..1f065a9d4a 100644
--- a/libraries-http/README.md
+++ b/libraries-http/README.md
@@ -12,3 +12,5 @@ This module contains articles about HTTP libraries.
- [Introduction to Retrofit](https://www.baeldung.com/retrofit)
- [A Guide to Unirest](https://www.baeldung.com/unirest)
- [Creating REST Microservices with Javalin](https://www.baeldung.com/javalin-rest-microservices)
+- [A Quick Guide to Timeouts in OkHttp](https://www.baeldung.com/okhttp-timeouts)
+- [A Quick Guide to Post Requests with OkHttp](https://www.baeldung.com/okhttp-post)
diff --git a/libraries-http/pom.xml b/libraries-http/pom.xml
index 6261456486..cbc74ce132 100644
--- a/libraries-http/pom.xml
+++ b/libraries-http/pom.xml
@@ -71,7 +71,7 @@
com.google.code.gson
gson
- 2.8.5
+ ${gson.version}
@@ -116,6 +116,7 @@
+ 2.8.5
4.5.3
2.9.8
3.6.2
diff --git a/libraries-security/README.md b/libraries-security/README.md
index 819bc866cf..580ebdeab0 100644
--- a/libraries-security/README.md
+++ b/libraries-security/README.md
@@ -9,4 +9,4 @@ This module contains articles about security libraries.
- [Guide to Google Tink](https://www.baeldung.com/google-tink)
- [Introduction to BouncyCastle with Java](https://www.baeldung.com/java-bouncy-castle)
- [Intro to Jasypt](https://www.baeldung.com/jasypt)
-- [Digital Signature in Java](https://www.baeldung.com/java-digital-signature)
+- [Digital Signatures in Java](https://www.baeldung.com/java-digital-signature)
diff --git a/libraries-testing/pom.xml b/libraries-testing/pom.xml
index c84f8dda76..3ffbb291a0 100644
--- a/libraries-testing/pom.xml
+++ b/libraries-testing/pom.xml
@@ -127,7 +127,7 @@
org.asciidoctor
asciidoctor-maven-plugin
- 1.5.7.1
+ ${asciidoctor.version}
@@ -154,7 +154,8 @@
- 1.9.9
+ 1.5.7.1
+ 1.9.9
1.9.0
1.9.0
1.9.27
diff --git a/libraries/pom.xml b/libraries/pom.xml
index 13f91711fd..b5340d1ebb 100644
--- a/libraries/pom.xml
+++ b/libraries/pom.xml
@@ -523,7 +523,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 2.2
+ ${shade.plugin.version}
package
@@ -556,6 +556,7 @@
+ 2.2
0.7.0
3.2.7
1.2
diff --git a/linux-bash/functions/src/main/bash/functions.sh b/linux-bash/functions/src/main/bash/functions.sh
new file mode 100755
index 0000000000..41ff0ca434
--- /dev/null
+++ b/linux-bash/functions/src/main/bash/functions.sh
@@ -0,0 +1,208 @@
+#!/bin/bash
+
+# Subsection 2.1
+simple_function() {
+ for ((i=0;i<5;++i)) do
+ echo -n " "$i" ";
+ done
+}
+
+function simple_function_no_parantheses {
+ for ((i=0;i<5;++i)) do
+ echo -n " "$i" ";
+ done
+}
+
+function simple_for_loop()
+ for ((i=0;i<5;++i)) do
+ echo -n " "$i" ";
+ done
+
+function simple_comparison()
+ if [[ "$1" -lt 5 ]]; then
+ echo "$1 is smaller than 5"
+ else
+ echo "$1 is greater than 5"
+ fi
+
+# Subsection 2.2
+function simple_inputs() {
+ echo "This is the first argument [$1]"
+ echo "This is the second argument [$2]"
+ echo "Calling function with $# aruments"
+}
+
+# Subsection 2.3
+global_sum=0
+function global_sum_outputs() {
+ global_sum=$(($1+$2))
+}
+
+function cs_sum_outputs() {
+ sum=$(($1+$2))
+ echo $sum
+}
+
+# Subsection 2.4
+function arg_ref_sum_outputs() {
+ declare -n sum_ref=$3
+ sum_ref=$(($1+$2))
+}
+
+# Subsection 3.1
+variable="baeldung"
+function variable_scope2() {
+ echo "Variable inside function variable_scope2: [$variable]"
+ local variable="ipsum"
+}
+
+function variable_scope() {
+ local variable="lorem"
+ echo "Variable inside function variable_scope: [$variable]"
+ variable_scope2
+}
+
+# Subsection 3.2
+subshell_sum=0
+function simple_subshell_sum() (
+ subshell_sum=$(($1+$2))
+ echo "Value of sum in function with global variables: [$subshell_sum]"
+)
+
+function simple_subshell_ref_sum() (
+ declare -n sum_ref=$3
+ sum_ref=$(($1+$2))
+ echo "Value of sum in function with ref arguments: [$sum_ref]"
+)
+
+# Subsection 3.3
+function redirection_in() {
+ while read input;
+ do
+ echo "$input"
+ done
+} < infile
+
+function redirection_in_ps() {
+ read
+ while read -a input;
+ do
+ echo "User[${input[2]}]->File[${input[8]}]"
+ done
+} < <(ls -ll /)
+
+function redirection_out_ps() {
+ declare -a output=("baeldung" "lorem" "ipsum" "caracg")
+ for element in "${output[@]}"
+ do
+ echo "$element"
+ done
+} > >(grep "g")
+
+function redirection_out() {
+ declare -a output=("baeldung" "lorem" "ipsum")
+ for element in "${output[@]}"
+ do
+ echo "$element"
+ done
+} > outfile
+
+# Subsection 3.4
+function fibonnaci_recursion() {
+ argument=$1
+ if [[ "$argument" -eq 0 ]] || [[ "$argument" -eq 1 ]]; then
+ echo $argument
+ else
+ first=$(fibonnaci_recursion $(($argument-1)))
+ second=$(fibonnaci_recursion $(($argument-2)))
+ echo $(( $first + $second ))
+ fi
+}
+
+# main menu entry point
+echo "****Functions samples menu*****"
+PS3="Your choice (1,2,3 etc.):"
+options=("function_definitions" "function_input_args" "function_outputs" \
+ "function_variables" "function_subshells" "function_redirections" \
+ "function_recursion" "quit")
+select option in "${options[@]}"
+do
+ case $option in
+ "function_definitions")
+ echo -e "\n"
+ echo "**Different ways to define a function**"
+ echo -e "No function keyword:"
+ simple_function
+ echo -e "\nNo function parantheses:"
+ simple_function_no_parantheses
+ echo -e "\nOmitting curly braces:"
+ simple_for_loop
+ echo -e "\n"
+ ;;
+ "function_input_args")
+ echo -e "\n"
+ echo "**Passing inputs to a function**"
+ simple_inputs lorem ipsum
+ echo -e "\n"
+ ;;
+ "function_outputs")
+ echo -e "\n"
+ echo "**Getting outputs from a function**"
+ global_sum_outputs 1 2
+ echo -e ">1+2 using global variables: [$global_sum]"
+ cs_sum=$(cs_sum_outputs 1 2)
+ echo -e ">1+2 using command substitution: [$cs_sum]"
+ arg_ref_sum_outputs 1 2 arg_ref_sum
+ echo -e ">1+2 using argument references: [$arg_ref_sum]"
+ echo -e "\n"
+ ;;
+ "function_variables")
+ echo -e "\n"
+ echo "**Overriding variable scopes**"
+ echo "Global value of variable: [$variable]"
+ variable_scope
+ echo -e "\n"
+ ;;
+ "function_subshells")
+ echo -e "\n"
+ echo "**Running function in subshell**"
+ echo "Global value of sum: [$subshell_sum]"
+ simple_subshell_sum 1 2
+ echo "Value of sum after subshell function with \
+global variables: [$subshell_sum]"
+ subshell_sum_arg_ref=0
+ simple_subshell_ref_sum 1 2 subshell_sum_arg_ref
+ echo "Value of sum after subshell function with \
+ref arguments: [$subshell_sum_arg_ref]"
+ echo -e "\n"
+ ;;
+ "function_redirections")
+ echo -e "\n"
+ echo "**Function redirections**"
+ echo -e ">Function input redirection from file:"
+ redirection_in
+ echo -e ">Function input redirection from command:"
+ redirection_in_ps
+ echo -e ">Function output redirection to file:"
+ redirection_out
+ cat outfile
+ echo -e ">Function output redirection to command:"
+ red_ps=$(redirection_out_ps)
+ echo "$red_ps"
+ echo -e "\n"
+ ;;
+ "function_recursion")
+ echo -e "\n"
+ echo "**Function recursion**"
+ fibo_res1=$(fibonnaci_recursion 7)
+ echo "The 7th Fibonnaci number: [$fibo_res1]"
+ fibo_res2=$(fibonnaci_recursion 15)
+ echo "The 15th Fibonnaci number: [$fibo_res2]"
+ echo -e "\n"
+ ;;
+ "quit")
+ break
+ ;;
+ *) echo "Invalid option";;
+ esac
+done
\ No newline at end of file
diff --git a/linux-bash/functions/src/main/bash/infile b/linux-bash/functions/src/main/bash/infile
new file mode 100644
index 0000000000..b1fa680af4
--- /dev/null
+++ b/linux-bash/functions/src/main/bash/infile
@@ -0,0 +1,3 @@
+Honda Insight 2010
+Honda Element 2006
+Chevrolet Avalanche 2002
diff --git a/logging-modules/flogger/pom.xml b/logging-modules/flogger/pom.xml
index c27e2c8d7a..f553a4a961 100644
--- a/logging-modules/flogger/pom.xml
+++ b/logging-modules/flogger/pom.xml
@@ -15,26 +15,26 @@
com.google.flogger
flogger
- 0.4
+ ${flogger.version}
com.google.flogger
flogger-system-backend
- 0.4
+ ${flogger.version}
runtime
com.google.flogger
flogger-slf4j-backend
- 0.4
+ ${flogger.version}
com.google.flogger
flogger-log4j-backend
- 0.4
+ ${flogger.version}
com.sun.jmx
@@ -54,13 +54,18 @@
log4j
log4j
- 1.2.17
+ ${log4j.version}
log4j
apache-log4j-extras
- 1.2.17
+ ${log4j.version}
+
+ 0.4
+ 1.2.17
+
+
\ No newline at end of file
diff --git a/logging-modules/logback/README.md b/logging-modules/logback/README.md
index 58dc8ce541..05a4ab9308 100644
--- a/logging-modules/logback/README.md
+++ b/logging-modules/logback/README.md
@@ -2,3 +2,4 @@
- [Get Log Output in JSON](https://www.baeldung.com/java-log-json-output)
- [SLF4J Warning: Class Path Contains Multiple SLF4J Bindings](https://www.baeldung.com/slf4j-classpath-multiple-bindings)
+- [Sending Emails with Logback](https://www.baeldung.com/logback-send-email)
diff --git a/lombok-custom/pom.xml b/lombok-custom/pom.xml
index 1455a4f6c6..75c3f9d407 100644
--- a/lombok-custom/pom.xml
+++ b/lombok-custom/pom.xml
@@ -36,12 +36,12 @@
- default-tools.jar
+ default-profile
-
- java.vendor
- Oracle Corporation
-
+ true
+
+ ${java.home}/../lib/tools.jar
+
@@ -53,6 +53,24 @@
+
+ mac-profile
+
+ false
+
+ ${java.home}/../Classes/classes.jar
+
+
+
+
+ com.sun
+ tools
+ ${java.version}
+ system
+ ${java.home}/../Classes/classes.jar
+
+
+
diff --git a/machine-learning/pom.xml b/machine-learning/pom.xml
index 7bc0332012..24162b7b9c 100644
--- a/machine-learning/pom.xml
+++ b/machine-learning/pom.xml
@@ -19,6 +19,15 @@
1.7
1.3.50
0.9.1
+ 3.1.0
+ 3.0.2
+ 3.0.2
+ 3.8.0
+ 2.22.1
+ 2.5.2
+ 2.8.2
+ 3.7.1
+ 3.0.0
@@ -63,41 +72,41 @@
maven-clean-plugin
- 3.1.0
+ ${clean.plugin.version}
maven-resources-plugin
- 3.0.2
+ ${resources.plugin.version}
maven-compiler-plugin
- 3.8.0
+ ${compiler.plugin.version}
maven-surefire-plugin
- 2.22.1
+ ${surefire.plugin.version}
maven-jar-plugin
- 3.0.2
+ ${jar.plugin.version}
maven-install-plugin
- 2.5.2
+ ${install.plugin.version}
maven-deploy-plugin
- 2.8.2
+ ${deploy.plugin.version}
maven-site-plugin
- 3.7.1
+ ${site.plugin.version}
maven-project-info-reports-plugin
- 3.0.0
+ ${report.plugin.version}
diff --git a/maven-all/compiler-plugin-java-9/pom.xml b/maven-all/compiler-plugin-java-9/pom.xml
index 1975e1f7cd..6baadb451c 100644
--- a/maven-all/compiler-plugin-java-9/pom.xml
+++ b/maven-all/compiler-plugin-java-9/pom.xml
@@ -12,13 +12,19 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.8.0
+ ${compiler.plugin.version}
- 9
- 9
+ ${source.version}
+ ${target.version}
+
+ 3.8.0
+ 9
+ 9
+
+
\ No newline at end of file
diff --git a/maven-all/maven-custom-plugin/README.md b/maven-all/maven-custom-plugin/README.md
new file mode 100644
index 0000000000..55d147c337
--- /dev/null
+++ b/maven-all/maven-custom-plugin/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [How to Create a Maven Plugin](https://www.baeldung.com/maven-plugin)
diff --git a/maven-all/maven-custom-plugin/usage-example/pom.xml b/maven-all/maven-custom-plugin/usage-example/pom.xml
index 542a02b3eb..bd2b16475e 100644
--- a/maven-all/maven-custom-plugin/usage-example/pom.xml
+++ b/maven-all/maven-custom-plugin/usage-example/pom.xml
@@ -8,16 +8,21 @@
0.0.1-SNAPSHOT
pom
+
+ 3.9
+ 4.12
+
+
org.apache.commons
commons-lang3
- 3.9
+ ${commons.lang3.version}
junit
junit
- 4.12
+ ${junit.version}
test
diff --git a/maven-all/maven-war-plugin/pom.xml b/maven-all/maven-war-plugin/pom.xml
index 233a9f3571..915be306ca 100644
--- a/maven-all/maven-war-plugin/pom.xml
+++ b/maven-all/maven-war-plugin/pom.xml
@@ -14,7 +14,7 @@
maven-war-plugin
- 3.1.0
+ ${war.plugin.version}
false
@@ -26,6 +26,7 @@
false
+ 3.1.0
\ No newline at end of file
diff --git a/maven-all/maven/proxy/README.md b/maven-all/maven/proxy/README.md
new file mode 100644
index 0000000000..9ae1fd6ad5
--- /dev/null
+++ b/maven-all/maven/proxy/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [Using Maven Behind a Proxy](https://www.baeldung.com/maven-behind-proxy)
diff --git a/maven-all/pom.xml b/maven-all/pom.xml
new file mode 100644
index 0000000000..3a79a2a686
--- /dev/null
+++ b/maven-all/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+ maven-all
+ 0.0.1-SNAPSHOT
+ maven-all
+ pom
+
+
+ com.baeldung
+ parent-modules
+ 1.0.0-SNAPSHOT
+
+
+
+
+ maven
+ maven-custom-plugin/counter-maven-plugin
+ maven-war-plugin
+ profiles
+ versions-maven-plugin
+
+
+
diff --git a/maven-all/profiles/pom.xml b/maven-all/profiles/pom.xml
index 01b191c7d6..4ae6d1ee40 100644
--- a/maven-all/profiles/pom.xml
+++ b/maven-all/profiles/pom.xml
@@ -73,7 +73,7 @@
org.apache.maven.plugins
maven-help-plugin
- 3.2.0
+ ${help.plugin.version}
show-profiles
@@ -87,4 +87,8 @@
+
+ 3.2.0
+
+
\ No newline at end of file
diff --git a/maven-all/versions-maven-plugin/original/pom.xml b/maven-all/versions-maven-plugin/original/pom.xml
index c6c1657b25..54140aec9b 100644
--- a/maven-all/versions-maven-plugin/original/pom.xml
+++ b/maven-all/versions-maven-plugin/original/pom.xml
@@ -46,7 +46,7 @@
org.codehaus.mojo
versions-maven-plugin
- 2.7
+ ${versions.plugin.version}
org.apache.commons:commons-collections4
@@ -76,6 +76,7 @@
4.0
3.0
1.9.1
+ 2.7
\ No newline at end of file
diff --git a/maven-all/versions-maven-plugin/pom.xml b/maven-all/versions-maven-plugin/pom.xml
index 3ce25d16f9..9793f55b28 100644
--- a/maven-all/versions-maven-plugin/pom.xml
+++ b/maven-all/versions-maven-plugin/pom.xml
@@ -12,19 +12,19 @@
commons-io
commons-io
- 2.3
+ ${commons.io.version}
org.apache.commons
commons-collections4
- 4.0
+ ${commons.collections4.version}
org.apache.commons
commons-lang3
- 3.0
+ ${commons.lang3.version}
@@ -36,7 +36,7 @@
commons-beanutils
commons-beanutils
- 1.9.1
+ ${commons.beanutils.version}
@@ -45,7 +45,7 @@
org.codehaus.mojo
versions-maven-plugin
- 2.7
+ ${versions.plugin.version}
org.apache.commons:commons-collections4
@@ -71,6 +71,11 @@
1.15
+ 2.3
+ 2.7
+ 1.9.1
+ 3.0
+ 4.0
\ No newline at end of file
diff --git a/maven-archetype/src/main/resources/archetype-resources/pom.xml b/maven-archetype/src/main/resources/archetype-resources/pom.xml
index a5c813652d..2a73687e2c 100644
--- a/maven-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/maven-archetype/src/main/resources/archetype-resources/pom.xml
@@ -14,6 +14,8 @@
${liberty-plugin-version}
9080
9443
+ 2.0
+ 2.1
@@ -65,14 +67,14 @@
javax.enterprise
cdi-api
- 2.0
+ ${cdi.api.version}
provided
javax.ws.rs
javax.ws.rs-api
- 2.1
+ ${rsapi.api.version}
provided
diff --git a/maven-java-11/multimodule-maven-project/mainppmodule/pom.xml b/maven-java-11/multimodule-maven-project/mainppmodule/pom.xml
index 42b06bbebd..a4a6575906 100644
--- a/maven-java-11/multimodule-maven-project/mainppmodule/pom.xml
+++ b/maven-java-11/multimodule-maven-project/mainppmodule/pom.xml
@@ -12,23 +12,26 @@
com.baeldung.multimodule-maven-project
multimodule-maven-project
1.0
+ 1.0
+ 1.0
+ 1.0
com.baeldung.entitymodule
entitymodule
- 1.0
+ ${entitymodule.version}
com.baeldung.daomodule
daomodule
- 1.0
+ ${daomodule.version}
com.baeldung.userdaomodule
userdaomodule
- 1.0
+ ${userdaomodule.version}
diff --git a/maven-java-11/multimodule-maven-project/pom.xml b/maven-java-11/multimodule-maven-project/pom.xml
index a79dff93d3..65f5b7a814 100644
--- a/maven-java-11/multimodule-maven-project/pom.xml
+++ b/maven-java-11/multimodule-maven-project/pom.xml
@@ -26,13 +26,13 @@
junit
junit
- 4.12
+ ${junit.version}
test
org.assertj
assertj-core
- 3.12.2
+ ${assertj.version}
test
@@ -44,10 +44,10 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.8.0
+ ${compiler.plugin.version}
- 11
- 11
+ ${source.version}
+ ${target.version}
@@ -56,6 +56,11 @@
UTF-8
+ 4.12
+ 3.12.2
+ 3.8.0
+ 11
+ 11
diff --git a/maven-java-11/multimodule-maven-project/userdaomodule/pom.xml b/maven-java-11/multimodule-maven-project/userdaomodule/pom.xml
index 3eb5897f8b..cfa59bdc39 100644
--- a/maven-java-11/multimodule-maven-project/userdaomodule/pom.xml
+++ b/maven-java-11/multimodule-maven-project/userdaomodule/pom.xml
@@ -14,16 +14,21 @@
1.0
+
+ 1.0
+ 1.0
+
+
com.baeldung.entitymodule
entitymodule
- 1.0
+ ${entitymodule.version}1.0
com.baeldung.daomodule
daomodule
- 1.0
+ ${daomodule.version}
junit
diff --git a/maven-polyglot/maven-polyglot-json-extension/pom.xml b/maven-polyglot/maven-polyglot-json-extension/pom.xml
index 0043bae151..15166046c1 100644
--- a/maven-polyglot/maven-polyglot-json-extension/pom.xml
+++ b/maven-polyglot/maven-polyglot-json-extension/pom.xml
@@ -34,7 +34,7 @@
org.codehaus.plexus
plexus-component-metadata
- 1.7.1
+ ${plexus.component.version}
@@ -48,6 +48,7 @@
3.5.4
+ 1.7.1
\ No newline at end of file
diff --git a/maven-polyglot/pom.xml b/maven-polyglot/pom.xml
new file mode 100644
index 0000000000..eb4e629a96
--- /dev/null
+++ b/maven-polyglot/pom.xml
@@ -0,0 +1,22 @@
+
+
+ 4.0.0
+ maven-polyglot
+ 0.0.1-SNAPSHOT
+ maven-polyglot
+ pom
+
+
+ com.baeldung
+ parent-modules
+ 1.0.0-SNAPSHOT
+
+
+
+
+ maven-polyglot-json-extension
+
+
+
+
diff --git a/micronaut/pom.xml b/micronaut/pom.xml
index 13639c11ff..2cb05cc1b9 100644
--- a/micronaut/pom.xml
+++ b/micronaut/pom.xml
@@ -49,7 +49,7 @@
javax.annotation
javax.annotation-api
- 1.3.2
+ ${annotation.api.version}
compile
@@ -60,19 +60,19 @@
ch.qos.logback
logback-classic
- 1.2.3
+ ${lombok.version}
runtime
junit
junit
- 4.12
+ ${junit.version}
test
io.projectreactor
reactor-core
- 3.1.6.RELEASE
+ ${reactor.version}
@@ -81,7 +81,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.1.0
+ ${shade.plugin.version}
package
@@ -102,7 +102,7 @@
org.codehaus.mojo
exec-maven-plugin
- 1.6.0
+ ${exec.plugin.version}
java
@@ -118,7 +118,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.7.0
+ ${compiler.plugin.version}
${jdk.version}
${jdk.version}
@@ -142,6 +142,13 @@
com.baeldung.micronaut.helloworld.server.ServerApplication
1.0.0.RC2
1.8
+ 1.3.2
+ 1.2.3
+ 4.12
+ 3.1.6.RELEASE
+ 3.7.0
+ 1.6.0
+ 3.1.0
diff --git a/micronaut/src/main/resources/application.yml b/micronaut/src/main/resources/application.yml
index 4119026dd6..32daacd4aa 100644
--- a/micronaut/src/main/resources/application.yml
+++ b/micronaut/src/main/resources/application.yml
@@ -2,4 +2,4 @@ micronaut:
application:
name: hello-world-server
server:
- port: 9080
\ No newline at end of file
+ port: ${random.port}
\ No newline at end of file
diff --git a/netflix-modules/genie/pom.xml b/netflix-modules/genie/pom.xml
index 835bbf2b50..2c7c04b26b 100644
--- a/netflix-modules/genie/pom.xml
+++ b/netflix-modules/genie/pom.xml
@@ -3,7 +3,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
genie
- 1.0.0-SNAPSHOT
Genie
jar
Sample project for Netflix Genie
diff --git a/netflix-modules/pom.xml b/netflix-modules/pom.xml
index 5a082e8f1a..9ed22498d8 100644
--- a/netflix-modules/pom.xml
+++ b/netflix-modules/pom.xml
@@ -3,7 +3,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
netflix-modules
- 1.0.0-SNAPSHOT
Netflix Modules
pom
Module for Netflix projects
diff --git a/ninja/README.md b/ninja/README.md
new file mode 100644
index 0000000000..554d088c1b
--- /dev/null
+++ b/ninja/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles
+
+- [Introduction to Ninja Framework](https://www.baeldung.com/ninja-framework-intro)
diff --git a/ninja/pom.xml b/ninja/pom.xml
index 8ec2422d9f..afb1d509b8 100644
--- a/ninja/pom.xml
+++ b/ninja/pom.xml
@@ -13,6 +13,15 @@
6.5.0
9.4.18.v20190429
+ 3.3.4
+ 2.1.3
+ 1.4.186
+ 3.2
+ 1.8
+ 1.8
+ 1.3.1
+ 2.8.2
+ 2.2
@@ -20,16 +29,16 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.2
+ ${compiler.plugin.version}
- 1.8
- 1.8
+ ${source.version}
+ ${target.version}
org.apache.maven.plugins
maven-enforcer-plugin
- 1.3.1
+ ${enforcer.plugin.version}
enforce-banned-dependencies
@@ -92,7 +101,7 @@
org.apache.maven.plugins
maven-deploy-plugin
- 2.8.2
+ ${deploy.plugin.version}
true
@@ -100,7 +109,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 2.2
+ ${shade.plugin.version}
true
@@ -156,17 +165,17 @@
org.webjars
bootstrap
- 3.3.4
+ ${bootstrap.version}
org.webjars
jquery
- 2.1.3
+ ${jquery.version}
com.h2database
h2
- 1.4.186
+ ${h2.version}
org.ninjaframework
diff --git a/oauth2-framework-impl/README.md b/oauth2-framework-impl/README.md
index ea9686b451..ae28c1b511 100644
--- a/oauth2-framework-impl/README.md
+++ b/oauth2-framework-impl/README.md
@@ -4,4 +4,4 @@ This module contains articles about the implementation of OAuth2 with Java EE.
### Relevant Articles
-- [Implementing The OAuth 2.0 Authorization Framework Using Java EE](https://www.baeldung.com/java-ee-oauth2-implementation)
+- [Implementing The OAuth 2.0 Authorization Framework Using Jakarta EE](https://www.baeldung.com/java-ee-oauth2-implementation)
diff --git a/open-liberty/pom.xml b/open-liberty/pom.xml
new file mode 100644
index 0000000000..d6588ce49a
--- /dev/null
+++ b/open-liberty/pom.xml
@@ -0,0 +1,130 @@
+
+
+ 4.0.0
+
+ com.baeldung
+ open-liberty
+ 1.0-SNAPSHOT
+ war
+
+
+
+ jakarta.platform
+ jakarta.jakartaee-web-api
+ ${version.jakarta.jakartaee-web-api}
+ provided
+
+
+ org.eclipse.microprofile
+ microprofile
+ ${version.microprofile}
+ pom
+ provided
+
+
+ org.apache.derby
+ derby
+ ${version.derby}
+
+
+
+
+ junit
+ junit
+ ${version.junit}
+ test
+
+
+ org.eclipse
+ yasson
+ ${version.yasson}
+ test
+
+
+ org.apache.cxf
+ cxf-rt-rs-client
+ ${version.cxf-rt-rs-client}
+ test
+
+
+ org.glassfish
+ javax.json
+ ${version.javax.json}
+ test
+
+
+ org.apache.cxf
+ cxf-rt-rs-mp-client
+ ${version.cxf-rt-rs-mp-client}
+ test
+
+
+
+
+ ${project.artifactId}
+
+
+
+ io.openliberty.tools
+ liberty-maven-plugin
+ ${version.liberty-maven-plugin}
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ ${version.maven-dependency-plugin}
+
+
+ copy-derby-dependency
+ package
+
+ copy-dependencies
+
+
+ derby
+ ${project.build.directory}/liberty/wlp/usr/shared/resources/
+
+ ${testServerHttpPort}
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ ${version.maven-war-plugin}
+
+
+
+
+
+
+ 1.8
+ 1.8
+ UTF-8
+ UTF-8
+ false
+
+
+ 8.0.0
+ 3.2
+ 10.14.2.0
+ 3.1
+ 2.10
+ 3.2.3
+ 4.12
+ 1.0.5
+ 3.2.6
+ 1.0.4
+ 3.3.1
+
+
+ openliberty
+ 9080
+ 9443
+ 7070
+
+
\ No newline at end of file
diff --git a/open-liberty/src/main/java/com/baeldung/openliberty/person/dao/PersonDao.java b/open-liberty/src/main/java/com/baeldung/openliberty/person/dao/PersonDao.java
new file mode 100644
index 0000000000..e2d408d8b0
--- /dev/null
+++ b/open-liberty/src/main/java/com/baeldung/openliberty/person/dao/PersonDao.java
@@ -0,0 +1,24 @@
+package com.baeldung.openliberty.person.dao;
+
+import javax.enterprise.context.RequestScoped;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+
+import com.baeldung.openliberty.person.model.Person;
+
+@RequestScoped
+public class PersonDao {
+
+ @PersistenceContext(name = "jpa-unit")
+ private EntityManager em;
+
+ public Person createPerson(Person person) {
+ em.persist(person);
+ return person;
+ }
+
+ public Person readPerson(int personId) {
+ return em.find(Person.class, personId);
+ }
+
+}
\ No newline at end of file
diff --git a/open-liberty/src/main/java/com/baeldung/openliberty/person/model/Person.java b/open-liberty/src/main/java/com/baeldung/openliberty/person/model/Person.java
new file mode 100644
index 0000000000..79e8c16911
--- /dev/null
+++ b/open-liberty/src/main/java/com/baeldung/openliberty/person/model/Person.java
@@ -0,0 +1,58 @@
+package com.baeldung.openliberty.person.model;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.validation.constraints.Email;
+import javax.validation.constraints.NotBlank;
+
+@Entity
+public class Person {
+
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ @Id
+ private int id;
+
+ private String username;
+ private String email;
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public Person(int id, @NotBlank String username, @Email String email) {
+ super();
+ this.id = id;
+ this.username = username;
+ this.email = email;
+ }
+
+ public Person() {
+ super();
+ }
+
+ public String toString() {
+ return this.id + ":" +this.username;
+ }
+}
diff --git a/open-liberty/src/main/java/com/baeldung/openliberty/person/resource/PersonResource.java b/open-liberty/src/main/java/com/baeldung/openliberty/person/resource/PersonResource.java
new file mode 100644
index 0000000000..0fb86860b8
--- /dev/null
+++ b/open-liberty/src/main/java/com/baeldung/openliberty/person/resource/PersonResource.java
@@ -0,0 +1,52 @@
+package com.baeldung.openliberty.person.resource;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+import javax.transaction.Transactional;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import com.baeldung.openliberty.person.dao.PersonDao;
+import com.baeldung.openliberty.person.model.Person;
+
+@RequestScoped
+@Path("persons")
+public class PersonResource {
+
+ @Inject
+ private PersonDao personDao;
+
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public List getAllPersons() {
+ return Arrays.asList(new Person(1, "normanlewis", "normanlewis@email.com"));
+ }
+
+ @POST
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Transactional
+ public Response addPerson(Person person) {
+ personDao.createPerson(person);
+ String respMessage = "Person #" + person.getId() + " created successfully.";
+ return Response.status(Response.Status.CREATED).entity(respMessage).build();
+ }
+
+ @GET
+ @Path("{id}")
+ @Produces(MediaType.APPLICATION_JSON)
+ @Transactional
+ public Person getPerson(@PathParam("id") int id) {
+ Person person = personDao.readPerson(id);
+ return person;
+ }
+}
diff --git a/open-liberty/src/main/java/com/baeldung/openliberty/rest/ApiApplication.java b/open-liberty/src/main/java/com/baeldung/openliberty/rest/ApiApplication.java
new file mode 100644
index 0000000000..176eaccaed
--- /dev/null
+++ b/open-liberty/src/main/java/com/baeldung/openliberty/rest/ApiApplication.java
@@ -0,0 +1,9 @@
+package com.baeldung.openliberty.rest;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+@ApplicationPath("/api")
+public class ApiApplication extends Application {
+
+}
diff --git a/open-liberty/src/main/java/com/baeldung/openliberty/rest/consumes/RestConsumer.java b/open-liberty/src/main/java/com/baeldung/openliberty/rest/consumes/RestConsumer.java
new file mode 100644
index 0000000000..8073c408dd
--- /dev/null
+++ b/open-liberty/src/main/java/com/baeldung/openliberty/rest/consumes/RestConsumer.java
@@ -0,0 +1,18 @@
+package com.baeldung.openliberty.rest.consumes;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.core.Response;
+
+public class RestConsumer {
+
+ public static String consumeWithJsonb(String targetUrl) {
+ Client client = ClientBuilder.newClient();
+ Response response = client.target(targetUrl).request().get();
+ String result = response.readEntity(String.class);
+ response.close();
+ client.close();
+ return result;
+ }
+
+}
diff --git a/open-liberty/src/main/java/com/baeldung/openliberty/servlet/AppServlet.java b/open-liberty/src/main/java/com/baeldung/openliberty/servlet/AppServlet.java
new file mode 100644
index 0000000000..d8c8d159c4
--- /dev/null
+++ b/open-liberty/src/main/java/com/baeldung/openliberty/servlet/AppServlet.java
@@ -0,0 +1,27 @@
+package com.baeldung.openliberty.servlet;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns="/app")
+public class AppServlet extends HttpServlet {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ String htmlOutput = "Hello! Welcome to Open Liberty ";
+ response.getWriter().append(htmlOutput);
+ }
+
+ @Override
+ protected void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+ doGet(request, response);
+ }
+}
\ No newline at end of file
diff --git a/open-liberty/src/main/liberty/config/server.xml b/open-liberty/src/main/liberty/config/server.xml
new file mode 100644
index 0000000000..bc99905058
--- /dev/null
+++ b/open-liberty/src/main/liberty/config/server.xml
@@ -0,0 +1,28 @@
+
+
+ mpHealth-2.0
+ servlet-4.0
+ jaxrs-2.1
+ jsonp-1.1
+ jsonb-1.0
+ cdi-2.0
+ jpa-2.2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/open-liberty/src/main/resources/META-INF/persistence.xml b/open-liberty/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 0000000000..ca8ad1a5c9
--- /dev/null
+++ b/open-liberty/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,14 @@
+
+
+
+ jdbc/jpadatasource
+
+
+
+
+
+
\ No newline at end of file
diff --git a/open-liberty/src/test/java/com/baeldung/openliberty/RestClientTest.java b/open-liberty/src/test/java/com/baeldung/openliberty/RestClientTest.java
new file mode 100644
index 0000000000..4978483ca0
--- /dev/null
+++ b/open-liberty/src/test/java/com/baeldung/openliberty/RestClientTest.java
@@ -0,0 +1,40 @@
+package com.baeldung.openliberty;
+
+import static org.junit.Assert.assertEquals;
+
+import javax.json.bind.JsonbBuilder;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.baeldung.openliberty.person.model.Person;
+import com.baeldung.openliberty.rest.consumes.RestConsumer;
+
+public class RestClientTest {
+
+ private static String BASE_URL;
+
+ private final String API_PERSON = "api/persons";
+
+ @BeforeClass
+ public static void oneTimeSetup() {
+ BASE_URL = "http://localhost:9080/";
+ }
+
+ @Test
+ public void testSuite() {
+ //run the test only when liberty server is started
+ //this.whenConsumeWithJsonb_thenGetPerson();
+ }
+
+ public void whenConsumeWithJsonb_thenGetPerson() {
+ String url = BASE_URL + API_PERSON + "/1";
+ String result = RestConsumer.consumeWithJsonb(url);
+
+ Person person = JsonbBuilder.create().fromJson(result, Person.class);
+ assertEquals(1, person.getId());
+ assertEquals("normanlewis", person.getUsername());
+ assertEquals("normanlewis@email.com", person.getEmail());
+ }
+
+}
diff --git a/osgi/pom.xml b/osgi/pom.xml
index ed708e8004..afc980c8bd 100644
--- a/osgi/pom.xml
+++ b/osgi/pom.xml
@@ -11,7 +11,6 @@
com.baeldung
parent-modules
1.0.0-SNAPSHOT
- ..
diff --git a/parent-boot-2/pom.xml b/parent-boot-2/pom.xml
index 881a0f1d67..43911a26ad 100644
--- a/parent-boot-2/pom.xml
+++ b/parent-boot-2/pom.xml
@@ -79,7 +79,7 @@
3.3.0
1.0.22.RELEASE
- 2.1.9.RELEASE
+ 2.2.2.RELEASE
diff --git a/parent-java/pom.xml b/parent-java/pom.xml
index 47965fc36d..e4ec2255c6 100644
--- a/parent-java/pom.xml
+++ b/parent-java/pom.xml
@@ -27,11 +27,22 @@
commons-io
${commons.io.version}
+
+ org.openjdk.jmh
+ jmh-core
+ ${jmh.version}
+
+
+ org.openjdk.jmh
+ jmh-generator-annprocess
+ ${jmh.version}
+
23.0
2.6
+ 1.19
diff --git a/parent-kotlin/pom.xml b/parent-kotlin/pom.xml
index a180343378..abc871ca91 100644
--- a/parent-kotlin/pom.xml
+++ b/parent-kotlin/pom.xml
@@ -16,7 +16,7 @@
jcenter
- http://jcenter.bintray.com
+ https://jcenter.bintray.com
kotlin-ktor
@@ -45,7 +45,7 @@
org.springframework.boot
spring-boot-dependencies
- 2.2.0.M4
+ ${boot.dependencies.version}
pom
import
@@ -215,6 +215,7 @@
0.9.5
3.12.0
1.3.2
+ 2.2.0.M4
diff --git a/parent-spring-4/pom.xml b/parent-spring-4/pom.xml
index 671ca7db6b..3749c5016e 100644
--- a/parent-spring-4/pom.xml
+++ b/parent-spring-4/pom.xml
@@ -51,7 +51,7 @@
- 4.3.25.RELEASE
+ 4.3.26.RELEASE
1.6.1
diff --git a/patterns/design-patterns-architectural/pom.xml b/patterns/design-patterns-architectural/pom.xml
index 81cc55aa21..d1945a1d0a 100644
--- a/patterns/design-patterns-architectural/pom.xml
+++ b/patterns/design-patterns-architectural/pom.xml
@@ -11,7 +11,6 @@
com.baeldung
patterns
1.0.0-SNAPSHOT
- ..
@@ -22,11 +21,6 @@
test
-
- javax
- javaee-api
- ${javaee.version}
-
org.hibernate
hibernate-core
@@ -41,11 +35,7 @@
- UTF-8
- 1.8
- 1.8
3.9.1
- 8.0
5.2.16.Final
6.0.6
diff --git a/patterns/design-patterns-behavioral-2/pom.xml b/patterns/design-patterns-behavioral-2/pom.xml
index 4cbe6e32b9..3a6d21353e 100644
--- a/patterns/design-patterns-behavioral-2/pom.xml
+++ b/patterns/design-patterns-behavioral-2/pom.xml
@@ -11,7 +11,6 @@
com.baeldung
patterns
1.0.0-SNAPSHOT
- ..
@@ -24,9 +23,6 @@
- UTF-8
- 1.8
- 1.8
3.12.2
diff --git a/patterns/design-patterns-behavioral/pom.xml b/patterns/design-patterns-behavioral/pom.xml
index c4ae00435e..aceaabf582 100644
--- a/patterns/design-patterns-behavioral/pom.xml
+++ b/patterns/design-patterns-behavioral/pom.xml
@@ -11,7 +11,6 @@
com.baeldung
patterns
1.0.0-SNAPSHOT
- ..
@@ -41,9 +40,6 @@
- UTF-8
- 1.8
- 1.8
16.0.2
3.9.1
diff --git a/patterns/design-patterns-cloud/pom.xml b/patterns/design-patterns-cloud/pom.xml
index 51f6a42f76..34defb7eac 100644
--- a/patterns/design-patterns-cloud/pom.xml
+++ b/patterns/design-patterns-cloud/pom.xml
@@ -9,47 +9,4 @@
design-patterns-cloud
pom
-
-
- junit
- junit
- ${junit.version}
- test
-
-
- org.mockito
- mockito-core
- ${mockito-core.version}
- test
-
-
- io.github.resilience4j
- resilience4j-retry
- ${resilience4j.version}
- test
-
-
- org.slf4j
- slf4j-api
- ${slf4j.version}
- test
-
-
- org.slf4j
- slf4j-simple
- ${slf4j.version}
- test
-
-
-
-
- UTF-8
- 1.8
- 1.8
- 4.12
- 2.27.0
- 1.7.26
- 0.16.0
-
-
diff --git a/patterns/design-patterns-creational/pom.xml b/patterns/design-patterns-creational/pom.xml
index aa20c1c085..7c2742ade4 100644
--- a/patterns/design-patterns-creational/pom.xml
+++ b/patterns/design-patterns-creational/pom.xml
@@ -11,7 +11,6 @@
com.baeldung
patterns
1.0.0-SNAPSHOT
- ..
@@ -36,10 +35,6 @@
- UTF-8
- 1.8
- 1.8
-
2.4.1
3.0.2
3.9.1
diff --git a/patterns/design-patterns-functional/pom.xml b/patterns/design-patterns-functional/pom.xml
index ec37ad1e8d..e5166dc61e 100644
--- a/patterns/design-patterns-functional/pom.xml
+++ b/patterns/design-patterns-functional/pom.xml
@@ -11,13 +11,6 @@
com.baeldung
patterns
1.0.0-SNAPSHOT
- ..
-
- UTF-8
- 1.8
- 1.8
-
-
diff --git a/patterns/design-patterns-structural/pom.xml b/patterns/design-patterns-structural/pom.xml
index 97e0b9b38b..c37b6845be 100644
--- a/patterns/design-patterns-structural/pom.xml
+++ b/patterns/design-patterns-structural/pom.xml
@@ -11,7 +11,6 @@
com.baeldung
patterns
1.0.0-SNAPSHOT
- ..
@@ -22,10 +21,4 @@
-
- UTF-8
- 1.8
- 1.8
-
-
diff --git a/patterns/dip/pom.xml b/patterns/dip/pom.xml
index 37c980f2e3..7217c4fdcc 100644
--- a/patterns/dip/pom.xml
+++ b/patterns/dip/pom.xml
@@ -12,16 +12,9 @@
com.baeldung
patterns
1.0.0-SNAPSHOT
- ..
-
- junit
- junit
- ${junit.version}
- test
-
org.assertj
assertj-core
@@ -31,9 +24,6 @@
- UTF-8
- 11
- 11
3.12.1
diff --git a/patterns/front-controller/pom.xml b/patterns/front-controller/pom.xml
index 1de3b82fcd..dc10250946 100644
--- a/patterns/front-controller/pom.xml
+++ b/patterns/front-controller/pom.xml
@@ -10,7 +10,6 @@
com.baeldung
patterns
1.0.0-SNAPSHOT
- ..
diff --git a/patterns/intercepting-filter/pom.xml b/patterns/intercepting-filter/pom.xml
index 435c1e13cf..7f2f57b5e1 100644
--- a/patterns/intercepting-filter/pom.xml
+++ b/patterns/intercepting-filter/pom.xml
@@ -10,7 +10,6 @@
com.baeldung
patterns
1.0.0-SNAPSHOT
- ..
@@ -27,15 +26,6 @@
-
- org.apache.maven.plugins
- maven-compiler-plugin
- ${maven-compiler-plugin.version}
-
- ${java.version}
- ${java.version}
-
-
org.apache.maven.plugins
maven-war-plugin
diff --git a/patterns/pom.xml b/patterns/pom.xml
index 8a510769a9..4c17055231 100644
--- a/patterns/pom.xml
+++ b/patterns/pom.xml
@@ -10,21 +10,20 @@
com.baeldung
parent-modules
1.0.0-SNAPSHOT
- ..
- front-controller
- intercepting-filter
design-patterns-architectural
design-patterns-behavioral
design-patterns-behavioral-2
+ design-patterns-cloud
design-patterns-creational
design-patterns-functional
design-patterns-structural
- solid
dip
- design-patterns-cloud
+ front-controller
+ intercepting-filter
+ solid
diff --git a/patterns/solid/pom.xml b/patterns/solid/pom.xml
index 1b0e35339d..ad76ea89fd 100644
--- a/patterns/solid/pom.xml
+++ b/patterns/solid/pom.xml
@@ -11,7 +11,6 @@
com.baeldung
patterns
1.0.0-SNAPSHOT
- ..
diff --git a/performance-tests/pom.xml b/performance-tests/pom.xml
index 94588c99d4..c8cebd8a11 100644
--- a/performance-tests/pom.xml
+++ b/performance-tests/pom.xml
@@ -38,7 +38,7 @@
org.mapstruct
mapstruct-processor
- 1.2.0.Final
+ ${mapstruct-jdk8.version}
provided
@@ -93,6 +93,15 @@
Name of the benchmark Uber-JAR to generate.
-->
benchmarks
+ 3.1
+ 2.2
+ 2.5.1
+ 2.4
+ 2.9.1
+ 2.6
+ 3.3
+ 2.2.1
+ 2.17
@@ -100,7 +109,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.1
+ ${compiler.plugin.version}
${javac.target}
${javac.target}
@@ -117,7 +126,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 2.2
+ ${shade.plugin.version}
package
@@ -162,31 +171,31 @@
maven-install-plugin
- 2.5.1
+ ${install.version}
maven-jar-plugin
- 2.4
+ ${jar.plugin.version}
maven-javadoc-plugin
- 2.9.1
+ ${javadoc.plugin.version}
maven-resources-plugin
- 2.6
+ ${resources.plugin.version}
maven-site-plugin
- 3.3
+ ${site.plugin.version}
maven-source-plugin
- 2.2.1
+ ${source.plugin.version}
maven-surefire-plugin
- 2.17
+ ${surefire.plugin.version}
diff --git a/performance-tests/src/main/java/com/baeldung/performancetests/MappingFrameworksPerformance.java b/performance-tests/src/main/java/com/baeldung/performancetests/MappingFrameworksPerformance.java
index 1c9e4c5dc4..66251eb078 100644
--- a/performance-tests/src/main/java/com/baeldung/performancetests/MappingFrameworksPerformance.java
+++ b/performance-tests/src/main/java/com/baeldung/performancetests/MappingFrameworksPerformance.java
@@ -1,4 +1,4 @@
-package com.baeldung.performancetests.benchmark;
+package com.baeldung.performancetests;
import com.baeldung.performancetests.dozer.DozerConverter;
import com.baeldung.performancetests.jmapper.JMapperConverter;
diff --git a/persistence-modules/activejdbc/pom.xml b/persistence-modules/activejdbc/pom.xml
index 47643cd639..84ce1c2b48 100644
--- a/persistence-modules/activejdbc/pom.xml
+++ b/persistence-modules/activejdbc/pom.xml
@@ -10,9 +10,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
@@ -41,16 +40,6 @@
-
- org.apache.maven.plugins
- maven-compiler-plugin
- ${maven-compiler-plugin.version}
-
- ${java.version}
- ${java.version}
- UTF-8
-
-
org.javalite
activejdbc-instrumentation
diff --git a/persistence-modules/apache-cayenne/pom.xml b/persistence-modules/apache-cayenne/pom.xml
index 7c94c5ba39..d728e18b33 100644
--- a/persistence-modules/apache-cayenne/pom.xml
+++ b/persistence-modules/apache-cayenne/pom.xml
@@ -10,9 +10,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/core-java-persistence/pom.xml b/persistence-modules/core-java-persistence/pom.xml
index 80c4053743..1224523ac7 100644
--- a/persistence-modules/core-java-persistence/pom.xml
+++ b/persistence-modules/core-java-persistence/pom.xml
@@ -10,9 +10,8 @@
com.baeldung
- parent-java
- 0.0.1-SNAPSHOT
- ../../parent-java
+ persistence-modules
+ 1.0.0-SNAPSHOT
@@ -60,19 +59,8 @@
-
- core-java-persistence
-
-
- src/main/resources
- true
-
-
-
-
42.2.5.jre7
- 8.0.15
3.10.0
2.4.0
3.2.0
diff --git a/persistence-modules/deltaspike/pom.xml b/persistence-modules/deltaspike/pom.xml
index 141412654f..871bacd18b 100644
--- a/persistence-modules/deltaspike/pom.xml
+++ b/persistence-modules/deltaspike/pom.xml
@@ -11,9 +11,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/elasticsearch/pom.xml b/persistence-modules/elasticsearch/pom.xml
index 878dd5847b..654d43d622 100644
--- a/persistence-modules/elasticsearch/pom.xml
+++ b/persistence-modules/elasticsearch/pom.xml
@@ -9,9 +9,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/hbase/README.md b/persistence-modules/hbase/README.md
index df2683b27a..ea76c4ec4b 100644
--- a/persistence-modules/hbase/README.md
+++ b/persistence-modules/hbase/README.md
@@ -1,3 +1,3 @@
### Relevant articles
-- [HBase with Java](http://www.baeldung.com/hbase)
+- [HBase with Java](https://www.baeldung.com/hbase)
diff --git a/persistence-modules/hbase/pom.xml b/persistence-modules/hbase/pom.xml
index 9403239fb2..f54f2d8985 100644
--- a/persistence-modules/hbase/pom.xml
+++ b/persistence-modules/hbase/pom.xml
@@ -7,9 +7,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/hbase/src/main/java/org/baeldung/hbase/HBaseClientOperations.java b/persistence-modules/hbase/src/main/java/com/baeldung/hbase/HBaseClientOperations.java
similarity index 99%
rename from persistence-modules/hbase/src/main/java/org/baeldung/hbase/HBaseClientOperations.java
rename to persistence-modules/hbase/src/main/java/com/baeldung/hbase/HBaseClientOperations.java
index c78eacc834..f889e2eb56 100644
--- a/persistence-modules/hbase/src/main/java/org/baeldung/hbase/HBaseClientOperations.java
+++ b/persistence-modules/hbase/src/main/java/com/baeldung/hbase/HBaseClientOperations.java
@@ -1,4 +1,4 @@
-package org.baeldung.hbase;
+package com.baeldung.hbase;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HColumnDescriptor;
diff --git a/persistence-modules/hbase/src/main/java/org/baeldung/hbase/HbaseClientExample.java b/persistence-modules/hbase/src/main/java/com/baeldung/hbase/HbaseClientExample.java
similarity index 97%
rename from persistence-modules/hbase/src/main/java/org/baeldung/hbase/HbaseClientExample.java
rename to persistence-modules/hbase/src/main/java/com/baeldung/hbase/HbaseClientExample.java
index 07cb7df480..5546f15e36 100644
--- a/persistence-modules/hbase/src/main/java/org/baeldung/hbase/HbaseClientExample.java
+++ b/persistence-modules/hbase/src/main/java/com/baeldung/hbase/HbaseClientExample.java
@@ -1,4 +1,4 @@
-package org.baeldung.hbase;
+package com.baeldung.hbase;
import com.google.protobuf.ServiceException;
diff --git a/persistence-modules/hibernate-mapping/pom.xml b/persistence-modules/hibernate-mapping/pom.xml
index a0a2a047e3..ac7952fa2b 100644
--- a/persistence-modules/hibernate-mapping/pom.xml
+++ b/persistence-modules/hibernate-mapping/pom.xml
@@ -4,14 +4,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
hibernate-mapping
- 1.0.0-SNAPSHOT
hibernate-mapping
com.baeldung
persistence-modules
1.0.0-SNAPSHOT
- ..
@@ -55,21 +53,11 @@
-
- hibernate-mapping
-
-
- src/main/resources
- true
-
-
-
-
5.3.10.Final
3.8.0
6.0.16.Final
- 3.0.1-b11
+ 3.0.1-b11
1.0.3
1.3
diff --git a/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Customer.java b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Customer.java
index 5997602205..5589601da8 100644
--- a/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Customer.java
+++ b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Customer.java
@@ -1,4 +1,4 @@
-package com.baeldung.fetchMode;
+package com.baeldung.hibernate.fetchMode;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
diff --git a/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Order.java b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Order.java
index c031972830..aa9c517321 100644
--- a/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Order.java
+++ b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Order.java
@@ -1,4 +1,4 @@
-package com.baeldung.fetchMode;
+package com.baeldung.hibernate.fetchMode;
import javax.persistence.*;
diff --git a/persistence-modules/hibernate-ogm/pom.xml b/persistence-modules/hibernate-ogm/pom.xml
index bb15881788..8f42c28eee 100644
--- a/persistence-modules/hibernate-ogm/pom.xml
+++ b/persistence-modules/hibernate-ogm/pom.xml
@@ -8,9 +8,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
@@ -33,12 +32,6 @@
${narayana-jta.version}
-
- junit
- junit
- ${junit.version}
- test
-
org.easytesting
fest-assert
@@ -47,16 +40,6 @@
-
- hibernate-ogm
-
-
- src/main/resources
- true
-
-
-
-
5.4.0.Final
1.4
diff --git a/persistence-modules/hibernate5-2/README.md b/persistence-modules/hibernate5-2/README.md
index c41b5307d0..330708f6d3 100644
--- a/persistence-modules/hibernate5-2/README.md
+++ b/persistence-modules/hibernate5-2/README.md
@@ -6,4 +6,6 @@ This module contains articles about Hibernate 5.
- [Hibernate Error “Not all named parameters have been set”](https://www.baeldung.com/hibernate-error-named-parameters-not-set)
- [FetchMode in Spring Data JPA](https://www.baeldung.com/spring-data-jpa-fetchmode)
- [JPA/Hibernate Persistence Context](https://www.baeldung.com/jpa-hibernate-persistence-context)
+- [FetchMode in Hibernate](https://www.baeldung.com/hibernate-fetchmode)
+- [Various Logging Levels in Hibernate](https://www.baeldung.com/hibernate-logging-levels)
- [[<-- Prev]](/hibernate5)
diff --git a/persistence-modules/hibernate5-2/pom.xml b/persistence-modules/hibernate5-2/pom.xml
index dfee4bb81e..15d42b3244 100644
--- a/persistence-modules/hibernate5-2/pom.xml
+++ b/persistence-modules/hibernate5-2/pom.xml
@@ -10,16 +10,15 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
org.hibernate
hibernate-core
- 5.4.7.Final
+ ${hibernate-core.version}
org.springframework.boot
@@ -51,19 +50,25 @@
com.h2database
h2
- 1.4.200
+ ${h2.version}
org.apache.commons
commons-lang3
- 3.8.1
+ ${commons.lang3.version}
+ 5.4.7.Final
+ 1.4.200
+ 3.8.1
true
2.1.7.RELEASE
+ 5.4.7.Final
+ 1.4.200
+ 3.8.1
diff --git a/persistence-modules/hibernate5-2/src/test/java/com/baeldung/hibernatelogging/HibernateLoggingIntegrationTest.java b/persistence-modules/hibernate5-2/src/test/java/com/baeldung/hibernate/logging/HibernateLoggingIntegrationTest.java
similarity index 97%
rename from persistence-modules/hibernate5-2/src/test/java/com/baeldung/hibernatelogging/HibernateLoggingIntegrationTest.java
rename to persistence-modules/hibernate5-2/src/test/java/com/baeldung/hibernate/logging/HibernateLoggingIntegrationTest.java
index 8ec722671d..f609c75834 100644
--- a/persistence-modules/hibernate5-2/src/test/java/com/baeldung/hibernatelogging/HibernateLoggingIntegrationTest.java
+++ b/persistence-modules/hibernate5-2/src/test/java/com/baeldung/hibernate/logging/HibernateLoggingIntegrationTest.java
@@ -1,4 +1,4 @@
-package com.baeldung.hibernatelogging;
+package com.baeldung.hibernate.logging;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;
diff --git a/persistence-modules/hibernate5/pom.xml b/persistence-modules/hibernate5/pom.xml
index ec06136f9c..ffeff5ee4a 100644
--- a/persistence-modules/hibernate5/pom.xml
+++ b/persistence-modules/hibernate5/pom.xml
@@ -9,9 +9,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
@@ -41,11 +40,6 @@
geodb
${geodb.version}
-
- org.hibernate
- hibernate-c3p0
- ${hibernate.version}
-
mysql
mysql-connector-java
@@ -66,44 +60,14 @@
jackson-databind
${jackson.version}
-
- net.bytebuddy
- byte-buddy
- ${byte-buddy.version}
-
-
- org.hibernate
- hibernate-jpamodelgen
- ${hibernate.version}
-
-
- org.openjdk.jmh
- jmh-core
- ${openjdk-jmh.version}
-
org.openjdk.jmh
jmh-generator-annprocess
${openjdk-jmh.version}
-
- javax.xml.bind
- jaxb-api
- ${jaxb-api.version}
-
-
- hibernate5
-
-
- src/test/resources
- true
-
-
-
-
geodb-repo
@@ -119,8 +83,6 @@
3.8.0
1.21
0.9
- 1.9.5
- 2.3.0
diff --git a/persistence-modules/influxdb/pom.xml b/persistence-modules/influxdb/pom.xml
index 7531ad8217..23ae64dca1 100644
--- a/persistence-modules/influxdb/pom.xml
+++ b/persistence-modules/influxdb/pom.xml
@@ -10,9 +10,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/java-cassandra/pom.xml b/persistence-modules/java-cassandra/pom.xml
index 6628a393fa..54879fb321 100644
--- a/persistence-modules/java-cassandra/pom.xml
+++ b/persistence-modules/java-cassandra/pom.xml
@@ -3,14 +3,12 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
java-cassandra
- 1.0.0-SNAPSHOT
java-cassandra
com.baeldung
- parent-java
- 0.0.1-SNAPSHOT
- ../../parent-java
+ persistence-modules
+ 1.0.0-SNAPSHOT
@@ -40,26 +38,13 @@
java-driver-query-builder
${datastax-cassandra.version}
-
-
- io.netty
- netty-handler
- ${io-netty.version}
-
-
-
- java-cassandra
-
-
3.1.2
3.1.1.0
4.1.0
- 4.1.34.Final
- 18.0
diff --git a/persistence-modules/java-cockroachdb/pom.xml b/persistence-modules/java-cockroachdb/pom.xml
index 750cbfce4c..e8c6365ca3 100644
--- a/persistence-modules/java-cockroachdb/pom.xml
+++ b/persistence-modules/java-cockroachdb/pom.xml
@@ -8,9 +8,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/java-jdbi/pom.xml b/persistence-modules/java-jdbi/pom.xml
index 0d978dc164..eb0de45593 100644
--- a/persistence-modules/java-jdbi/pom.xml
+++ b/persistence-modules/java-jdbi/pom.xml
@@ -8,9 +8,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/java-jpa-2/pom.xml b/persistence-modules/java-jpa-2/pom.xml
index cc9e69fcaa..f79f6f1633 100644
--- a/persistence-modules/java-jpa-2/pom.xml
+++ b/persistence-modules/java-jpa-2/pom.xml
@@ -7,9 +7,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../pom.xml
@@ -63,7 +62,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.5.1
+ ${maven-compiler-plugin.version}
-proc:none
@@ -71,7 +70,7 @@
org.bsc.maven
maven-processor-plugin
- 3.3.3
+ ${maven-processor-plugin.version}
process
@@ -91,7 +90,7 @@
org.codehaus.mojo
build-helper-maven-plugin
- 3.0.0
+ ${build-helper-maven-plugin.version}
add-source
@@ -116,6 +115,9 @@
42.2.5
2.2
3.11.1
+ 3.5.1
+ 3.3.3
+ 3.0.0
\ No newline at end of file
diff --git a/persistence-modules/java-jpa/pom.xml b/persistence-modules/java-jpa/pom.xml
index a979cf7e65..762c541d96 100644
--- a/persistence-modules/java-jpa/pom.xml
+++ b/persistence-modules/java-jpa/pom.xml
@@ -8,9 +8,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../pom.xml
diff --git a/persistence-modules/java-mongodb/pom.xml b/persistence-modules/java-mongodb/pom.xml
index 1e59bd9064..d62240927a 100644
--- a/persistence-modules/java-mongodb/pom.xml
+++ b/persistence-modules/java-mongodb/pom.xml
@@ -9,9 +9,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
@@ -35,8 +34,6 @@
- 1.8
- 1.8
3.10.1
1.11
1.5.3
diff --git a/persistence-modules/java-mongodb/src/test/java/com/baeldung/aggregation/AggregationLiveTest.java b/persistence-modules/java-mongodb/src/test/java/com/baeldung/aggregation/AggregationLiveTest.java
new file mode 100644
index 0000000000..62ab13563a
--- /dev/null
+++ b/persistence-modules/java-mongodb/src/test/java/com/baeldung/aggregation/AggregationLiveTest.java
@@ -0,0 +1,111 @@
+package com.baeldung.aggregation;
+
+import static com.mongodb.client.model.Aggregates.count;
+import static com.mongodb.client.model.Aggregates.group;
+import static com.mongodb.client.model.Aggregates.limit;
+import static com.mongodb.client.model.Aggregates.match;
+import static com.mongodb.client.model.Aggregates.out;
+import static com.mongodb.client.model.Aggregates.project;
+import static com.mongodb.client.model.Aggregates.sort;
+import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Arrays;
+
+import org.bson.Document;
+import org.bson.conversions.Bson;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.mongodb.client.MongoClient;
+import com.mongodb.client.MongoClients;
+import com.mongodb.client.MongoCollection;
+import com.mongodb.client.MongoDatabase;
+import com.mongodb.client.model.Accumulators;
+import com.mongodb.client.model.Filters;
+import com.mongodb.client.model.Projections;
+import com.mongodb.client.model.Sorts;
+
+public class AggregationLiveTest {
+
+ private static final String DATABASE = "world";
+ private static final String COLLECTION = "countries";
+ private static final String DATASET_JSON = "/countrydata.json";
+ private static MongoClient mongoClient;
+ private static MongoDatabase database;
+ private static MongoCollection collection;
+
+ @BeforeClass
+ public static void setUpDB() throws IOException {
+ mongoClient = MongoClients.create();
+ database = mongoClient.getDatabase(DATABASE);
+ collection = database.getCollection(COLLECTION);
+
+ collection.drop();
+
+ InputStream is = AggregationLiveTest.class.getResourceAsStream(DATASET_JSON);
+ BufferedReader reader = new BufferedReader(new InputStreamReader(is));
+ reader.lines()
+ .forEach(line -> collection.insertOne(Document.parse(line)));
+ reader.close();
+ }
+
+ @Test
+ public void givenCountryCollection_whenEnglishSpeakingCountriesCounted_thenNinetyOne() {
+ Document englishSpeakingCountries = collection.aggregate(Arrays.asList(match(Filters.eq("languages.name", "English")), count()))
+ .first();
+
+ assertEquals(91, englishSpeakingCountries.get("count"));
+ }
+
+ @Test
+ public void givenCountryCollection_whenAreaSortedDescending_thenSuccess() {
+
+ collection.aggregate(Arrays.asList(sort(Sorts.descending("area")), limit(7), out("largest_seven")))
+ .toCollection();
+
+ MongoCollection largestSeven = database.getCollection("largest_seven");
+
+ assertEquals(7, largestSeven.countDocuments());
+
+ Document usa = largestSeven.find(Filters.eq("alpha3Code", "USA"))
+ .first();
+
+ assertNotNull(usa);
+ }
+
+ @Test
+ public void givenCountryCollection_whenCountedRegionWise_thenMaxInAfrica() {
+ Document maxCountriedRegion = collection.aggregate(Arrays.asList(group("$region", Accumulators.sum("tally", 1)), sort(Sorts.descending("tally"))))
+ .first();
+ assertTrue(maxCountriedRegion.containsValue("Africa"));
+ }
+
+ @Test
+ public void givenCountryCollection_whenNeighborsCalculated_thenMaxIsFifteenInChina() {
+ Bson borderingCountriesCollection = project(Projections.fields(Projections.excludeId(), Projections.include("name"), Projections.computed("borderingCountries", Projections.computed("$size", "$borders"))));
+
+ int maxValue = collection.aggregate(Arrays.asList(borderingCountriesCollection, group(null, Accumulators.max("max", "$borderingCountries"))))
+ .first()
+ .getInteger("max");
+
+ assertEquals(15, maxValue);
+
+ Document maxNeighboredCountry = collection.aggregate(Arrays.asList(borderingCountriesCollection, match(Filters.eq("borderingCountries", maxValue))))
+ .first();
+ assertTrue(maxNeighboredCountry.containsValue("China"));
+
+ }
+
+ @AfterClass
+ public static void cleanUp() {
+ mongoClient.close();
+ }
+
+}
diff --git a/persistence-modules/java-mongodb/src/test/resources/countrydata.json b/persistence-modules/java-mongodb/src/test/resources/countrydata.json
new file mode 100644
index 0000000000..81213c31e7
--- /dev/null
+++ b/persistence-modules/java-mongodb/src/test/resources/countrydata.json
@@ -0,0 +1,250 @@
+{"name":"Afghanistan","topLevelDomain":[".af"],"alpha2Code":"AF","alpha3Code":"AFG","callingCodes":["93"],"capital":"Kabul","altSpellings":["AF","Afġānistān"],"region":"Asia","subregion":"Southern Asia","population":27657145,"latlng":[33.0,65.0],"demonym":"Afghan","area":652230.0,"gini":27.8,"timezones":["UTC+04:30"],"borders":["IRN","PAK","TKM","UZB","TJK","CHN"],"nativeName":"افغانستان","numericCode":"004","currencies":[{"code":"AFN","name":"Afghan afghani","symbol":"؋"}],"languages":[{"iso639_1":"ps","iso639_2":"pus","name":"Pashto","nativeName":"پښتو"},{"iso639_1":"uz","iso639_2":"uzb","name":"Uzbek","nativeName":"Oʻzbek"},{"iso639_1":"tk","iso639_2":"tuk","name":"Turkmen","nativeName":"Türkmen"}],"translations":{"de":"Afghanistan","es":"Afganistán","fr":"Afghanistan","ja":"アフガニスタン","it":"Afghanistan","br":"Afeganistão","pt":"Afeganistão","nl":"Afghanistan","hr":"Afganistan","fa":"افغانستان"},"flag":"https://restcountries.eu/data/afg.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"AFG"}
+{"name":"Åland Islands","topLevelDomain":[".ax"],"alpha2Code":"AX","alpha3Code":"ALA","callingCodes":["358"],"capital":"Mariehamn","altSpellings":["AX","Aaland","Aland","Ahvenanmaa"],"region":"Europe","subregion":"Northern Europe","population":28875,"latlng":[60.116667,19.9],"demonym":"Ålandish","area":1580.0,"gini":null,"timezones":["UTC+02:00"],"borders":[],"nativeName":"Åland","numericCode":"248","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"sv","iso639_2":"swe","name":"Swedish","nativeName":"svenska"}],"translations":{"de":"Åland","es":"Alandia","fr":"Åland","ja":"オーランド諸島","it":"Isole Aland","br":"Ilhas de Aland","pt":"Ilhas de Aland","nl":"Ålandeilanden","hr":"Ålandski otoci","fa":"جزایر الند"},"flag":"https://restcountries.eu/data/ala.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":""}
+{"name":"Albania","topLevelDomain":[".al"],"alpha2Code":"AL","alpha3Code":"ALB","callingCodes":["355"],"capital":"Tirana","altSpellings":["AL","Shqipëri","Shqipëria","Shqipnia"],"region":"Europe","subregion":"Southern Europe","population":2886026,"latlng":[41.0,20.0],"demonym":"Albanian","area":28748.0,"gini":34.5,"timezones":["UTC+01:00"],"borders":["MNE","GRC","MKD","KOS"],"nativeName":"Shqipëria","numericCode":"008","currencies":[{"code":"ALL","name":"Albanian lek","symbol":"L"}],"languages":[{"iso639_1":"sq","iso639_2":"sqi","name":"Albanian","nativeName":"Shqip"}],"translations":{"de":"Albanien","es":"Albania","fr":"Albanie","ja":"アルバニア","it":"Albania","br":"Albânia","pt":"Albânia","nl":"Albanië","hr":"Albanija","fa":"آلبانی"},"flag":"https://restcountries.eu/data/alb.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":"ALB"}
+{"name":"Algeria","topLevelDomain":[".dz"],"alpha2Code":"DZ","alpha3Code":"DZA","callingCodes":["213"],"capital":"Algiers","altSpellings":["DZ","Dzayer","Algérie"],"region":"Africa","subregion":"Northern Africa","population":40400000,"latlng":[28.0,3.0],"demonym":"Algerian","area":2381741.0,"gini":35.3,"timezones":["UTC+01:00"],"borders":["TUN","LBY","NER","ESH","MRT","MLI","MAR"],"nativeName":"الجزائر","numericCode":"012","currencies":[{"code":"DZD","name":"Algerian dinar","symbol":"د.ج"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Algerien","es":"Argelia","fr":"Algérie","ja":"アルジェリア","it":"Algeria","br":"Argélia","pt":"Argélia","nl":"Algerije","hr":"Alžir","fa":"الجزایر"},"flag":"https://restcountries.eu/data/dza.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"ALG"}
+{"name":"American Samoa","topLevelDomain":[".as"],"alpha2Code":"AS","alpha3Code":"ASM","callingCodes":["1684"],"capital":"Pago Pago","altSpellings":["AS","Amerika Sāmoa","Amelika Sāmoa","Sāmoa Amelika"],"region":"Oceania","subregion":"Polynesia","population":57100,"latlng":[-14.33333333,-170.0],"demonym":"American Samoan","area":199.0,"gini":null,"timezones":["UTC-11:00"],"borders":[],"nativeName":"American Samoa","numericCode":"016","currencies":[{"code":"USD","name":"United State Dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"sm","iso639_2":"smo","name":"Samoan","nativeName":"gagana fa'a Samoa"}],"translations":{"de":"Amerikanisch-Samoa","es":"Samoa Americana","fr":"Samoa américaines","ja":"アメリカ領サモア","it":"Samoa Americane","br":"Samoa Americana","pt":"Samoa Americana","nl":"Amerikaans Samoa","hr":"Američka Samoa","fa":"ساموآی آمریکا"},"flag":"https://restcountries.eu/data/asm.svg","regionalBlocs":[],"cioc":"ASA"}
+{"name":"Andorra","topLevelDomain":[".ad"],"alpha2Code":"AD","alpha3Code":"AND","callingCodes":["376"],"capital":"Andorra la Vella","altSpellings":["AD","Principality of Andorra","Principat d'Andorra"],"region":"Europe","subregion":"Southern Europe","population":78014,"latlng":[42.5,1.5],"demonym":"Andorran","area":468.0,"gini":null,"timezones":["UTC+01:00"],"borders":["FRA","ESP"],"nativeName":"Andorra","numericCode":"020","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"ca","iso639_2":"cat","name":"Catalan","nativeName":"català"}],"translations":{"de":"Andorra","es":"Andorra","fr":"Andorre","ja":"アンドラ","it":"Andorra","br":"Andorra","pt":"Andorra","nl":"Andorra","hr":"Andora","fa":"آندورا"},"flag":"https://restcountries.eu/data/and.svg","regionalBlocs":[],"cioc":"AND"}
+{"name":"Angola","topLevelDomain":[".ao"],"alpha2Code":"AO","alpha3Code":"AGO","callingCodes":["244"],"capital":"Luanda","altSpellings":["AO","República de Angola","ʁɛpublika de an'ɡɔla"],"region":"Africa","subregion":"Middle Africa","population":25868000,"latlng":[-12.5,18.5],"demonym":"Angolan","area":1246700.0,"gini":58.6,"timezones":["UTC+01:00"],"borders":["COG","COD","ZMB","NAM"],"nativeName":"Angola","numericCode":"024","currencies":[{"code":"AOA","name":"Angolan kwanza","symbol":"Kz"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Angola","es":"Angola","fr":"Angola","ja":"アンゴラ","it":"Angola","br":"Angola","pt":"Angola","nl":"Angola","hr":"Angola","fa":"آنگولا"},"flag":"https://restcountries.eu/data/ago.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"ANG"}
+{"name":"Anguilla","topLevelDomain":[".ai"],"alpha2Code":"AI","alpha3Code":"AIA","callingCodes":["1264"],"capital":"The Valley","altSpellings":["AI"],"region":"Americas","subregion":"Caribbean","population":13452,"latlng":[18.25,-63.16666666],"demonym":"Anguillian","area":91.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Anguilla","numericCode":"660","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Anguilla","es":"Anguilla","fr":"Anguilla","ja":"アンギラ","it":"Anguilla","br":"Anguila","pt":"Anguila","nl":"Anguilla","hr":"Angvila","fa":"آنگویلا"},"flag":"https://restcountries.eu/data/aia.svg","regionalBlocs":[],"cioc":""}
+{"name":"Antarctica","topLevelDomain":[".aq"],"alpha2Code":"AQ","alpha3Code":"ATA","callingCodes":["672"],"capital":"","altSpellings":[],"region":"Polar","subregion":"","population":1000,"latlng":[-74.65,4.48],"demonym":"","area":1.4E7,"gini":null,"timezones":["UTC-03:00","UTC+03:00","UTC+05:00","UTC+06:00","UTC+07:00","UTC+08:00","UTC+10:00","UTC+12:00"],"borders":[],"nativeName":"Antarctica","numericCode":"010","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"},{"code":"GBP","name":"British pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Antarktika","es":"Antártida","fr":"Antarctique","ja":"南極大陸","it":"Antartide","br":"Antártida","pt":"Antárctida","nl":"Antarctica","hr":"Antarktika","fa":"جنوبگان"},"flag":"https://restcountries.eu/data/ata.svg","regionalBlocs":[],"cioc":""}
+{"name":"Antigua and Barbuda","topLevelDomain":[".ag"],"alpha2Code":"AG","alpha3Code":"ATG","callingCodes":["1268"],"capital":"Saint John's","altSpellings":["AG"],"region":"Americas","subregion":"Caribbean","population":86295,"latlng":[17.05,-61.8],"demonym":"Antiguan, Barbudan","area":442.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Antigua and Barbuda","numericCode":"028","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Antigua und Barbuda","es":"Antigua y Barbuda","fr":"Antigua-et-Barbuda","ja":"アンティグア・バーブーダ","it":"Antigua e Barbuda","br":"Antígua e Barbuda","pt":"Antígua e Barbuda","nl":"Antigua en Barbuda","hr":"Antigva i Barbuda","fa":"آنتیگوا و باربودا"},"flag":"https://restcountries.eu/data/atg.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"ANT"}
+{"name":"Argentina","topLevelDomain":[".ar"],"alpha2Code":"AR","alpha3Code":"ARG","callingCodes":["54"],"capital":"Buenos Aires","altSpellings":["AR","Argentine Republic","República Argentina"],"region":"Americas","subregion":"South America","population":43590400,"latlng":[-34.0,-64.0],"demonym":"Argentinean","area":2780400.0,"gini":44.5,"timezones":["UTC-03:00"],"borders":["BOL","BRA","CHL","PRY","URY"],"nativeName":"Argentina","numericCode":"032","currencies":[{"code":"ARS","name":"Argentine peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"},{"iso639_1":"gn","iso639_2":"grn","name":"Guaraní","nativeName":"Avañe'ẽ"}],"translations":{"de":"Argentinien","es":"Argentina","fr":"Argentine","ja":"アルゼンチン","it":"Argentina","br":"Argentina","pt":"Argentina","nl":"Argentinië","hr":"Argentina","fa":"آرژانتین"},"flag":"https://restcountries.eu/data/arg.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"ARG"}
+{"name":"Armenia","topLevelDomain":[".am"],"alpha2Code":"AM","alpha3Code":"ARM","callingCodes":["374"],"capital":"Yerevan","altSpellings":["AM","Hayastan","Republic of Armenia","Հայաստանի Հանրապետություն"],"region":"Asia","subregion":"Western Asia","population":2994400,"latlng":[40.0,45.0],"demonym":"Armenian","area":29743.0,"gini":30.9,"timezones":["UTC+04:00"],"borders":["AZE","GEO","IRN","TUR"],"nativeName":"Հայաստան","numericCode":"051","currencies":[{"code":"AMD","name":"Armenian dram","symbol":null}],"languages":[{"iso639_1":"hy","iso639_2":"hye","name":"Armenian","nativeName":"Հայերեն"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Armenien","es":"Armenia","fr":"Arménie","ja":"アルメニア","it":"Armenia","br":"Armênia","pt":"Arménia","nl":"Armenië","hr":"Armenija","fa":"ارمنستان"},"flag":"https://restcountries.eu/data/arm.svg","regionalBlocs":[{"acronym":"EEU","name":"Eurasian Economic Union","otherAcronyms":["EAEU"],"otherNames":[]}],"cioc":"ARM"}
+{"name":"Aruba","topLevelDomain":[".aw"],"alpha2Code":"AW","alpha3Code":"ABW","callingCodes":["297"],"capital":"Oranjestad","altSpellings":["AW"],"region":"Americas","subregion":"Caribbean","population":107394,"latlng":[12.5,-69.96666666],"demonym":"Aruban","area":180.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Aruba","numericCode":"533","currencies":[{"code":"AWG","name":"Aruban florin","symbol":"ƒ"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"},{"iso639_1":"pa","iso639_2":"pan","name":"(Eastern) Punjabi","nativeName":"ਪੰਜਾਬੀ"}],"translations":{"de":"Aruba","es":"Aruba","fr":"Aruba","ja":"アルバ","it":"Aruba","br":"Aruba","pt":"Aruba","nl":"Aruba","hr":"Aruba","fa":"آروبا"},"flag":"https://restcountries.eu/data/abw.svg","regionalBlocs":[],"cioc":"ARU"}
+{"name":"Australia","topLevelDomain":[".au"],"alpha2Code":"AU","alpha3Code":"AUS","callingCodes":["61"],"capital":"Canberra","altSpellings":["AU"],"region":"Oceania","subregion":"Australia and New Zealand","population":24117360,"latlng":[-27.0,133.0],"demonym":"Australian","area":7692024.0,"gini":30.5,"timezones":["UTC+05:00","UTC+06:30","UTC+07:00","UTC+08:00","UTC+09:30","UTC+10:00","UTC+10:30","UTC+11:30"],"borders":[],"nativeName":"Australia","numericCode":"036","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Australien","es":"Australia","fr":"Australie","ja":"オーストラリア","it":"Australia","br":"Austrália","pt":"Austrália","nl":"Australië","hr":"Australija","fa":"استرالیا"},"flag":"https://restcountries.eu/data/aus.svg","regionalBlocs":[],"cioc":"AUS"}
+{"name":"Austria","topLevelDomain":[".at"],"alpha2Code":"AT","alpha3Code":"AUT","callingCodes":["43"],"capital":"Vienna","altSpellings":["AT","Österreich","Osterreich","Oesterreich"],"region":"Europe","subregion":"Western Europe","population":8725931,"latlng":[47.33333333,13.33333333],"demonym":"Austrian","area":83871.0,"gini":26.0,"timezones":["UTC+01:00"],"borders":["CZE","DEU","HUN","ITA","LIE","SVK","SVN","CHE"],"nativeName":"Österreich","numericCode":"040","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"}],"translations":{"de":"Österreich","es":"Austria","fr":"Autriche","ja":"オーストリア","it":"Austria","br":"áustria","pt":"áustria","nl":"Oostenrijk","hr":"Austrija","fa":"اتریش"},"flag":"https://restcountries.eu/data/aut.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"AUT"}
+{"name":"Azerbaijan","topLevelDomain":[".az"],"alpha2Code":"AZ","alpha3Code":"AZE","callingCodes":["994"],"capital":"Baku","altSpellings":["AZ","Republic of Azerbaijan","Azərbaycan Respublikası"],"region":"Asia","subregion":"Western Asia","population":9730500,"latlng":[40.5,47.5],"demonym":"Azerbaijani","area":86600.0,"gini":33.7,"timezones":["UTC+04:00"],"borders":["ARM","GEO","IRN","RUS","TUR"],"nativeName":"Azərbaycan","numericCode":"031","currencies":[{"code":"AZN","name":"Azerbaijani manat","symbol":null}],"languages":[{"iso639_1":"az","iso639_2":"aze","name":"Azerbaijani","nativeName":"azərbaycan dili"}],"translations":{"de":"Aserbaidschan","es":"Azerbaiyán","fr":"Azerbaïdjan","ja":"アゼルバイジャン","it":"Azerbaijan","br":"Azerbaijão","pt":"Azerbaijão","nl":"Azerbeidzjan","hr":"Azerbajdžan","fa":"آذربایجان"},"flag":"https://restcountries.eu/data/aze.svg","regionalBlocs":[],"cioc":"AZE"}
+{"name":"Bahamas","topLevelDomain":[".bs"],"alpha2Code":"BS","alpha3Code":"BHS","callingCodes":["1242"],"capital":"Nassau","altSpellings":["BS","Commonwealth of the Bahamas"],"region":"Americas","subregion":"Caribbean","population":378040,"latlng":[24.25,-76.0],"demonym":"Bahamian","area":13943.0,"gini":null,"timezones":["UTC-05:00"],"borders":[],"nativeName":"Bahamas","numericCode":"044","currencies":[{"code":"BSD","name":"Bahamian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Bahamas","es":"Bahamas","fr":"Bahamas","ja":"バハマ","it":"Bahamas","br":"Bahamas","pt":"Baamas","nl":"Bahama’s","hr":"Bahami","fa":"باهاما"},"flag":"https://restcountries.eu/data/bhs.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"BAH"}
+{"name":"Bahrain","topLevelDomain":[".bh"],"alpha2Code":"BH","alpha3Code":"BHR","callingCodes":["973"],"capital":"Manama","altSpellings":["BH","Kingdom of Bahrain","Mamlakat al-Baḥrayn"],"region":"Asia","subregion":"Western Asia","population":1404900,"latlng":[26.0,50.55],"demonym":"Bahraini","area":765.0,"gini":null,"timezones":["UTC+03:00"],"borders":[],"nativeName":"البحرين","numericCode":"048","currencies":[{"code":"BHD","name":"Bahraini dinar","symbol":".د.ب"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Bahrain","es":"Bahrein","fr":"Bahreïn","ja":"バーレーン","it":"Bahrein","br":"Bahrein","pt":"Barém","nl":"Bahrein","hr":"Bahrein","fa":"بحرین"},"flag":"https://restcountries.eu/data/bhr.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"BRN"}
+{"name":"Bangladesh","topLevelDomain":[".bd"],"alpha2Code":"BD","alpha3Code":"BGD","callingCodes":["880"],"capital":"Dhaka","altSpellings":["BD","People's Republic of Bangladesh","Gônôprôjatôntri Bangladesh"],"region":"Asia","subregion":"Southern Asia","population":161006790,"latlng":[24.0,90.0],"demonym":"Bangladeshi","area":147570.0,"gini":32.1,"timezones":["UTC+06:00"],"borders":["MMR","IND"],"nativeName":"Bangladesh","numericCode":"050","currencies":[{"code":"BDT","name":"Bangladeshi taka","symbol":"৳"}],"languages":[{"iso639_1":"bn","iso639_2":"ben","name":"Bengali","nativeName":"বাংলা"}],"translations":{"de":"Bangladesch","es":"Bangladesh","fr":"Bangladesh","ja":"バングラデシュ","it":"Bangladesh","br":"Bangladesh","pt":"Bangladeche","nl":"Bangladesh","hr":"Bangladeš","fa":"بنگلادش"},"flag":"https://restcountries.eu/data/bgd.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"BAN"}
+{"name":"Barbados","topLevelDomain":[".bb"],"alpha2Code":"BB","alpha3Code":"BRB","callingCodes":["1246"],"capital":"Bridgetown","altSpellings":["BB"],"region":"Americas","subregion":"Caribbean","population":285000,"latlng":[13.16666666,-59.53333333],"demonym":"Barbadian","area":430.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Barbados","numericCode":"052","currencies":[{"code":"BBD","name":"Barbadian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Barbados","es":"Barbados","fr":"Barbade","ja":"バルバドス","it":"Barbados","br":"Barbados","pt":"Barbados","nl":"Barbados","hr":"Barbados","fa":"باربادوس"},"flag":"https://restcountries.eu/data/brb.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"BAR"}
+{"name":"Belarus","topLevelDomain":[".by"],"alpha2Code":"BY","alpha3Code":"BLR","callingCodes":["375"],"capital":"Minsk","altSpellings":["BY","Bielaruś","Republic of Belarus","Белоруссия","Республика Беларусь","Belorussiya","Respublika Belarus’"],"region":"Europe","subregion":"Eastern Europe","population":9498700,"latlng":[53.0,28.0],"demonym":"Belarusian","area":207600.0,"gini":26.5,"timezones":["UTC+03:00"],"borders":["LVA","LTU","POL","RUS","UKR"],"nativeName":"Белару́сь","numericCode":"112","currencies":[{"code":"BYN","name":"New Belarusian ruble","symbol":"Br"},{"code":"BYR","name":"Old Belarusian ruble","symbol":"Br"}],"languages":[{"iso639_1":"be","iso639_2":"bel","name":"Belarusian","nativeName":"беларуская мова"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Weißrussland","es":"Bielorrusia","fr":"Biélorussie","ja":"ベラルーシ","it":"Bielorussia","br":"Bielorrússia","pt":"Bielorrússia","nl":"Wit-Rusland","hr":"Bjelorusija","fa":"بلاروس"},"flag":"https://restcountries.eu/data/blr.svg","regionalBlocs":[{"acronym":"EEU","name":"Eurasian Economic Union","otherAcronyms":["EAEU"],"otherNames":[]}],"cioc":"BLR"}
+{"name":"Belgium","topLevelDomain":[".be"],"alpha2Code":"BE","alpha3Code":"BEL","callingCodes":["32"],"capital":"Brussels","altSpellings":["BE","België","Belgie","Belgien","Belgique","Kingdom of Belgium","Koninkrijk België","Royaume de Belgique","Königreich Belgien"],"region":"Europe","subregion":"Western Europe","population":11319511,"latlng":[50.83333333,4.0],"demonym":"Belgian","area":30528.0,"gini":33.0,"timezones":["UTC+01:00"],"borders":["FRA","DEU","LUX","NLD"],"nativeName":"België","numericCode":"056","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"}],"translations":{"de":"Belgien","es":"Bélgica","fr":"Belgique","ja":"ベルギー","it":"Belgio","br":"Bélgica","pt":"Bélgica","nl":"België","hr":"Belgija","fa":"بلژیک"},"flag":"https://restcountries.eu/data/bel.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"BEL"}
+{"name":"Belize","topLevelDomain":[".bz"],"alpha2Code":"BZ","alpha3Code":"BLZ","callingCodes":["501"],"capital":"Belmopan","altSpellings":["BZ"],"region":"Americas","subregion":"Central America","population":370300,"latlng":[17.25,-88.75],"demonym":"Belizean","area":22966.0,"gini":53.1,"timezones":["UTC-06:00"],"borders":["GTM","MEX"],"nativeName":"Belize","numericCode":"084","currencies":[{"code":"BZD","name":"Belize dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Belize","es":"Belice","fr":"Belize","ja":"ベリーズ","it":"Belize","br":"Belize","pt":"Belize","nl":"Belize","hr":"Belize","fa":"بلیز"},"flag":"https://restcountries.eu/data/blz.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]},{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"BIZ"}
+{"name":"Benin","topLevelDomain":[".bj"],"alpha2Code":"BJ","alpha3Code":"BEN","callingCodes":["229"],"capital":"Porto-Novo","altSpellings":["BJ","Republic of Benin","République du Bénin"],"region":"Africa","subregion":"Western Africa","population":10653654,"latlng":[9.5,2.25],"demonym":"Beninese","area":112622.0,"gini":38.6,"timezones":["UTC+01:00"],"borders":["BFA","NER","NGA","TGO"],"nativeName":"Bénin","numericCode":"204","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Benin","es":"Benín","fr":"Bénin","ja":"ベナン","it":"Benin","br":"Benin","pt":"Benim","nl":"Benin","hr":"Benin","fa":"بنین"},"flag":"https://restcountries.eu/data/ben.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"BEN"}
+{"name":"Bermuda","topLevelDomain":[".bm"],"alpha2Code":"BM","alpha3Code":"BMU","callingCodes":["1441"],"capital":"Hamilton","altSpellings":["BM","The Islands of Bermuda","The Bermudas","Somers Isles"],"region":"Americas","subregion":"Northern America","population":61954,"latlng":[32.33333333,-64.75],"demonym":"Bermudian","area":54.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Bermuda","numericCode":"060","currencies":[{"code":"BMD","name":"Bermudian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Bermuda","es":"Bermudas","fr":"Bermudes","ja":"バミューダ","it":"Bermuda","br":"Bermudas","pt":"Bermudas","nl":"Bermuda","hr":"Bermudi","fa":"برمودا"},"flag":"https://restcountries.eu/data/bmu.svg","regionalBlocs":[],"cioc":"BER"}
+{"name":"Bhutan","topLevelDomain":[".bt"],"alpha2Code":"BT","alpha3Code":"BTN","callingCodes":["975"],"capital":"Thimphu","altSpellings":["BT","Kingdom of Bhutan"],"region":"Asia","subregion":"Southern Asia","population":775620,"latlng":[27.5,90.5],"demonym":"Bhutanese","area":38394.0,"gini":38.1,"timezones":["UTC+06:00"],"borders":["CHN","IND"],"nativeName":"ʼbrug-yul","numericCode":"064","currencies":[{"code":"BTN","name":"Bhutanese ngultrum","symbol":"Nu."},{"code":"INR","name":"Indian rupee","symbol":"₹"}],"languages":[{"iso639_1":"dz","iso639_2":"dzo","name":"Dzongkha","nativeName":"རྫོང་ཁ"}],"translations":{"de":"Bhutan","es":"Bután","fr":"Bhoutan","ja":"ブータン","it":"Bhutan","br":"Butão","pt":"Butão","nl":"Bhutan","hr":"Butan","fa":"بوتان"},"flag":"https://restcountries.eu/data/btn.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"BHU"}
+{"name":"Bolivia (Plurinational State of)","topLevelDomain":[".bo"],"alpha2Code":"BO","alpha3Code":"BOL","callingCodes":["591"],"capital":"Sucre","altSpellings":["BO","Buliwya","Wuliwya","Plurinational State of Bolivia","Estado Plurinacional de Bolivia","Buliwya Mamallaqta","Wuliwya Suyu","Tetã Volívia"],"region":"Americas","subregion":"South America","population":10985059,"latlng":[-17.0,-65.0],"demonym":"Bolivian","area":1098581.0,"gini":56.3,"timezones":["UTC-04:00"],"borders":["ARG","BRA","CHL","PRY","PER"],"nativeName":"Bolivia","numericCode":"068","currencies":[{"code":"BOB","name":"Bolivian boliviano","symbol":"Bs."}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"},{"iso639_1":"ay","iso639_2":"aym","name":"Aymara","nativeName":"aymar aru"},{"iso639_1":"qu","iso639_2":"que","name":"Quechua","nativeName":"Runa Simi"}],"translations":{"de":"Bolivien","es":"Bolivia","fr":"Bolivie","ja":"ボリビア多民族国","it":"Bolivia","br":"Bolívia","pt":"Bolívia","nl":"Bolivia","hr":"Bolivija","fa":"بولیوی"},"flag":"https://restcountries.eu/data/bol.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"BOL"}
+{"name":"Bonaire, Sint Eustatius and Saba","topLevelDomain":[".an",".nl"],"alpha2Code":"BQ","alpha3Code":"BES","callingCodes":["5997"],"capital":"Kralendijk","altSpellings":["BQ","Boneiru"],"region":"Americas","subregion":"Caribbean","population":17408,"latlng":[12.15,-68.266667],"demonym":"Dutch","area":294.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Bonaire","numericCode":"535","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"}],"translations":{"de":"Bonaire, Sint Eustatius und Saba","es":null,"fr":"Bonaire, Saint-Eustache et Saba","ja":null,"it":"Bonaire, Saint-Eustache e Saba","br":"Bonaire","pt":"Bonaire","nl":null,"hr":null,"fa":"بونیر"},"flag":"https://restcountries.eu/data/bes.svg","regionalBlocs":[],"cioc":null}
+{"name":"Bosnia and Herzegovina","topLevelDomain":[".ba"],"alpha2Code":"BA","alpha3Code":"BIH","callingCodes":["387"],"capital":"Sarajevo","altSpellings":["BA","Bosnia-Herzegovina","Босна и Херцеговина"],"region":"Europe","subregion":"Southern Europe","population":3531159,"latlng":[44.0,18.0],"demonym":"Bosnian, Herzegovinian","area":51209.0,"gini":36.2,"timezones":["UTC+01:00"],"borders":["HRV","MNE","SRB"],"nativeName":"Bosna i Hercegovina","numericCode":"070","currencies":[{"code":"BAM","name":"Bosnia and Herzegovina convertible mark","symbol":null}],"languages":[{"iso639_1":"bs","iso639_2":"bos","name":"Bosnian","nativeName":"bosanski jezik"},{"iso639_1":"hr","iso639_2":"hrv","name":"Croatian","nativeName":"hrvatski jezik"},{"iso639_1":"sr","iso639_2":"srp","name":"Serbian","nativeName":"српски језик"}],"translations":{"de":"Bosnien und Herzegowina","es":"Bosnia y Herzegovina","fr":"Bosnie-Herzégovine","ja":"ボスニア・ヘルツェゴビナ","it":"Bosnia ed Erzegovina","br":"Bósnia e Herzegovina","pt":"Bósnia e Herzegovina","nl":"Bosnië en Herzegovina","hr":"Bosna i Hercegovina","fa":"بوسنی و هرزگوین"},"flag":"https://restcountries.eu/data/bih.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":"BIH"}
+{"name":"Botswana","topLevelDomain":[".bw"],"alpha2Code":"BW","alpha3Code":"BWA","callingCodes":["267"],"capital":"Gaborone","altSpellings":["BW","Republic of Botswana","Lefatshe la Botswana"],"region":"Africa","subregion":"Southern Africa","population":2141206,"latlng":[-22.0,24.0],"demonym":"Motswana","area":582000.0,"gini":61.0,"timezones":["UTC+02:00"],"borders":["NAM","ZAF","ZMB","ZWE"],"nativeName":"Botswana","numericCode":"072","currencies":[{"code":"BWP","name":"Botswana pula","symbol":"P"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"tn","iso639_2":"tsn","name":"Tswana","nativeName":"Setswana"}],"translations":{"de":"Botswana","es":"Botswana","fr":"Botswana","ja":"ボツワナ","it":"Botswana","br":"Botsuana","pt":"Botsuana","nl":"Botswana","hr":"Bocvana","fa":"بوتسوانا"},"flag":"https://restcountries.eu/data/bwa.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"BOT"}
+{"name":"Bouvet Island","topLevelDomain":[".bv"],"alpha2Code":"BV","alpha3Code":"BVT","callingCodes":[""],"capital":"","altSpellings":["BV","Bouvetøya","Bouvet-øya"],"region":"","subregion":"","population":0,"latlng":[-54.43333333,3.4],"demonym":"","area":49.0,"gini":null,"timezones":["UTC+01:00"],"borders":[],"nativeName":"Bouvetøya","numericCode":"074","currencies":[{"code":"NOK","name":"Norwegian krone","symbol":"kr"}],"languages":[{"iso639_1":"no","iso639_2":"nor","name":"Norwegian","nativeName":"Norsk"},{"iso639_1":"nb","iso639_2":"nob","name":"Norwegian Bokmål","nativeName":"Norsk bokmål"},{"iso639_1":"nn","iso639_2":"nno","name":"Norwegian Nynorsk","nativeName":"Norsk nynorsk"}],"translations":{"de":"Bouvetinsel","es":"Isla Bouvet","fr":"Île Bouvet","ja":"ブーベ島","it":"Isola Bouvet","br":"Ilha Bouvet","pt":"Ilha Bouvet","nl":"Bouveteiland","hr":"Otok Bouvet","fa":"جزیره بووه"},"flag":"https://restcountries.eu/data/bvt.svg","regionalBlocs":[],"cioc":""}
+{"name":"Brazil","topLevelDomain":[".br"],"alpha2Code":"BR","alpha3Code":"BRA","callingCodes":["55"],"capital":"Brasília","altSpellings":["BR","Brasil","Federative Republic of Brazil","República Federativa do Brasil"],"region":"Americas","subregion":"South America","population":206135893,"latlng":[-10.0,-55.0],"demonym":"Brazilian","area":8515767.0,"gini":54.7,"timezones":["UTC-05:00","UTC-04:00","UTC-03:00","UTC-02:00"],"borders":["ARG","BOL","COL","GUF","GUY","PRY","PER","SUR","URY","VEN"],"nativeName":"Brasil","numericCode":"076","currencies":[{"code":"BRL","name":"Brazilian real","symbol":"R$"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Brasilien","es":"Brasil","fr":"Brésil","ja":"ブラジル","it":"Brasile","br":"Brasil","pt":"Brasil","nl":"Brazilië","hr":"Brazil","fa":"برزیل"},"flag":"https://restcountries.eu/data/bra.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"BRA"}
+{"name":"British Indian Ocean Territory","topLevelDomain":[".io"],"alpha2Code":"IO","alpha3Code":"IOT","callingCodes":["246"],"capital":"Diego Garcia","altSpellings":["IO"],"region":"Africa","subregion":"Eastern Africa","population":3000,"latlng":[-6.0,71.5],"demonym":"Indian","area":60.0,"gini":null,"timezones":["UTC+06:00"],"borders":[],"nativeName":"British Indian Ocean Territory","numericCode":"086","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Britisches Territorium im Indischen Ozean","es":"Territorio Británico del Océano Índico","fr":"Territoire britannique de l'océan Indien","ja":"イギリス領インド洋地域","it":"Territorio britannico dell'oceano indiano","br":"Território Britânico do Oceano íÍdico","pt":"Território Britânico do Oceano Índico","nl":"Britse Gebieden in de Indische Oceaan","hr":"Britanski Indijskooceanski teritorij","fa":"قلمرو بریتانیا در اقیانوس هند"},"flag":"https://restcountries.eu/data/iot.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":""}
+{"name":"United States Minor Outlying Islands","topLevelDomain":[".us"],"alpha2Code":"UM","alpha3Code":"UMI","callingCodes":[""],"capital":"","altSpellings":["UM"],"region":"Americas","subregion":"Northern America","population":300,"latlng":[],"demonym":"American","area":null,"gini":null,"timezones":["UTC-11:00","UTC-10:00","UTC+12:00"],"borders":[],"nativeName":"United States Minor Outlying Islands","numericCode":"581","currencies":[{"code":"USD","name":"United States Dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Kleinere Inselbesitzungen der Vereinigten Staaten","es":"Islas Ultramarinas Menores de Estados Unidos","fr":"Îles mineures éloignées des États-Unis","ja":"合衆国領有小離島","it":"Isole minori esterne degli Stati Uniti d'America","br":"Ilhas Menores Distantes dos Estados Unidos","pt":"Ilhas Menores Distantes dos Estados Unidos","nl":"Kleine afgelegen eilanden van de Verenigde Staten","hr":"Mali udaljeni otoci SAD-a","fa":"جزایر کوچک حاشیهای ایالات متحده آمریکا"},"flag":"https://restcountries.eu/data/umi.svg","regionalBlocs":[],"cioc":""}
+{"name":"Virgin Islands (British)","topLevelDomain":[".vg"],"alpha2Code":"VG","alpha3Code":"VGB","callingCodes":["1284"],"capital":"Road Town","altSpellings":["VG"],"region":"Americas","subregion":"Caribbean","population":28514,"latlng":[18.431383,-64.62305],"demonym":"Virgin Islander","area":151.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"British Virgin Islands","numericCode":"092","currencies":[{"code":null,"name":"[D]","symbol":"$"},{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Britische Jungferninseln","es":"Islas Vírgenes del Reino Unido","fr":"Îles Vierges britanniques","ja":"イギリス領ヴァージン諸島","it":"Isole Vergini Britanniche","br":"Ilhas Virgens Britânicas","pt":"Ilhas Virgens Britânicas","nl":"Britse Maagdeneilanden","hr":"Britanski Djevičanski Otoci","fa":"جزایر ویرجین بریتانیا"},"flag":"https://restcountries.eu/data/vgb.svg","regionalBlocs":[],"cioc":"IVB"}
+{"name":"Virgin Islands (U.S.)","topLevelDomain":[".vi"],"alpha2Code":"VI","alpha3Code":"VIR","callingCodes":["1 340"],"capital":"Charlotte Amalie","altSpellings":["VI","USVI","American Virgin Islands","U.S. Virgin Islands"],"region":"Americas","subregion":"Caribbean","population":114743,"latlng":[18.34,-64.93],"demonym":"Virgin Islander","area":346.36,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Virgin Islands of the United States","numericCode":"850","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Amerikanische Jungferninseln","es":"Islas Vírgenes de los Estados Unidos","fr":"Îles Vierges des États-Unis","ja":"アメリカ領ヴァージン諸島","it":"Isole Vergini americane","br":"Ilhas Virgens Americanas","pt":"Ilhas Virgens Americanas","nl":"Verenigde Staten Maagdeneilanden","hr":null,"fa":"جزایر ویرجین آمریکا"},"flag":"https://restcountries.eu/data/vir.svg","regionalBlocs":[],"cioc":"ISV"}
+{"name":"Brunei Darussalam","topLevelDomain":[".bn"],"alpha2Code":"BN","alpha3Code":"BRN","callingCodes":["673"],"capital":"Bandar Seri Begawan","altSpellings":["BN","Nation of Brunei"," the Abode of Peace"],"region":"Asia","subregion":"South-Eastern Asia","population":411900,"latlng":[4.5,114.66666666],"demonym":"Bruneian","area":5765.0,"gini":null,"timezones":["UTC+08:00"],"borders":["MYS"],"nativeName":"Negara Brunei Darussalam","numericCode":"096","currencies":[{"code":"BND","name":"Brunei dollar","symbol":"$"},{"code":"SGD","name":"Singapore dollar","symbol":"$"}],"languages":[{"iso639_1":"ms","iso639_2":"msa","name":"Malay","nativeName":"bahasa Melayu"}],"translations":{"de":"Brunei","es":"Brunei","fr":"Brunei","ja":"ブルネイ・ダルサラーム","it":"Brunei","br":"Brunei","pt":"Brunei","nl":"Brunei","hr":"Brunej","fa":"برونئی"},"flag":"https://restcountries.eu/data/brn.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"BRU"}
+{"name":"Bulgaria","topLevelDomain":[".bg"],"alpha2Code":"BG","alpha3Code":"BGR","callingCodes":["359"],"capital":"Sofia","altSpellings":["BG","Republic of Bulgaria","Република България"],"region":"Europe","subregion":"Eastern Europe","population":7153784,"latlng":[43.0,25.0],"demonym":"Bulgarian","area":110879.0,"gini":28.2,"timezones":["UTC+02:00"],"borders":["GRC","MKD","ROU","SRB","TUR"],"nativeName":"България","numericCode":"100","currencies":[{"code":"BGN","name":"Bulgarian lev","symbol":"лв"}],"languages":[{"iso639_1":"bg","iso639_2":"bul","name":"Bulgarian","nativeName":"български език"}],"translations":{"de":"Bulgarien","es":"Bulgaria","fr":"Bulgarie","ja":"ブルガリア","it":"Bulgaria","br":"Bulgária","pt":"Bulgária","nl":"Bulgarije","hr":"Bugarska","fa":"بلغارستان"},"flag":"https://restcountries.eu/data/bgr.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"BUL"}
+{"name":"Burkina Faso","topLevelDomain":[".bf"],"alpha2Code":"BF","alpha3Code":"BFA","callingCodes":["226"],"capital":"Ouagadougou","altSpellings":["BF"],"region":"Africa","subregion":"Western Africa","population":19034397,"latlng":[13.0,-2.0],"demonym":"Burkinabe","area":272967.0,"gini":39.8,"timezones":["UTC"],"borders":["BEN","CIV","GHA","MLI","NER","TGO"],"nativeName":"Burkina Faso","numericCode":"854","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ff","iso639_2":"ful","name":"Fula","nativeName":"Fulfulde"}],"translations":{"de":"Burkina Faso","es":"Burkina Faso","fr":"Burkina Faso","ja":"ブルキナファソ","it":"Burkina Faso","br":"Burkina Faso","pt":"Burquina Faso","nl":"Burkina Faso","hr":"Burkina Faso","fa":"بورکینافاسو"},"flag":"https://restcountries.eu/data/bfa.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"BUR"}
+{"name":"Burundi","topLevelDomain":[".bi"],"alpha2Code":"BI","alpha3Code":"BDI","callingCodes":["257"],"capital":"Bujumbura","altSpellings":["BI","Republic of Burundi","Republika y'Uburundi","République du Burundi"],"region":"Africa","subregion":"Eastern Africa","population":10114505,"latlng":[-3.5,30.0],"demonym":"Burundian","area":27834.0,"gini":33.3,"timezones":["UTC+02:00"],"borders":["COD","RWA","TZA"],"nativeName":"Burundi","numericCode":"108","currencies":[{"code":"BIF","name":"Burundian franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"rn","iso639_2":"run","name":"Kirundi","nativeName":"Ikirundi"}],"translations":{"de":"Burundi","es":"Burundi","fr":"Burundi","ja":"ブルンジ","it":"Burundi","br":"Burundi","pt":"Burúndi","nl":"Burundi","hr":"Burundi","fa":"بوروندی"},"flag":"https://restcountries.eu/data/bdi.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"BDI"}
+{"name":"Cambodia","topLevelDomain":[".kh"],"alpha2Code":"KH","alpha3Code":"KHM","callingCodes":["855"],"capital":"Phnom Penh","altSpellings":["KH","Kingdom of Cambodia"],"region":"Asia","subregion":"South-Eastern Asia","population":15626444,"latlng":[13.0,105.0],"demonym":"Cambodian","area":181035.0,"gini":37.9,"timezones":["UTC+07:00"],"borders":["LAO","THA","VNM"],"nativeName":"Kâmpŭchéa","numericCode":"116","currencies":[{"code":"KHR","name":"Cambodian riel","symbol":"៛"},{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"km","iso639_2":"khm","name":"Khmer","nativeName":"ខ្មែរ"}],"translations":{"de":"Kambodscha","es":"Camboya","fr":"Cambodge","ja":"カンボジア","it":"Cambogia","br":"Camboja","pt":"Camboja","nl":"Cambodja","hr":"Kambodža","fa":"کامبوج"},"flag":"https://restcountries.eu/data/khm.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"CAM"}
+{"name":"Cameroon","topLevelDomain":[".cm"],"alpha2Code":"CM","alpha3Code":"CMR","callingCodes":["237"],"capital":"Yaoundé","altSpellings":["CM","Republic of Cameroon","République du Cameroun"],"region":"Africa","subregion":"Middle Africa","population":22709892,"latlng":[6.0,12.0],"demonym":"Cameroonian","area":475442.0,"gini":38.9,"timezones":["UTC+01:00"],"borders":["CAF","TCD","COG","GNQ","GAB","NGA"],"nativeName":"Cameroon","numericCode":"120","currencies":[{"code":"XAF","name":"Central African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Kamerun","es":"Camerún","fr":"Cameroun","ja":"カメルーン","it":"Camerun","br":"Camarões","pt":"Camarões","nl":"Kameroen","hr":"Kamerun","fa":"کامرون"},"flag":"https://restcountries.eu/data/cmr.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"CMR"}
+{"name":"Canada","topLevelDomain":[".ca"],"alpha2Code":"CA","alpha3Code":"CAN","callingCodes":["1"],"capital":"Ottawa","altSpellings":["CA"],"region":"Americas","subregion":"Northern America","population":36155487,"latlng":[60.0,-95.0],"demonym":"Canadian","area":9984670.0,"gini":32.6,"timezones":["UTC-08:00","UTC-07:00","UTC-06:00","UTC-05:00","UTC-04:00","UTC-03:30"],"borders":["USA"],"nativeName":"Canada","numericCode":"124","currencies":[{"code":"CAD","name":"Canadian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Kanada","es":"Canadá","fr":"Canada","ja":"カナダ","it":"Canada","br":"Canadá","pt":"Canadá","nl":"Canada","hr":"Kanada","fa":"کانادا"},"flag":"https://restcountries.eu/data/can.svg","regionalBlocs":[{"acronym":"NAFTA","name":"North American Free Trade Agreement","otherAcronyms":[],"otherNames":["Tratado de Libre Comercio de América del Norte","Accord de Libre-échange Nord-Américain"]}],"cioc":"CAN"}
+{"name":"Cabo Verde","topLevelDomain":[".cv"],"alpha2Code":"CV","alpha3Code":"CPV","callingCodes":["238"],"capital":"Praia","altSpellings":["CV","Republic of Cabo Verde","República de Cabo Verde"],"region":"Africa","subregion":"Western Africa","population":531239,"latlng":[16.0,-24.0],"demonym":"Cape Verdian","area":4033.0,"gini":50.5,"timezones":["UTC-01:00"],"borders":[],"nativeName":"Cabo Verde","numericCode":"132","currencies":[{"code":"CVE","name":"Cape Verdean escudo","symbol":"Esc"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Kap Verde","es":"Cabo Verde","fr":"Cap Vert","ja":"カーボベルデ","it":"Capo Verde","br":"Cabo Verde","pt":"Cabo Verde","nl":"Kaapverdië","hr":"Zelenortska Republika","fa":"کیپ ورد"},"flag":"https://restcountries.eu/data/cpv.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"CPV"}
+{"name":"Cayman Islands","topLevelDomain":[".ky"],"alpha2Code":"KY","alpha3Code":"CYM","callingCodes":["1345"],"capital":"George Town","altSpellings":["KY"],"region":"Americas","subregion":"Caribbean","population":58238,"latlng":[19.5,-80.5],"demonym":"Caymanian","area":264.0,"gini":null,"timezones":["UTC-05:00"],"borders":[],"nativeName":"Cayman Islands","numericCode":"136","currencies":[{"code":"KYD","name":"Cayman Islands dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Kaimaninseln","es":"Islas Caimán","fr":"Îles Caïmans","ja":"ケイマン諸島","it":"Isole Cayman","br":"Ilhas Cayman","pt":"Ilhas Caimão","nl":"Caymaneilanden","hr":"Kajmanski otoci","fa":"جزایر کیمن"},"flag":"https://restcountries.eu/data/cym.svg","regionalBlocs":[],"cioc":"CAY"}
+{"name":"Central African Republic","topLevelDomain":[".cf"],"alpha2Code":"CF","alpha3Code":"CAF","callingCodes":["236"],"capital":"Bangui","altSpellings":["CF","Central African Republic","République centrafricaine"],"region":"Africa","subregion":"Middle Africa","population":4998000,"latlng":[7.0,21.0],"demonym":"Central African","area":622984.0,"gini":56.3,"timezones":["UTC+01:00"],"borders":["CMR","TCD","COD","COG","SSD","SDN"],"nativeName":"Ködörösêse tî Bêafrîka","numericCode":"140","currencies":[{"code":"XAF","name":"Central African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"sg","iso639_2":"sag","name":"Sango","nativeName":"yângâ tî sängö"}],"translations":{"de":"Zentralafrikanische Republik","es":"República Centroafricana","fr":"République centrafricaine","ja":"中央アフリカ共和国","it":"Repubblica Centrafricana","br":"República Centro-Africana","pt":"República Centro-Africana","nl":"Centraal-Afrikaanse Republiek","hr":"Srednjoafrička Republika","fa":"جمهوری آفریقای مرکزی"},"flag":"https://restcountries.eu/data/caf.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"CAF"}
+{"name":"Chad","topLevelDomain":[".td"],"alpha2Code":"TD","alpha3Code":"TCD","callingCodes":["235"],"capital":"N'Djamena","altSpellings":["TD","Tchad","Republic of Chad","République du Tchad"],"region":"Africa","subregion":"Middle Africa","population":14497000,"latlng":[15.0,19.0],"demonym":"Chadian","area":1284000.0,"gini":39.8,"timezones":["UTC+01:00"],"borders":["CMR","CAF","LBY","NER","NGA","SSD"],"nativeName":"Tchad","numericCode":"148","currencies":[{"code":"XAF","name":"Central African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Tschad","es":"Chad","fr":"Tchad","ja":"チャド","it":"Ciad","br":"Chade","pt":"Chade","nl":"Tsjaad","hr":"Čad","fa":"چاد"},"flag":"https://restcountries.eu/data/tcd.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"CHA"}
+{"name":"Chile","topLevelDomain":[".cl"],"alpha2Code":"CL","alpha3Code":"CHL","callingCodes":["56"],"capital":"Santiago","altSpellings":["CL","Republic of Chile","República de Chile"],"region":"Americas","subregion":"South America","population":18191900,"latlng":[-30.0,-71.0],"demonym":"Chilean","area":756102.0,"gini":52.1,"timezones":["UTC-06:00","UTC-04:00"],"borders":["ARG","BOL","PER"],"nativeName":"Chile","numericCode":"152","currencies":[{"code":"CLP","name":"Chilean peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Chile","es":"Chile","fr":"Chili","ja":"チリ","it":"Cile","br":"Chile","pt":"Chile","nl":"Chili","hr":"Čile","fa":"شیلی"},"flag":"https://restcountries.eu/data/chl.svg","regionalBlocs":[{"acronym":"PA","name":"Pacific Alliance","otherAcronyms":[],"otherNames":["Alianza del Pacífico"]},{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"CHI"}
+{"name":"China","topLevelDomain":[".cn"],"alpha2Code":"CN","alpha3Code":"CHN","callingCodes":["86"],"capital":"Beijing","altSpellings":["CN","Zhōngguó","Zhongguo","Zhonghua","People's Republic of China","中华人民共和国","Zhōnghuá Rénmín Gònghéguó"],"region":"Asia","subregion":"Eastern Asia","population":1377422166,"latlng":[35.0,105.0],"demonym":"Chinese","area":9640011.0,"gini":47.0,"timezones":["UTC+08:00"],"borders":["AFG","BTN","MMR","HKG","IND","KAZ","PRK","KGZ","LAO","MAC","MNG","PAK","RUS","TJK","VNM"],"nativeName":"中国","numericCode":"156","currencies":[{"code":"CNY","name":"Chinese yuan","symbol":"¥"}],"languages":[{"iso639_1":"zh","iso639_2":"zho","name":"Chinese","nativeName":"中文 (Zhōngwén)"}],"translations":{"de":"China","es":"China","fr":"Chine","ja":"中国","it":"Cina","br":"China","pt":"China","nl":"China","hr":"Kina","fa":"چین"},"flag":"https://restcountries.eu/data/chn.svg","regionalBlocs":[],"cioc":"CHN"}
+{"name":"Christmas Island","topLevelDomain":[".cx"],"alpha2Code":"CX","alpha3Code":"CXR","callingCodes":["61"],"capital":"Flying Fish Cove","altSpellings":["CX","Territory of Christmas Island"],"region":"Oceania","subregion":"Australia and New Zealand","population":2072,"latlng":[-10.5,105.66666666],"demonym":"Christmas Island","area":135.0,"gini":null,"timezones":["UTC+07:00"],"borders":[],"nativeName":"Christmas Island","numericCode":"162","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Weihnachtsinsel","es":"Isla de Navidad","fr":"Île Christmas","ja":"クリスマス島","it":"Isola di Natale","br":"Ilha Christmas","pt":"Ilha do Natal","nl":"Christmaseiland","hr":"Božićni otok","fa":"جزیره کریسمس"},"flag":"https://restcountries.eu/data/cxr.svg","regionalBlocs":[],"cioc":""}
+{"name":"Cocos (Keeling) Islands","topLevelDomain":[".cc"],"alpha2Code":"CC","alpha3Code":"CCK","callingCodes":["61"],"capital":"West Island","altSpellings":["CC","Territory of the Cocos (Keeling) Islands","Keeling Islands"],"region":"Oceania","subregion":"Australia and New Zealand","population":550,"latlng":[-12.5,96.83333333],"demonym":"Cocos Islander","area":14.0,"gini":null,"timezones":["UTC+06:30"],"borders":[],"nativeName":"Cocos (Keeling) Islands","numericCode":"166","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Kokosinseln","es":"Islas Cocos o Islas Keeling","fr":"Îles Cocos","ja":"ココス(キーリング)諸島","it":"Isole Cocos e Keeling","br":"Ilhas Cocos","pt":"Ilhas dos Cocos","nl":"Cocoseilanden","hr":"Kokosovi Otoci","fa":"جزایر کوکوس"},"flag":"https://restcountries.eu/data/cck.svg","regionalBlocs":[],"cioc":""}
+{"name":"Colombia","topLevelDomain":[".co"],"alpha2Code":"CO","alpha3Code":"COL","callingCodes":["57"],"capital":"Bogotá","altSpellings":["CO","Republic of Colombia","República de Colombia"],"region":"Americas","subregion":"South America","population":48759958,"latlng":[4.0,-72.0],"demonym":"Colombian","area":1141748.0,"gini":55.9,"timezones":["UTC-05:00"],"borders":["BRA","ECU","PAN","PER","VEN"],"nativeName":"Colombia","numericCode":"170","currencies":[{"code":"COP","name":"Colombian peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Kolumbien","es":"Colombia","fr":"Colombie","ja":"コロンビア","it":"Colombia","br":"Colômbia","pt":"Colômbia","nl":"Colombia","hr":"Kolumbija","fa":"کلمبیا"},"flag":"https://restcountries.eu/data/col.svg","regionalBlocs":[{"acronym":"PA","name":"Pacific Alliance","otherAcronyms":[],"otherNames":["Alianza del Pacífico"]},{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"COL"}
+{"name":"Comoros","topLevelDomain":[".km"],"alpha2Code":"KM","alpha3Code":"COM","callingCodes":["269"],"capital":"Moroni","altSpellings":["KM","Union of the Comoros","Union des Comores","Udzima wa Komori","al-Ittiḥād al-Qumurī"],"region":"Africa","subregion":"Eastern Africa","population":806153,"latlng":[-12.16666666,44.25],"demonym":"Comoran","area":1862.0,"gini":64.3,"timezones":["UTC+03:00"],"borders":[],"nativeName":"Komori","numericCode":"174","currencies":[{"code":"KMF","name":"Comorian franc","symbol":"Fr"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Union der Komoren","es":"Comoras","fr":"Comores","ja":"コモロ","it":"Comore","br":"Comores","pt":"Comores","nl":"Comoren","hr":"Komori","fa":"کومور"},"flag":"https://restcountries.eu/data/com.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"COM"}
+{"name":"Congo","topLevelDomain":[".cg"],"alpha2Code":"CG","alpha3Code":"COG","callingCodes":["242"],"capital":"Brazzaville","altSpellings":["CG","Congo-Brazzaville"],"region":"Africa","subregion":"Middle Africa","population":4741000,"latlng":[-1.0,15.0],"demonym":"Congolese","area":342000.0,"gini":47.3,"timezones":["UTC+01:00"],"borders":["AGO","CMR","CAF","COD","GAB"],"nativeName":"République du Congo","numericCode":"178","currencies":[{"code":"XAF","name":"Central African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ln","iso639_2":"lin","name":"Lingala","nativeName":"Lingála"}],"translations":{"de":"Kongo","es":"Congo","fr":"Congo","ja":"コンゴ共和国","it":"Congo","br":"Congo","pt":"Congo","nl":"Congo [Republiek]","hr":"Kongo","fa":"کنگو"},"flag":"https://restcountries.eu/data/cog.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"CGO"}
+{"name":"Congo (Democratic Republic of the)","topLevelDomain":[".cd"],"alpha2Code":"CD","alpha3Code":"COD","callingCodes":["243"],"capital":"Kinshasa","altSpellings":["CD","DR Congo","Congo-Kinshasa","DRC"],"region":"Africa","subregion":"Middle Africa","population":85026000,"latlng":[0.0,25.0],"demonym":"Congolese","area":2344858.0,"gini":null,"timezones":["UTC+01:00","UTC+02:00"],"borders":["AGO","BDI","CAF","COG","RWA","SSD","TZA","UGA","ZMB"],"nativeName":"République démocratique du Congo","numericCode":"180","currencies":[{"code":"CDF","name":"Congolese franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ln","iso639_2":"lin","name":"Lingala","nativeName":"Lingála"},{"iso639_1":"kg","iso639_2":"kon","name":"Kongo","nativeName":"Kikongo"},{"iso639_1":"sw","iso639_2":"swa","name":"Swahili","nativeName":"Kiswahili"},{"iso639_1":"lu","iso639_2":"lub","name":"Luba-Katanga","nativeName":"Tshiluba"}],"translations":{"de":"Kongo (Dem. Rep.)","es":"Congo (Rep. Dem.)","fr":"Congo (Rép. dém.)","ja":"コンゴ民主共和国","it":"Congo (Rep. Dem.)","br":"RD Congo","pt":"RD Congo","nl":"Congo [DRC]","hr":"Kongo, Demokratska Republika","fa":"جمهوری کنگو"},"flag":"https://restcountries.eu/data/cod.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"COD"}
+{"name":"Cook Islands","topLevelDomain":[".ck"],"alpha2Code":"CK","alpha3Code":"COK","callingCodes":["682"],"capital":"Avarua","altSpellings":["CK","Kūki 'Āirani"],"region":"Oceania","subregion":"Polynesia","population":18100,"latlng":[-21.23333333,-159.76666666],"demonym":"Cook Islander","area":236.0,"gini":null,"timezones":["UTC-10:00"],"borders":[],"nativeName":"Cook Islands","numericCode":"184","currencies":[{"code":"NZD","name":"New Zealand dollar","symbol":"$"},{"code":"CKD","name":"Cook Islands dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Cookinseln","es":"Islas Cook","fr":"Îles Cook","ja":"クック諸島","it":"Isole Cook","br":"Ilhas Cook","pt":"Ilhas Cook","nl":"Cookeilanden","hr":"Cookovo Otočje","fa":"جزایر کوک"},"flag":"https://restcountries.eu/data/cok.svg","regionalBlocs":[],"cioc":"COK"}
+{"name":"Costa Rica","topLevelDomain":[".cr"],"alpha2Code":"CR","alpha3Code":"CRI","callingCodes":["506"],"capital":"San José","altSpellings":["CR","Republic of Costa Rica","República de Costa Rica"],"region":"Americas","subregion":"Central America","population":4890379,"latlng":[10.0,-84.0],"demonym":"Costa Rican","area":51100.0,"gini":50.7,"timezones":["UTC-06:00"],"borders":["NIC","PAN"],"nativeName":"Costa Rica","numericCode":"188","currencies":[{"code":"CRC","name":"Costa Rican colón","symbol":"₡"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Costa Rica","es":"Costa Rica","fr":"Costa Rica","ja":"コスタリカ","it":"Costa Rica","br":"Costa Rica","pt":"Costa Rica","nl":"Costa Rica","hr":"Kostarika","fa":"کاستاریکا"},"flag":"https://restcountries.eu/data/cri.svg","regionalBlocs":[{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"CRC"}
+{"name":"Croatia","topLevelDomain":[".hr"],"alpha2Code":"HR","alpha3Code":"HRV","callingCodes":["385"],"capital":"Zagreb","altSpellings":["HR","Hrvatska","Republic of Croatia","Republika Hrvatska"],"region":"Europe","subregion":"Southern Europe","population":4190669,"latlng":[45.16666666,15.5],"demonym":"Croatian","area":56594.0,"gini":33.7,"timezones":["UTC+01:00"],"borders":["BIH","HUN","MNE","SRB","SVN"],"nativeName":"Hrvatska","numericCode":"191","currencies":[{"code":"HRK","name":"Croatian kuna","symbol":"kn"}],"languages":[{"iso639_1":"hr","iso639_2":"hrv","name":"Croatian","nativeName":"hrvatski jezik"}],"translations":{"de":"Kroatien","es":"Croacia","fr":"Croatie","ja":"クロアチア","it":"Croazia","br":"Croácia","pt":"Croácia","nl":"Kroatië","hr":"Hrvatska","fa":"کرواسی"},"flag":"https://restcountries.eu/data/hrv.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"CRO"}
+{"name":"Cuba","topLevelDomain":[".cu"],"alpha2Code":"CU","alpha3Code":"CUB","callingCodes":["53"],"capital":"Havana","altSpellings":["CU","Republic of Cuba","República de Cuba"],"region":"Americas","subregion":"Caribbean","population":11239004,"latlng":[21.5,-80.0],"demonym":"Cuban","area":109884.0,"gini":null,"timezones":["UTC-05:00"],"borders":[],"nativeName":"Cuba","numericCode":"192","currencies":[{"code":"CUC","name":"Cuban convertible peso","symbol":"$"},{"code":"CUP","name":"Cuban peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Kuba","es":"Cuba","fr":"Cuba","ja":"キューバ","it":"Cuba","br":"Cuba","pt":"Cuba","nl":"Cuba","hr":"Kuba","fa":"کوبا"},"flag":"https://restcountries.eu/data/cub.svg","regionalBlocs":[],"cioc":"CUB"}
+{"name":"Curaçao","topLevelDomain":[".cw"],"alpha2Code":"CW","alpha3Code":"CUW","callingCodes":["599"],"capital":"Willemstad","altSpellings":["CW","Curacao","Kòrsou","Country of Curaçao","Land Curaçao","Pais Kòrsou"],"region":"Americas","subregion":"Caribbean","population":154843,"latlng":[12.116667,-68.933333],"demonym":"Dutch","area":444.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Curaçao","numericCode":"531","currencies":[{"code":"ANG","name":"Netherlands Antillean guilder","symbol":"ƒ"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"},{"iso639_1":"pa","iso639_2":"pan","name":"(Eastern) Punjabi","nativeName":"ਪੰਜਾਬੀ"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Curaçao","es":null,"fr":"Curaçao","ja":null,"it":"Curaçao","br":"Curaçao","pt":"Curaçao","nl":"Curaçao","hr":null,"fa":"کوراسائو"},"flag":"https://restcountries.eu/data/cuw.svg","regionalBlocs":[],"cioc":""}
+{"name":"Cyprus","topLevelDomain":[".cy"],"alpha2Code":"CY","alpha3Code":"CYP","callingCodes":["357"],"capital":"Nicosia","altSpellings":["CY","Kýpros","Kıbrıs","Republic of Cyprus","Κυπριακή Δημοκρατία","Kıbrıs Cumhuriyeti"],"region":"Europe","subregion":"Southern Europe","population":847000,"latlng":[35.0,33.0],"demonym":"Cypriot","area":9251.0,"gini":null,"timezones":["UTC+02:00"],"borders":["GBR"],"nativeName":"Κύπρος","numericCode":"196","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"el","iso639_2":"ell","name":"Greek (modern)","nativeName":"ελληνικά"},{"iso639_1":"tr","iso639_2":"tur","name":"Turkish","nativeName":"Türkçe"},{"iso639_1":"hy","iso639_2":"hye","name":"Armenian","nativeName":"Հայերեն"}],"translations":{"de":"Zypern","es":"Chipre","fr":"Chypre","ja":"キプロス","it":"Cipro","br":"Chipre","pt":"Chipre","nl":"Cyprus","hr":"Cipar","fa":"قبرس"},"flag":"https://restcountries.eu/data/cyp.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"CYP"}
+{"name":"Czech Republic","topLevelDomain":[".cz"],"alpha2Code":"CZ","alpha3Code":"CZE","callingCodes":["420"],"capital":"Prague","altSpellings":["CZ","Česká republika","Česko"],"region":"Europe","subregion":"Eastern Europe","population":10558524,"latlng":[49.75,15.5],"demonym":"Czech","area":78865.0,"gini":26.0,"timezones":["UTC+01:00"],"borders":["AUT","DEU","POL","SVK"],"nativeName":"Česká republika","numericCode":"203","currencies":[{"code":"CZK","name":"Czech koruna","symbol":"Kč"}],"languages":[{"iso639_1":"cs","iso639_2":"ces","name":"Czech","nativeName":"čeština"},{"iso639_1":"sk","iso639_2":"slk","name":"Slovak","nativeName":"slovenčina"}],"translations":{"de":"Tschechische Republik","es":"República Checa","fr":"République tchèque","ja":"チェコ","it":"Repubblica Ceca","br":"República Tcheca","pt":"República Checa","nl":"Tsjechië","hr":"Češka","fa":"جمهوری چک"},"flag":"https://restcountries.eu/data/cze.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"CZE"}
+{"name":"Denmark","topLevelDomain":[".dk"],"alpha2Code":"DK","alpha3Code":"DNK","callingCodes":["45"],"capital":"Copenhagen","altSpellings":["DK","Danmark","Kingdom of Denmark","Kongeriget Danmark"],"region":"Europe","subregion":"Northern Europe","population":5717014,"latlng":[56.0,10.0],"demonym":"Danish","area":43094.0,"gini":24.0,"timezones":["UTC-04:00","UTC-03:00","UTC-01:00","UTC","UTC+01:00"],"borders":["DEU"],"nativeName":"Danmark","numericCode":"208","currencies":[{"code":"DKK","name":"Danish krone","symbol":"kr"}],"languages":[{"iso639_1":"da","iso639_2":"dan","name":"Danish","nativeName":"dansk"}],"translations":{"de":"Dänemark","es":"Dinamarca","fr":"Danemark","ja":"デンマーク","it":"Danimarca","br":"Dinamarca","pt":"Dinamarca","nl":"Denemarken","hr":"Danska","fa":"دانمارک"},"flag":"https://restcountries.eu/data/dnk.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"DEN"}
+{"name":"Djibouti","topLevelDomain":[".dj"],"alpha2Code":"DJ","alpha3Code":"DJI","callingCodes":["253"],"capital":"Djibouti","altSpellings":["DJ","Jabuuti","Gabuuti","Republic of Djibouti","République de Djibouti","Gabuutih Ummuuno","Jamhuuriyadda Jabuuti"],"region":"Africa","subregion":"Eastern Africa","population":900000,"latlng":[11.5,43.0],"demonym":"Djibouti","area":23200.0,"gini":40.0,"timezones":["UTC+03:00"],"borders":["ERI","ETH","SOM"],"nativeName":"Djibouti","numericCode":"262","currencies":[{"code":"DJF","name":"Djiboutian franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Dschibuti","es":"Yibuti","fr":"Djibouti","ja":"ジブチ","it":"Gibuti","br":"Djibuti","pt":"Djibuti","nl":"Djibouti","hr":"Džibuti","fa":"جیبوتی"},"flag":"https://restcountries.eu/data/dji.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"DJI"}
+{"name":"Dominica","topLevelDomain":[".dm"],"alpha2Code":"DM","alpha3Code":"DMA","callingCodes":["1767"],"capital":"Roseau","altSpellings":["DM","Dominique","Wai‘tu kubuli","Commonwealth of Dominica"],"region":"Americas","subregion":"Caribbean","population":71293,"latlng":[15.41666666,-61.33333333],"demonym":"Dominican","area":751.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Dominica","numericCode":"212","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Dominica","es":"Dominica","fr":"Dominique","ja":"ドミニカ国","it":"Dominica","br":"Dominica","pt":"Dominica","nl":"Dominica","hr":"Dominika","fa":"دومینیکا"},"flag":"https://restcountries.eu/data/dma.svg","regionalBlocs":[],"cioc":"DMA"}
+{"name":"Dominican Republic","topLevelDomain":[".do"],"alpha2Code":"DO","alpha3Code":"DOM","callingCodes":["1809","1829","1849"],"capital":"Santo Domingo","altSpellings":["DO"],"region":"Americas","subregion":"Caribbean","population":10075045,"latlng":[19.0,-70.66666666],"demonym":"Dominican","area":48671.0,"gini":47.2,"timezones":["UTC-04:00"],"borders":["HTI"],"nativeName":"República Dominicana","numericCode":"214","currencies":[{"code":"DOP","name":"Dominican peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Dominikanische Republik","es":"República Dominicana","fr":"République dominicaine","ja":"ドミニカ共和国","it":"Repubblica Dominicana","br":"República Dominicana","pt":"República Dominicana","nl":"Dominicaanse Republiek","hr":"Dominikanska Republika","fa":"جمهوری دومینیکن"},"flag":"https://restcountries.eu/data/dom.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]},{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"DOM"}
+{"name":"Ecuador","topLevelDomain":[".ec"],"alpha2Code":"EC","alpha3Code":"ECU","callingCodes":["593"],"capital":"Quito","altSpellings":["EC","Republic of Ecuador","República del Ecuador"],"region":"Americas","subregion":"South America","population":16545799,"latlng":[-2.0,-77.5],"demonym":"Ecuadorean","area":276841.0,"gini":49.3,"timezones":["UTC-06:00","UTC-05:00"],"borders":["COL","PER"],"nativeName":"Ecuador","numericCode":"218","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Ecuador","es":"Ecuador","fr":"Équateur","ja":"エクアドル","it":"Ecuador","br":"Equador","pt":"Equador","nl":"Ecuador","hr":"Ekvador","fa":"اکوادور"},"flag":"https://restcountries.eu/data/ecu.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"ECU"}
+{"name":"Egypt","topLevelDomain":[".eg"],"alpha2Code":"EG","alpha3Code":"EGY","callingCodes":["20"],"capital":"Cairo","altSpellings":["EG","Arab Republic of Egypt"],"region":"Africa","subregion":"Northern Africa","population":91290000,"latlng":[27.0,30.0],"demonym":"Egyptian","area":1002450.0,"gini":30.8,"timezones":["UTC+02:00"],"borders":["ISR","LBY","SDN"],"nativeName":"مصر","numericCode":"818","currencies":[{"code":"EGP","name":"Egyptian pound","symbol":"£"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Ägypten","es":"Egipto","fr":"Égypte","ja":"エジプト","it":"Egitto","br":"Egito","pt":"Egipto","nl":"Egypte","hr":"Egipat","fa":"مصر"},"flag":"https://restcountries.eu/data/egy.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"EGY"}
+{"name":"El Salvador","topLevelDomain":[".sv"],"alpha2Code":"SV","alpha3Code":"SLV","callingCodes":["503"],"capital":"San Salvador","altSpellings":["SV","Republic of El Salvador","República de El Salvador"],"region":"Americas","subregion":"Central America","population":6520675,"latlng":[13.83333333,-88.91666666],"demonym":"Salvadoran","area":21041.0,"gini":48.3,"timezones":["UTC-06:00"],"borders":["GTM","HND"],"nativeName":"El Salvador","numericCode":"222","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"El Salvador","es":"El Salvador","fr":"Salvador","ja":"エルサルバドル","it":"El Salvador","br":"El Salvador","pt":"El Salvador","nl":"El Salvador","hr":"Salvador","fa":"السالوادور"},"flag":"https://restcountries.eu/data/slv.svg","regionalBlocs":[{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"ESA"}
+{"name":"Equatorial Guinea","topLevelDomain":[".gq"],"alpha2Code":"GQ","alpha3Code":"GNQ","callingCodes":["240"],"capital":"Malabo","altSpellings":["GQ","Republic of Equatorial Guinea","República de Guinea Ecuatorial","République de Guinée équatoriale","República da Guiné Equatorial"],"region":"Africa","subregion":"Middle Africa","population":1222442,"latlng":[2.0,10.0],"demonym":"Equatorial Guinean","area":28051.0,"gini":null,"timezones":["UTC+01:00"],"borders":["CMR","GAB"],"nativeName":"Guinea Ecuatorial","numericCode":"226","currencies":[{"code":"XAF","name":"Central African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Äquatorial-Guinea","es":"Guinea Ecuatorial","fr":"Guinée-Équatoriale","ja":"赤道ギニア","it":"Guinea Equatoriale","br":"Guiné Equatorial","pt":"Guiné Equatorial","nl":"Equatoriaal-Guinea","hr":"Ekvatorijalna Gvineja","fa":"گینه استوایی"},"flag":"https://restcountries.eu/data/gnq.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"GEQ"}
+{"name":"Eritrea","topLevelDomain":[".er"],"alpha2Code":"ER","alpha3Code":"ERI","callingCodes":["291"],"capital":"Asmara","altSpellings":["ER","State of Eritrea","ሃገረ ኤርትራ","Dawlat Iritriyá","ʾErtrā","Iritriyā",""],"region":"Africa","subregion":"Eastern Africa","population":5352000,"latlng":[15.0,39.0],"demonym":"Eritrean","area":117600.0,"gini":null,"timezones":["UTC+03:00"],"borders":["DJI","ETH","SDN"],"nativeName":"ኤርትራ","numericCode":"232","currencies":[{"code":"ERN","name":"Eritrean nakfa","symbol":"Nfk"}],"languages":[{"iso639_1":"ti","iso639_2":"tir","name":"Tigrinya","nativeName":"ትግርኛ"},{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Eritrea","es":"Eritrea","fr":"Érythrée","ja":"エリトリア","it":"Eritrea","br":"Eritreia","pt":"Eritreia","nl":"Eritrea","hr":"Eritreja","fa":"اریتره"},"flag":"https://restcountries.eu/data/eri.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"ERI"}
+{"name":"Estonia","topLevelDomain":[".ee"],"alpha2Code":"EE","alpha3Code":"EST","callingCodes":["372"],"capital":"Tallinn","altSpellings":["EE","Eesti","Republic of Estonia","Eesti Vabariik"],"region":"Europe","subregion":"Northern Europe","population":1315944,"latlng":[59.0,26.0],"demonym":"Estonian","area":45227.0,"gini":36.0,"timezones":["UTC+02:00"],"borders":["LVA","RUS"],"nativeName":"Eesti","numericCode":"233","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"et","iso639_2":"est","name":"Estonian","nativeName":"eesti"}],"translations":{"de":"Estland","es":"Estonia","fr":"Estonie","ja":"エストニア","it":"Estonia","br":"Estônia","pt":"Estónia","nl":"Estland","hr":"Estonija","fa":"استونی"},"flag":"https://restcountries.eu/data/est.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"EST"}
+{"name":"Ethiopia","topLevelDomain":[".et"],"alpha2Code":"ET","alpha3Code":"ETH","callingCodes":["251"],"capital":"Addis Ababa","altSpellings":["ET","ʾĪtyōṗṗyā","Federal Democratic Republic of Ethiopia","የኢትዮጵያ ፌዴራላዊ ዲሞክራሲያዊ ሪፐብሊክ"],"region":"Africa","subregion":"Eastern Africa","population":92206005,"latlng":[8.0,38.0],"demonym":"Ethiopian","area":1104300.0,"gini":29.8,"timezones":["UTC+03:00"],"borders":["DJI","ERI","KEN","SOM","SSD","SDN"],"nativeName":"ኢትዮጵያ","numericCode":"231","currencies":[{"code":"ETB","name":"Ethiopian birr","symbol":"Br"}],"languages":[{"iso639_1":"am","iso639_2":"amh","name":"Amharic","nativeName":"አማርኛ"}],"translations":{"de":"Äthiopien","es":"Etiopía","fr":"Éthiopie","ja":"エチオピア","it":"Etiopia","br":"Etiópia","pt":"Etiópia","nl":"Ethiopië","hr":"Etiopija","fa":"اتیوپی"},"flag":"https://restcountries.eu/data/eth.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"ETH"}
+{"name":"Falkland Islands (Malvinas)","topLevelDomain":[".fk"],"alpha2Code":"FK","alpha3Code":"FLK","callingCodes":["500"],"capital":"Stanley","altSpellings":["FK","Islas Malvinas"],"region":"Americas","subregion":"South America","population":2563,"latlng":[-51.75,-59.0],"demonym":"Falkland Islander","area":12173.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Falkland Islands","numericCode":"238","currencies":[{"code":"FKP","name":"Falkland Islands pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Falklandinseln","es":"Islas Malvinas","fr":"Îles Malouines","ja":"フォークランド(マルビナス)諸島","it":"Isole Falkland o Isole Malvine","br":"Ilhas Malvinas","pt":"Ilhas Falkland","nl":"Falklandeilanden [Islas Malvinas]","hr":"Falklandski Otoci","fa":"جزایر فالکلند"},"flag":"https://restcountries.eu/data/flk.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":""}
+{"name":"Faroe Islands","topLevelDomain":[".fo"],"alpha2Code":"FO","alpha3Code":"FRO","callingCodes":["298"],"capital":"Tórshavn","altSpellings":["FO","Føroyar","Færøerne"],"region":"Europe","subregion":"Northern Europe","population":49376,"latlng":[62.0,-7.0],"demonym":"Faroese","area":1393.0,"gini":null,"timezones":["UTC+00:00"],"borders":[],"nativeName":"Føroyar","numericCode":"234","currencies":[{"code":"DKK","name":"Danish krone","symbol":"kr"},{"code":"(none)","name":"Faroese króna","symbol":"kr"}],"languages":[{"iso639_1":"fo","iso639_2":"fao","name":"Faroese","nativeName":"føroyskt"}],"translations":{"de":"Färöer-Inseln","es":"Islas Faroe","fr":"Îles Féroé","ja":"フェロー諸島","it":"Isole Far Oer","br":"Ilhas Faroé","pt":"Ilhas Faroé","nl":"Faeröer","hr":"Farski Otoci","fa":"جزایر فارو"},"flag":"https://restcountries.eu/data/fro.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":""}
+{"name":"Fiji","topLevelDomain":[".fj"],"alpha2Code":"FJ","alpha3Code":"FJI","callingCodes":["679"],"capital":"Suva","altSpellings":["FJ","Viti","Republic of Fiji","Matanitu ko Viti","Fijī Gaṇarājya"],"region":"Oceania","subregion":"Melanesia","population":867000,"latlng":[-18.0,175.0],"demonym":"Fijian","area":18272.0,"gini":42.8,"timezones":["UTC+12:00"],"borders":[],"nativeName":"Fiji","numericCode":"242","currencies":[{"code":"FJD","name":"Fijian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fj","iso639_2":"fij","name":"Fijian","nativeName":"vosa Vakaviti"},{"iso639_1":"hi","iso639_2":"hin","name":"Hindi","nativeName":"हिन्दी"},{"iso639_1":"ur","iso639_2":"urd","name":"Urdu","nativeName":"اردو"}],"translations":{"de":"Fidschi","es":"Fiyi","fr":"Fidji","ja":"フィジー","it":"Figi","br":"Fiji","pt":"Fiji","nl":"Fiji","hr":"Fiđi","fa":"فیجی"},"flag":"https://restcountries.eu/data/fji.svg","regionalBlocs":[],"cioc":"FIJ"}
+{"name":"Finland","topLevelDomain":[".fi"],"alpha2Code":"FI","alpha3Code":"FIN","callingCodes":["358"],"capital":"Helsinki","altSpellings":["FI","Suomi","Republic of Finland","Suomen tasavalta","Republiken Finland"],"region":"Europe","subregion":"Northern Europe","population":5491817,"latlng":[64.0,26.0],"demonym":"Finnish","area":338424.0,"gini":26.9,"timezones":["UTC+02:00"],"borders":["NOR","SWE","RUS"],"nativeName":"Suomi","numericCode":"246","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fi","iso639_2":"fin","name":"Finnish","nativeName":"suomi"},{"iso639_1":"sv","iso639_2":"swe","name":"Swedish","nativeName":"svenska"}],"translations":{"de":"Finnland","es":"Finlandia","fr":"Finlande","ja":"フィンランド","it":"Finlandia","br":"Finlândia","pt":"Finlândia","nl":"Finland","hr":"Finska","fa":"فنلاند"},"flag":"https://restcountries.eu/data/fin.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"FIN"}
+{"name":"France","topLevelDomain":[".fr"],"alpha2Code":"FR","alpha3Code":"FRA","callingCodes":["33"],"capital":"Paris","altSpellings":["FR","French Republic","République française"],"region":"Europe","subregion":"Western Europe","population":66710000,"latlng":[46.0,2.0],"demonym":"French","area":640679.0,"gini":32.7,"timezones":["UTC-10:00","UTC-09:30","UTC-09:00","UTC-08:00","UTC-04:00","UTC-03:00","UTC+01:00","UTC+03:00","UTC+04:00","UTC+05:00","UTC+11:00","UTC+12:00"],"borders":["AND","BEL","DEU","ITA","LUX","MCO","ESP","CHE"],"nativeName":"France","numericCode":"250","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Frankreich","es":"Francia","fr":"France","ja":"フランス","it":"Francia","br":"França","pt":"França","nl":"Frankrijk","hr":"Francuska","fa":"فرانسه"},"flag":"https://restcountries.eu/data/fra.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"FRA"}
+{"name":"French Guiana","topLevelDomain":[".gf"],"alpha2Code":"GF","alpha3Code":"GUF","callingCodes":["594"],"capital":"Cayenne","altSpellings":["GF","Guiana","Guyane"],"region":"Americas","subregion":"South America","population":254541,"latlng":[4.0,-53.0],"demonym":"","area":null,"gini":null,"timezones":["UTC-03:00"],"borders":["BRA","SUR"],"nativeName":"Guyane française","numericCode":"254","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Französisch Guyana","es":"Guayana Francesa","fr":"Guayane","ja":"フランス領ギアナ","it":"Guyana francese","br":"Guiana Francesa","pt":"Guiana Francesa","nl":"Frans-Guyana","hr":"Francuska Gvajana","fa":"گویان فرانسه"},"flag":"https://restcountries.eu/data/guf.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]},{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":""}
+{"name":"French Polynesia","topLevelDomain":[".pf"],"alpha2Code":"PF","alpha3Code":"PYF","callingCodes":["689"],"capital":"Papeetē","altSpellings":["PF","Polynésie française","French Polynesia","Pōrīnetia Farāni"],"region":"Oceania","subregion":"Polynesia","population":271800,"latlng":[-15.0,-140.0],"demonym":"French Polynesian","area":4167.0,"gini":null,"timezones":["UTC-10:00","UTC-09:30","UTC-09:00"],"borders":[],"nativeName":"Polynésie française","numericCode":"258","currencies":[{"code":"XPF","name":"CFP franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Französisch-Polynesien","es":"Polinesia Francesa","fr":"Polynésie française","ja":"フランス領ポリネシア","it":"Polinesia Francese","br":"Polinésia Francesa","pt":"Polinésia Francesa","nl":"Frans-Polynesië","hr":"Francuska Polinezija","fa":"پلینزی فرانسه"},"flag":"https://restcountries.eu/data/pyf.svg","regionalBlocs":[],"cioc":""}
+{"name":"French Southern Territories","topLevelDomain":[".tf"],"alpha2Code":"TF","alpha3Code":"ATF","callingCodes":[""],"capital":"Port-aux-Français","altSpellings":["TF"],"region":"Africa","subregion":"Southern Africa","population":140,"latlng":[-49.25,69.167],"demonym":"French","area":7747.0,"gini":null,"timezones":["UTC+05:00"],"borders":[],"nativeName":"Territoire des Terres australes et antarctiques françaises","numericCode":"260","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Französische Süd- und Antarktisgebiete","es":"Tierras Australes y Antárticas Francesas","fr":"Terres australes et antarctiques françaises","ja":"フランス領南方・南極地域","it":"Territori Francesi del Sud","br":"Terras Austrais e Antárticas Francesas","pt":"Terras Austrais e Antárticas Francesas","nl":"Franse Gebieden in de zuidelijke Indische Oceaan","hr":"Francuski južni i antarktički teritoriji","fa":"سرزمینهای جنوبی و جنوبگانی فرانسه"},"flag":"https://restcountries.eu/data/atf.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":""}
+{"name":"Gabon","topLevelDomain":[".ga"],"alpha2Code":"GA","alpha3Code":"GAB","callingCodes":["241"],"capital":"Libreville","altSpellings":["GA","Gabonese Republic","République Gabonaise"],"region":"Africa","subregion":"Middle Africa","population":1802278,"latlng":[-1.0,11.75],"demonym":"Gabonese","area":267668.0,"gini":41.5,"timezones":["UTC+01:00"],"borders":["CMR","COG","GNQ"],"nativeName":"Gabon","numericCode":"266","currencies":[{"code":"XAF","name":"Central African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Gabun","es":"Gabón","fr":"Gabon","ja":"ガボン","it":"Gabon","br":"Gabão","pt":"Gabão","nl":"Gabon","hr":"Gabon","fa":"گابن"},"flag":"https://restcountries.eu/data/gab.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"GAB"}
+{"name":"Gambia","topLevelDomain":[".gm"],"alpha2Code":"GM","alpha3Code":"GMB","callingCodes":["220"],"capital":"Banjul","altSpellings":["GM","Republic of the Gambia"],"region":"Africa","subregion":"Western Africa","population":1882450,"latlng":[13.46666666,-16.56666666],"demonym":"Gambian","area":11295.0,"gini":null,"timezones":["UTC+00:00"],"borders":["SEN"],"nativeName":"Gambia","numericCode":"270","currencies":[{"code":"GMD","name":"Gambian dalasi","symbol":"D"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Gambia","es":"Gambia","fr":"Gambie","ja":"ガンビア","it":"Gambia","br":"Gâmbia","pt":"Gâmbia","nl":"Gambia","hr":"Gambija","fa":"گامبیا"},"flag":"https://restcountries.eu/data/gmb.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"GAM"}
+{"name":"Georgia","topLevelDomain":[".ge"],"alpha2Code":"GE","alpha3Code":"GEO","callingCodes":["995"],"capital":"Tbilisi","altSpellings":["GE","Sakartvelo"],"region":"Asia","subregion":"Western Asia","population":3720400,"latlng":[42.0,43.5],"demonym":"Georgian","area":69700.0,"gini":41.3,"timezones":["UTC-05:00"],"borders":["ARM","AZE","RUS","TUR"],"nativeName":"საქართველო","numericCode":"268","currencies":[{"code":"GEL","name":"Georgian Lari","symbol":"ლ"}],"languages":[{"iso639_1":"ka","iso639_2":"kat","name":"Georgian","nativeName":"ქართული"}],"translations":{"de":"Georgien","es":"Georgia","fr":"Géorgie","ja":"グルジア","it":"Georgia","br":"Geórgia","pt":"Geórgia","nl":"Georgië","hr":"Gruzija","fa":"گرجستان"},"flag":"https://restcountries.eu/data/geo.svg","regionalBlocs":[],"cioc":"GEO"}
+{"name":"Germany","topLevelDomain":[".de"],"alpha2Code":"DE","alpha3Code":"DEU","callingCodes":["49"],"capital":"Berlin","altSpellings":["DE","Federal Republic of Germany","Bundesrepublik Deutschland"],"region":"Europe","subregion":"Western Europe","population":81770900,"latlng":[51.0,9.0],"demonym":"German","area":357114.0,"gini":28.3,"timezones":["UTC+01:00"],"borders":["AUT","BEL","CZE","DNK","FRA","LUX","NLD","POL","CHE"],"nativeName":"Deutschland","numericCode":"276","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"}],"translations":{"de":"Deutschland","es":"Alemania","fr":"Allemagne","ja":"ドイツ","it":"Germania","br":"Alemanha","pt":"Alemanha","nl":"Duitsland","hr":"Njemačka","fa":"آلمان"},"flag":"https://restcountries.eu/data/deu.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"GER"}
+{"name":"Ghana","topLevelDomain":[".gh"],"alpha2Code":"GH","alpha3Code":"GHA","callingCodes":["233"],"capital":"Accra","altSpellings":["GH"],"region":"Africa","subregion":"Western Africa","population":27670174,"latlng":[8.0,-2.0],"demonym":"Ghanaian","area":238533.0,"gini":42.8,"timezones":["UTC"],"borders":["BFA","CIV","TGO"],"nativeName":"Ghana","numericCode":"288","currencies":[{"code":"GHS","name":"Ghanaian cedi","symbol":"₵"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Ghana","es":"Ghana","fr":"Ghana","ja":"ガーナ","it":"Ghana","br":"Gana","pt":"Gana","nl":"Ghana","hr":"Gana","fa":"غنا"},"flag":"https://restcountries.eu/data/gha.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"GHA"}
+{"name":"Gibraltar","topLevelDomain":[".gi"],"alpha2Code":"GI","alpha3Code":"GIB","callingCodes":["350"],"capital":"Gibraltar","altSpellings":["GI"],"region":"Europe","subregion":"Southern Europe","population":33140,"latlng":[36.13333333,-5.35],"demonym":"Gibraltar","area":6.0,"gini":null,"timezones":["UTC+01:00"],"borders":["ESP"],"nativeName":"Gibraltar","numericCode":"292","currencies":[{"code":"GIP","name":"Gibraltar pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Gibraltar","es":"Gibraltar","fr":"Gibraltar","ja":"ジブラルタル","it":"Gibilterra","br":"Gibraltar","pt":"Gibraltar","nl":"Gibraltar","hr":"Gibraltar","fa":"جبلطارق"},"flag":"https://restcountries.eu/data/gib.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":""}
+{"name":"Greece","topLevelDomain":[".gr"],"alpha2Code":"GR","alpha3Code":"GRC","callingCodes":["30"],"capital":"Athens","altSpellings":["GR","Elláda","Hellenic Republic","Ελληνική Δημοκρατία"],"region":"Europe","subregion":"Southern Europe","population":10858018,"latlng":[39.0,22.0],"demonym":"Greek","area":131990.0,"gini":34.3,"timezones":["UTC+02:00"],"borders":["ALB","BGR","TUR","MKD"],"nativeName":"Ελλάδα","numericCode":"300","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"el","iso639_2":"ell","name":"Greek (modern)","nativeName":"ελληνικά"}],"translations":{"de":"Griechenland","es":"Grecia","fr":"Grèce","ja":"ギリシャ","it":"Grecia","br":"Grécia","pt":"Grécia","nl":"Griekenland","hr":"Grčka","fa":"یونان"},"flag":"https://restcountries.eu/data/grc.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"GRE"}
+{"name":"Greenland","topLevelDomain":[".gl"],"alpha2Code":"GL","alpha3Code":"GRL","callingCodes":["299"],"capital":"Nuuk","altSpellings":["GL","Grønland"],"region":"Americas","subregion":"Northern America","population":55847,"latlng":[72.0,-40.0],"demonym":"Greenlandic","area":2166086.0,"gini":null,"timezones":["UTC-04:00","UTC-03:00","UTC-01:00","UTC+00:00"],"borders":[],"nativeName":"Kalaallit Nunaat","numericCode":"304","currencies":[{"code":"DKK","name":"Danish krone","symbol":"kr"}],"languages":[{"iso639_1":"kl","iso639_2":"kal","name":"Kalaallisut","nativeName":"kalaallisut"}],"translations":{"de":"Grönland","es":"Groenlandia","fr":"Groenland","ja":"グリーンランド","it":"Groenlandia","br":"Groelândia","pt":"Gronelândia","nl":"Groenland","hr":"Grenland","fa":"گرینلند"},"flag":"https://restcountries.eu/data/grl.svg","regionalBlocs":[],"cioc":""}
+{"name":"Grenada","topLevelDomain":[".gd"],"alpha2Code":"GD","alpha3Code":"GRD","callingCodes":["1473"],"capital":"St. George's","altSpellings":["GD"],"region":"Americas","subregion":"Caribbean","population":103328,"latlng":[12.11666666,-61.66666666],"demonym":"Grenadian","area":344.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Grenada","numericCode":"308","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Grenada","es":"Grenada","fr":"Grenade","ja":"グレナダ","it":"Grenada","br":"Granada","pt":"Granada","nl":"Grenada","hr":"Grenada","fa":"گرنادا"},"flag":"https://restcountries.eu/data/grd.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"GRN"}
+{"name":"Guadeloupe","topLevelDomain":[".gp"],"alpha2Code":"GP","alpha3Code":"GLP","callingCodes":["590"],"capital":"Basse-Terre","altSpellings":["GP","Gwadloup"],"region":"Americas","subregion":"Caribbean","population":400132,"latlng":[16.25,-61.583333],"demonym":"Guadeloupian","area":null,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Guadeloupe","numericCode":"312","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Guadeloupe","es":"Guadalupe","fr":"Guadeloupe","ja":"グアドループ","it":"Guadeloupa","br":"Guadalupe","pt":"Guadalupe","nl":"Guadeloupe","hr":"Gvadalupa","fa":"جزیره گوادلوپ"},"flag":"https://restcountries.eu/data/glp.svg","regionalBlocs":[],"cioc":""}
+{"name":"Guam","topLevelDomain":[".gu"],"alpha2Code":"GU","alpha3Code":"GUM","callingCodes":["1671"],"capital":"Hagåtña","altSpellings":["GU","Guåhån"],"region":"Oceania","subregion":"Micronesia","population":184200,"latlng":[13.46666666,144.78333333],"demonym":"Guamanian","area":549.0,"gini":null,"timezones":["UTC+10:00"],"borders":[],"nativeName":"Guam","numericCode":"316","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ch","iso639_2":"cha","name":"Chamorro","nativeName":"Chamoru"},{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Guam","es":"Guam","fr":"Guam","ja":"グアム","it":"Guam","br":"Guam","pt":"Guame","nl":"Guam","hr":"Guam","fa":"گوام"},"flag":"https://restcountries.eu/data/gum.svg","regionalBlocs":[],"cioc":"GUM"}
+{"name":"Guatemala","topLevelDomain":[".gt"],"alpha2Code":"GT","alpha3Code":"GTM","callingCodes":["502"],"capital":"Guatemala City","altSpellings":["GT"],"region":"Americas","subregion":"Central America","population":16176133,"latlng":[15.5,-90.25],"demonym":"Guatemalan","area":108889.0,"gini":55.9,"timezones":["UTC-06:00"],"borders":["BLZ","SLV","HND","MEX"],"nativeName":"Guatemala","numericCode":"320","currencies":[{"code":"GTQ","name":"Guatemalan quetzal","symbol":"Q"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Guatemala","es":"Guatemala","fr":"Guatemala","ja":"グアテマラ","it":"Guatemala","br":"Guatemala","pt":"Guatemala","nl":"Guatemala","hr":"Gvatemala","fa":"گواتمالا"},"flag":"https://restcountries.eu/data/gtm.svg","regionalBlocs":[{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"GUA"}
+{"name":"Guernsey","topLevelDomain":[".gg"],"alpha2Code":"GG","alpha3Code":"GGY","callingCodes":["44"],"capital":"St. Peter Port","altSpellings":["GG","Bailiwick of Guernsey","Bailliage de Guernesey"],"region":"Europe","subregion":"Northern Europe","population":62999,"latlng":[49.46666666,-2.58333333],"demonym":"Channel Islander","area":78.0,"gini":null,"timezones":["UTC+00:00"],"borders":[],"nativeName":"Guernsey","numericCode":"831","currencies":[{"code":"GBP","name":"British pound","symbol":"£"},{"code":"(none)","name":"Guernsey pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Guernsey","es":"Guernsey","fr":"Guernesey","ja":"ガーンジー","it":"Guernsey","br":"Guernsey","pt":"Guernsey","nl":"Guernsey","hr":"Guernsey","fa":"گرنزی"},"flag":"https://restcountries.eu/data/ggy.svg","regionalBlocs":[],"cioc":""}
+{"name":"Guinea","topLevelDomain":[".gn"],"alpha2Code":"GN","alpha3Code":"GIN","callingCodes":["224"],"capital":"Conakry","altSpellings":["GN","Republic of Guinea","République de Guinée"],"region":"Africa","subregion":"Western Africa","population":12947000,"latlng":[11.0,-10.0],"demonym":"Guinean","area":245857.0,"gini":39.4,"timezones":["UTC"],"borders":["CIV","GNB","LBR","MLI","SEN","SLE"],"nativeName":"Guinée","numericCode":"324","currencies":[{"code":"GNF","name":"Guinean franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ff","iso639_2":"ful","name":"Fula","nativeName":"Fulfulde"}],"translations":{"de":"Guinea","es":"Guinea","fr":"Guinée","ja":"ギニア","it":"Guinea","br":"Guiné","pt":"Guiné","nl":"Guinee","hr":"Gvineja","fa":"گینه"},"flag":"https://restcountries.eu/data/gin.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"GUI"}
+{"name":"Guinea-Bissau","topLevelDomain":[".gw"],"alpha2Code":"GW","alpha3Code":"GNB","callingCodes":["245"],"capital":"Bissau","altSpellings":["GW","Republic of Guinea-Bissau","República da Guiné-Bissau"],"region":"Africa","subregion":"Western Africa","population":1547777,"latlng":[12.0,-15.0],"demonym":"Guinea-Bissauan","area":36125.0,"gini":35.5,"timezones":["UTC"],"borders":["GIN","SEN"],"nativeName":"Guiné-Bissau","numericCode":"624","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Guinea-Bissau","es":"Guinea-Bisáu","fr":"Guinée-Bissau","ja":"ギニアビサウ","it":"Guinea-Bissau","br":"Guiné-Bissau","pt":"Guiné-Bissau","nl":"Guinee-Bissau","hr":"Gvineja Bisau","fa":"گینه بیسائو"},"flag":"https://restcountries.eu/data/gnb.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"GBS"}
+{"name":"Guyana","topLevelDomain":[".gy"],"alpha2Code":"GY","alpha3Code":"GUY","callingCodes":["592"],"capital":"Georgetown","altSpellings":["GY","Co-operative Republic of Guyana"],"region":"Americas","subregion":"South America","population":746900,"latlng":[5.0,-59.0],"demonym":"Guyanese","area":214969.0,"gini":44.5,"timezones":["UTC-04:00"],"borders":["BRA","SUR","VEN"],"nativeName":"Guyana","numericCode":"328","currencies":[{"code":"GYD","name":"Guyanese dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Guyana","es":"Guyana","fr":"Guyane","ja":"ガイアナ","it":"Guyana","br":"Guiana","pt":"Guiana","nl":"Guyana","hr":"Gvajana","fa":"گویان"},"flag":"https://restcountries.eu/data/guy.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]},{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"GUY"}
+{"name":"Haiti","topLevelDomain":[".ht"],"alpha2Code":"HT","alpha3Code":"HTI","callingCodes":["509"],"capital":"Port-au-Prince","altSpellings":["HT","Republic of Haiti","République d'Haïti","Repiblik Ayiti"],"region":"Americas","subregion":"Caribbean","population":11078033,"latlng":[19.0,-72.41666666],"demonym":"Haitian","area":27750.0,"gini":59.2,"timezones":["UTC-05:00"],"borders":["DOM"],"nativeName":"Haïti","numericCode":"332","currencies":[{"code":"HTG","name":"Haitian gourde","symbol":"G"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ht","iso639_2":"hat","name":"Haitian","nativeName":"Kreyòl ayisyen"}],"translations":{"de":"Haiti","es":"Haiti","fr":"Haïti","ja":"ハイチ","it":"Haiti","br":"Haiti","pt":"Haiti","nl":"Haïti","hr":"Haiti","fa":"هائیتی"},"flag":"https://restcountries.eu/data/hti.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"HAI"}
+{"name":"Heard Island and McDonald Islands","topLevelDomain":[".hm",".aq"],"alpha2Code":"HM","alpha3Code":"HMD","callingCodes":[""],"capital":"","altSpellings":["HM"],"region":"","subregion":"","population":0,"latlng":[-53.1,72.51666666],"demonym":"Heard and McDonald Islander","area":412.0,"gini":null,"timezones":["UTC+05:00"],"borders":[],"nativeName":"Heard Island and McDonald Islands","numericCode":"334","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Heard und die McDonaldinseln","es":"Islas Heard y McDonald","fr":"Îles Heard-et-MacDonald","ja":"ハード島とマクドナルド諸島","it":"Isole Heard e McDonald","br":"Ilha Heard e Ilhas McDonald","pt":"Ilha Heard e Ilhas McDonald","nl":"Heard- en McDonaldeilanden","hr":"Otok Heard i otočje McDonald","fa":"جزیره هرد و جزایر مکدونالد"},"flag":"https://restcountries.eu/data/hmd.svg","regionalBlocs":[],"cioc":""}
+{"name":"Holy See","topLevelDomain":[".va"],"alpha2Code":"VA","alpha3Code":"VAT","callingCodes":["379"],"capital":"Rome","altSpellings":["Sancta Sedes","Vatican","The Vatican"],"region":"Europe","subregion":"Southern Europe","population":451,"latlng":[41.9,12.45],"demonym":"","area":0.44,"gini":null,"timezones":["UTC+01:00"],"borders":["ITA"],"nativeName":"Sancta Sedes","numericCode":"336","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"la","iso639_2":"lat","name":"Latin","nativeName":"latine"},{"iso639_1":"it","iso639_2":"ita","name":"Italian","nativeName":"Italiano"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"}],"translations":{"de":"Heiliger Stuhl","es":"Santa Sede","fr":"voir Saint","ja":"聖座","it":"Santa Sede","br":"Vaticano","pt":"Vaticano","nl":"Heilige Stoel","hr":"Sveta Stolica","fa":"سریر مقدس"},"flag":"https://restcountries.eu/data/vat.svg","regionalBlocs":[],"cioc":""}
+{"name":"Honduras","topLevelDomain":[".hn"],"alpha2Code":"HN","alpha3Code":"HND","callingCodes":["504"],"capital":"Tegucigalpa","altSpellings":["HN","Republic of Honduras","República de Honduras"],"region":"Americas","subregion":"Central America","population":8576532,"latlng":[15.0,-86.5],"demonym":"Honduran","area":112492.0,"gini":57.0,"timezones":["UTC-06:00"],"borders":["GTM","SLV","NIC"],"nativeName":"Honduras","numericCode":"340","currencies":[{"code":"HNL","name":"Honduran lempira","symbol":"L"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Honduras","es":"Honduras","fr":"Honduras","ja":"ホンジュラス","it":"Honduras","br":"Honduras","pt":"Honduras","nl":"Honduras","hr":"Honduras","fa":"هندوراس"},"flag":"https://restcountries.eu/data/hnd.svg","regionalBlocs":[{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"HON"}
+{"name":"Hong Kong","topLevelDomain":[".hk"],"alpha2Code":"HK","alpha3Code":"HKG","callingCodes":["852"],"capital":"City of Victoria","altSpellings":["HK","香港"],"region":"Asia","subregion":"Eastern Asia","population":7324300,"latlng":[22.25,114.16666666],"demonym":"Chinese","area":1104.0,"gini":53.3,"timezones":["UTC+08:00"],"borders":["CHN"],"nativeName":"香港","numericCode":"344","currencies":[{"code":"HKD","name":"Hong Kong dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"zh","iso639_2":"zho","name":"Chinese","nativeName":"中文 (Zhōngwén)"}],"translations":{"de":"Hong Kong","es":"Hong Kong","fr":"Hong Kong","ja":"香港","it":"Hong Kong","br":"Hong Kong","pt":"Hong Kong","nl":"Hongkong","hr":"Hong Kong","fa":"هنگکنگ"},"flag":"https://restcountries.eu/data/hkg.svg","regionalBlocs":[],"cioc":"HKG"}
+{"name":"Hungary","topLevelDomain":[".hu"],"alpha2Code":"HU","alpha3Code":"HUN","callingCodes":["36"],"capital":"Budapest","altSpellings":["HU"],"region":"Europe","subregion":"Eastern Europe","population":9823000,"latlng":[47.0,20.0],"demonym":"Hungarian","area":93028.0,"gini":31.2,"timezones":["UTC+01:00"],"borders":["AUT","HRV","ROU","SRB","SVK","SVN","UKR"],"nativeName":"Magyarország","numericCode":"348","currencies":[{"code":"HUF","name":"Hungarian forint","symbol":"Ft"}],"languages":[{"iso639_1":"hu","iso639_2":"hun","name":"Hungarian","nativeName":"magyar"}],"translations":{"de":"Ungarn","es":"Hungría","fr":"Hongrie","ja":"ハンガリー","it":"Ungheria","br":"Hungria","pt":"Hungria","nl":"Hongarije","hr":"Mađarska","fa":"مجارستان"},"flag":"https://restcountries.eu/data/hun.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"HUN"}
+{"name":"Iceland","topLevelDomain":[".is"],"alpha2Code":"IS","alpha3Code":"ISL","callingCodes":["354"],"capital":"Reykjavík","altSpellings":["IS","Island","Republic of Iceland","Lýðveldið Ísland"],"region":"Europe","subregion":"Northern Europe","population":334300,"latlng":[65.0,-18.0],"demonym":"Icelander","area":103000.0,"gini":null,"timezones":["UTC"],"borders":[],"nativeName":"Ísland","numericCode":"352","currencies":[{"code":"ISK","name":"Icelandic króna","symbol":"kr"}],"languages":[{"iso639_1":"is","iso639_2":"isl","name":"Icelandic","nativeName":"Íslenska"}],"translations":{"de":"Island","es":"Islandia","fr":"Islande","ja":"アイスランド","it":"Islanda","br":"Islândia","pt":"Islândia","nl":"IJsland","hr":"Island","fa":"ایسلند"},"flag":"https://restcountries.eu/data/isl.svg","regionalBlocs":[{"acronym":"EFTA","name":"European Free Trade Association","otherAcronyms":[],"otherNames":[]}],"cioc":"ISL"}
+{"name":"India","topLevelDomain":[".in"],"alpha2Code":"IN","alpha3Code":"IND","callingCodes":["91"],"capital":"New Delhi","altSpellings":["IN","Bhārat","Republic of India","Bharat Ganrajya"],"region":"Asia","subregion":"Southern Asia","population":1295210000,"latlng":[20.0,77.0],"demonym":"Indian","area":3287590.0,"gini":33.4,"timezones":["UTC+05:30"],"borders":["AFG","BGD","BTN","MMR","CHN","NPL","PAK","LKA"],"nativeName":"भारत","numericCode":"356","currencies":[{"code":"INR","name":"Indian rupee","symbol":"₹"}],"languages":[{"iso639_1":"hi","iso639_2":"hin","name":"Hindi","nativeName":"हिन्दी"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Indien","es":"India","fr":"Inde","ja":"インド","it":"India","br":"Índia","pt":"Índia","nl":"India","hr":"Indija","fa":"هند"},"flag":"https://restcountries.eu/data/ind.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"IND"}
+{"name":"Indonesia","topLevelDomain":[".id"],"alpha2Code":"ID","alpha3Code":"IDN","callingCodes":["62"],"capital":"Jakarta","altSpellings":["ID","Republic of Indonesia","Republik Indonesia"],"region":"Asia","subregion":"South-Eastern Asia","population":258705000,"latlng":[-5.0,120.0],"demonym":"Indonesian","area":1904569.0,"gini":34.0,"timezones":["UTC+07:00","UTC+08:00","UTC+09:00"],"borders":["TLS","MYS","PNG"],"nativeName":"Indonesia","numericCode":"360","currencies":[{"code":"IDR","name":"Indonesian rupiah","symbol":"Rp"}],"languages":[{"iso639_1":"id","iso639_2":"ind","name":"Indonesian","nativeName":"Bahasa Indonesia"}],"translations":{"de":"Indonesien","es":"Indonesia","fr":"Indonésie","ja":"インドネシア","it":"Indonesia","br":"Indonésia","pt":"Indonésia","nl":"Indonesië","hr":"Indonezija","fa":"اندونزی"},"flag":"https://restcountries.eu/data/idn.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"INA"}
+{"name":"Côte d'Ivoire","topLevelDomain":[".ci"],"alpha2Code":"CI","alpha3Code":"CIV","callingCodes":["225"],"capital":"Yamoussoukro","altSpellings":["CI","Ivory Coast","Republic of Côte d'Ivoire","République de Côte d'Ivoire"],"region":"Africa","subregion":"Western Africa","population":22671331,"latlng":[8.0,-5.0],"demonym":"Ivorian","area":322463.0,"gini":41.5,"timezones":["UTC"],"borders":["BFA","GHA","GIN","LBR","MLI"],"nativeName":"Côte d'Ivoire","numericCode":"384","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Elfenbeinküste","es":"Costa de Marfil","fr":"Côte d'Ivoire","ja":"コートジボワール","it":"Costa D'Avorio","br":"Costa do Marfim","pt":"Costa do Marfim","nl":"Ivoorkust","hr":"Obala Bjelokosti","fa":"ساحل عاج"},"flag":"https://restcountries.eu/data/civ.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"CIV"}
+{"name":"Iran (Islamic Republic of)","topLevelDomain":[".ir"],"alpha2Code":"IR","alpha3Code":"IRN","callingCodes":["98"],"capital":"Tehran","altSpellings":["IR","Islamic Republic of Iran","Jomhuri-ye Eslāmi-ye Irān"],"region":"Asia","subregion":"Southern Asia","population":79369900,"latlng":[32.0,53.0],"demonym":"Iranian","area":1648195.0,"gini":38.3,"timezones":["UTC+03:30"],"borders":["AFG","ARM","AZE","IRQ","PAK","TUR","TKM"],"nativeName":"ایران","numericCode":"364","currencies":[{"code":"IRR","name":"Iranian rial","symbol":"﷼"}],"languages":[{"iso639_1":"fa","iso639_2":"fas","name":"Persian (Farsi)","nativeName":"فارسی"}],"translations":{"de":"Iran","es":"Iran","fr":"Iran","ja":"イラン・イスラム共和国","it":null,"br":"Irã","pt":"Irão","nl":"Iran","hr":"Iran","fa":"ایران"},"flag":"https://restcountries.eu/data/irn.svg","regionalBlocs":[],"cioc":"IRI"}
+{"name":"Iraq","topLevelDomain":[".iq"],"alpha2Code":"IQ","alpha3Code":"IRQ","callingCodes":["964"],"capital":"Baghdad","altSpellings":["IQ","Republic of Iraq","Jumhūriyyat al-‘Irāq"],"region":"Asia","subregion":"Western Asia","population":37883543,"latlng":[33.0,44.0],"demonym":"Iraqi","area":438317.0,"gini":30.9,"timezones":["UTC+03:00"],"borders":["IRN","JOR","KWT","SAU","SYR","TUR"],"nativeName":"العراق","numericCode":"368","currencies":[{"code":"IQD","name":"Iraqi dinar","symbol":"ع.د"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"},{"iso639_1":"ku","iso639_2":"kur","name":"Kurdish","nativeName":"Kurdî"}],"translations":{"de":"Irak","es":"Irak","fr":"Irak","ja":"イラク","it":"Iraq","br":"Iraque","pt":"Iraque","nl":"Irak","hr":"Irak","fa":"عراق"},"flag":"https://restcountries.eu/data/irq.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"IRQ"}
+{"name":"Ireland","topLevelDomain":[".ie"],"alpha2Code":"IE","alpha3Code":"IRL","callingCodes":["353"],"capital":"Dublin","altSpellings":["IE","Éire","Republic of Ireland","Poblacht na hÉireann"],"region":"Europe","subregion":"Northern Europe","population":6378000,"latlng":[53.0,-8.0],"demonym":"Irish","area":70273.0,"gini":34.3,"timezones":["UTC"],"borders":["GBR"],"nativeName":"Éire","numericCode":"372","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"ga","iso639_2":"gle","name":"Irish","nativeName":"Gaeilge"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Irland","es":"Irlanda","fr":"Irlande","ja":"アイルランド","it":"Irlanda","br":"Irlanda","pt":"Irlanda","nl":"Ierland","hr":"Irska","fa":"ایرلند"},"flag":"https://restcountries.eu/data/irl.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"IRL"}
+{"name":"Isle of Man","topLevelDomain":[".im"],"alpha2Code":"IM","alpha3Code":"IMN","callingCodes":["44"],"capital":"Douglas","altSpellings":["IM","Ellan Vannin","Mann","Mannin"],"region":"Europe","subregion":"Northern Europe","population":84497,"latlng":[54.25,-4.5],"demonym":"Manx","area":572.0,"gini":null,"timezones":["UTC+00:00"],"borders":[],"nativeName":"Isle of Man","numericCode":"833","currencies":[{"code":"GBP","name":"British pound","symbol":"£"},{"code":"IMP[G]","name":"Manx pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"gv","iso639_2":"glv","name":"Manx","nativeName":"Gaelg"}],"translations":{"de":"Insel Man","es":"Isla de Man","fr":"Île de Man","ja":"マン島","it":"Isola di Man","br":"Ilha de Man","pt":"Ilha de Man","nl":"Isle of Man","hr":"Otok Man","fa":"جزیره من"},"flag":"https://restcountries.eu/data/imn.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":""}
+{"name":"Israel","topLevelDomain":[".il"],"alpha2Code":"IL","alpha3Code":"ISR","callingCodes":["972"],"capital":"Jerusalem","altSpellings":["IL","State of Israel","Medīnat Yisrā'el"],"region":"Asia","subregion":"Western Asia","population":8527400,"latlng":[31.5,34.75],"demonym":"Israeli","area":20770.0,"gini":39.2,"timezones":["UTC+02:00"],"borders":["EGY","JOR","LBN","SYR"],"nativeName":"יִשְׂרָאֵל","numericCode":"376","currencies":[{"code":"ILS","name":"Israeli new shekel","symbol":"₪"}],"languages":[{"iso639_1":"he","iso639_2":"heb","name":"Hebrew (modern)","nativeName":"עברית"},{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Israel","es":"Israel","fr":"Israël","ja":"イスラエル","it":"Israele","br":"Israel","pt":"Israel","nl":"Israël","hr":"Izrael","fa":"اسرائیل"},"flag":"https://restcountries.eu/data/isr.svg","regionalBlocs":[],"cioc":"ISR"}
+{"name":"Italy","topLevelDomain":[".it"],"alpha2Code":"IT","alpha3Code":"ITA","callingCodes":["39"],"capital":"Rome","altSpellings":["IT","Italian Republic","Repubblica italiana"],"region":"Europe","subregion":"Southern Europe","population":60665551,"latlng":[42.83333333,12.83333333],"demonym":"Italian","area":301336.0,"gini":36.0,"timezones":["UTC+01:00"],"borders":["AUT","FRA","SMR","SVN","CHE","VAT"],"nativeName":"Italia","numericCode":"380","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"it","iso639_2":"ita","name":"Italian","nativeName":"Italiano"}],"translations":{"de":"Italien","es":"Italia","fr":"Italie","ja":"イタリア","it":"Italia","br":"Itália","pt":"Itália","nl":"Italië","hr":"Italija","fa":"ایتالیا"},"flag":"https://restcountries.eu/data/ita.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"ITA"}
+{"name":"Jamaica","topLevelDomain":[".jm"],"alpha2Code":"JM","alpha3Code":"JAM","callingCodes":["1876"],"capital":"Kingston","altSpellings":["JM"],"region":"Americas","subregion":"Caribbean","population":2723246,"latlng":[18.25,-77.5],"demonym":"Jamaican","area":10991.0,"gini":45.5,"timezones":["UTC-05:00"],"borders":[],"nativeName":"Jamaica","numericCode":"388","currencies":[{"code":"JMD","name":"Jamaican dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Jamaika","es":"Jamaica","fr":"Jamaïque","ja":"ジャマイカ","it":"Giamaica","br":"Jamaica","pt":"Jamaica","nl":"Jamaica","hr":"Jamajka","fa":"جامائیکا"},"flag":"https://restcountries.eu/data/jam.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"JAM"}
+{"name":"Japan","topLevelDomain":[".jp"],"alpha2Code":"JP","alpha3Code":"JPN","callingCodes":["81"],"capital":"Tokyo","altSpellings":["JP","Nippon","Nihon"],"region":"Asia","subregion":"Eastern Asia","population":126960000,"latlng":[36.0,138.0],"demonym":"Japanese","area":377930.0,"gini":38.1,"timezones":["UTC+09:00"],"borders":[],"nativeName":"日本","numericCode":"392","currencies":[{"code":"JPY","name":"Japanese yen","symbol":"¥"}],"languages":[{"iso639_1":"ja","iso639_2":"jpn","name":"Japanese","nativeName":"日本語 (にほんご)"}],"translations":{"de":"Japan","es":"Japón","fr":"Japon","ja":"日本","it":"Giappone","br":"Japão","pt":"Japão","nl":"Japan","hr":"Japan","fa":"ژاپن"},"flag":"https://restcountries.eu/data/jpn.svg","regionalBlocs":[],"cioc":"JPN"}
+{"name":"Jersey","topLevelDomain":[".je"],"alpha2Code":"JE","alpha3Code":"JEY","callingCodes":["44"],"capital":"Saint Helier","altSpellings":["JE","Bailiwick of Jersey","Bailliage de Jersey","Bailliage dé Jèrri"],"region":"Europe","subregion":"Northern Europe","population":100800,"latlng":[49.25,-2.16666666],"demonym":"Channel Islander","area":116.0,"gini":null,"timezones":["UTC+01:00"],"borders":[],"nativeName":"Jersey","numericCode":"832","currencies":[{"code":"GBP","name":"British pound","symbol":"£"},{"code":"JEP[G]","name":"Jersey pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Jersey","es":"Jersey","fr":"Jersey","ja":"ジャージー","it":"Isola di Jersey","br":"Jersey","pt":"Jersey","nl":"Jersey","hr":"Jersey","fa":"جرزی"},"flag":"https://restcountries.eu/data/jey.svg","regionalBlocs":[],"cioc":""}
+{"name":"Jordan","topLevelDomain":[".jo"],"alpha2Code":"JO","alpha3Code":"JOR","callingCodes":["962"],"capital":"Amman","altSpellings":["JO","Hashemite Kingdom of Jordan","al-Mamlakah al-Urdunīyah al-Hāshimīyah"],"region":"Asia","subregion":"Western Asia","population":9531712,"latlng":[31.0,36.0],"demonym":"Jordanian","area":89342.0,"gini":35.4,"timezones":["UTC+03:00"],"borders":["IRQ","ISR","SAU","SYR"],"nativeName":"الأردن","numericCode":"400","currencies":[{"code":"JOD","name":"Jordanian dinar","symbol":"د.ا"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Jordanien","es":"Jordania","fr":"Jordanie","ja":"ヨルダン","it":"Giordania","br":"Jordânia","pt":"Jordânia","nl":"Jordanië","hr":"Jordan","fa":"اردن"},"flag":"https://restcountries.eu/data/jor.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"JOR"}
+{"name":"Kazakhstan","topLevelDomain":[".kz",".қаз"],"alpha2Code":"KZ","alpha3Code":"KAZ","callingCodes":["76","77"],"capital":"Astana","altSpellings":["KZ","Qazaqstan","Казахстан","Republic of Kazakhstan","Қазақстан Республикасы","Qazaqstan Respublïkası","Республика Казахстан","Respublika Kazakhstan"],"region":"Asia","subregion":"Central Asia","population":17753200,"latlng":[48.0,68.0],"demonym":"Kazakhstani","area":2724900.0,"gini":29.0,"timezones":["UTC+05:00","UTC+06:00"],"borders":["CHN","KGZ","RUS","TKM","UZB"],"nativeName":"Қазақстан","numericCode":"398","currencies":[{"code":"KZT","name":"Kazakhstani tenge","symbol":null}],"languages":[{"iso639_1":"kk","iso639_2":"kaz","name":"Kazakh","nativeName":"қазақ тілі"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Kasachstan","es":"Kazajistán","fr":"Kazakhstan","ja":"カザフスタン","it":"Kazakistan","br":"Cazaquistão","pt":"Cazaquistão","nl":"Kazachstan","hr":"Kazahstan","fa":"قزاقستان"},"flag":"https://restcountries.eu/data/kaz.svg","regionalBlocs":[{"acronym":"EEU","name":"Eurasian Economic Union","otherAcronyms":["EAEU"],"otherNames":[]}],"cioc":"KAZ"}
+{"name":"Kenya","topLevelDomain":[".ke"],"alpha2Code":"KE","alpha3Code":"KEN","callingCodes":["254"],"capital":"Nairobi","altSpellings":["KE","Republic of Kenya","Jamhuri ya Kenya"],"region":"Africa","subregion":"Eastern Africa","population":47251000,"latlng":[1.0,38.0],"demonym":"Kenyan","area":580367.0,"gini":47.7,"timezones":["UTC+03:00"],"borders":["ETH","SOM","SSD","TZA","UGA"],"nativeName":"Kenya","numericCode":"404","currencies":[{"code":"KES","name":"Kenyan shilling","symbol":"Sh"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"sw","iso639_2":"swa","name":"Swahili","nativeName":"Kiswahili"}],"translations":{"de":"Kenia","es":"Kenia","fr":"Kenya","ja":"ケニア","it":"Kenya","br":"Quênia","pt":"Quénia","nl":"Kenia","hr":"Kenija","fa":"کنیا"},"flag":"https://restcountries.eu/data/ken.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"KEN"}
+{"name":"Kiribati","topLevelDomain":[".ki"],"alpha2Code":"KI","alpha3Code":"KIR","callingCodes":["686"],"capital":"South Tarawa","altSpellings":["KI","Republic of Kiribati","Ribaberiki Kiribati"],"region":"Oceania","subregion":"Micronesia","population":113400,"latlng":[1.41666666,173.0],"demonym":"I-Kiribati","area":811.0,"gini":null,"timezones":["UTC+12:00","UTC+13:00","UTC+14:00"],"borders":[],"nativeName":"Kiribati","numericCode":"296","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"},{"code":"(none)","name":"Kiribati dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Kiribati","es":"Kiribati","fr":"Kiribati","ja":"キリバス","it":"Kiribati","br":"Kiribati","pt":"Quiribáti","nl":"Kiribati","hr":"Kiribati","fa":"کیریباتی"},"flag":"https://restcountries.eu/data/kir.svg","regionalBlocs":[],"cioc":"KIR"}
+{"name":"Kuwait","topLevelDomain":[".kw"],"alpha2Code":"KW","alpha3Code":"KWT","callingCodes":["965"],"capital":"Kuwait City","altSpellings":["KW","State of Kuwait","Dawlat al-Kuwait"],"region":"Asia","subregion":"Western Asia","population":4183658,"latlng":[29.5,45.75],"demonym":"Kuwaiti","area":17818.0,"gini":null,"timezones":["UTC+03:00"],"borders":["IRN","SAU"],"nativeName":"الكويت","numericCode":"414","currencies":[{"code":"KWD","name":"Kuwaiti dinar","symbol":"د.ك"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Kuwait","es":"Kuwait","fr":"Koweït","ja":"クウェート","it":"Kuwait","br":"Kuwait","pt":"Kuwait","nl":"Koeweit","hr":"Kuvajt","fa":"کویت"},"flag":"https://restcountries.eu/data/kwt.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"KUW"}
+{"name":"Kyrgyzstan","topLevelDomain":[".kg"],"alpha2Code":"KG","alpha3Code":"KGZ","callingCodes":["996"],"capital":"Bishkek","altSpellings":["KG","Киргизия","Kyrgyz Republic","Кыргыз Республикасы","Kyrgyz Respublikasy"],"region":"Asia","subregion":"Central Asia","population":6047800,"latlng":[41.0,75.0],"demonym":"Kirghiz","area":199951.0,"gini":36.2,"timezones":["UTC+06:00"],"borders":["CHN","KAZ","TJK","UZB"],"nativeName":"Кыргызстан","numericCode":"417","currencies":[{"code":"KGS","name":"Kyrgyzstani som","symbol":"с"}],"languages":[{"iso639_1":"ky","iso639_2":"kir","name":"Kyrgyz","nativeName":"Кыргызча"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Kirgisistan","es":"Kirguizistán","fr":"Kirghizistan","ja":"キルギス","it":"Kirghizistan","br":"Quirguistão","pt":"Quirguizistão","nl":"Kirgizië","hr":"Kirgistan","fa":"قرقیزستان"},"flag":"https://restcountries.eu/data/kgz.svg","regionalBlocs":[{"acronym":"EEU","name":"Eurasian Economic Union","otherAcronyms":["EAEU"],"otherNames":[]}],"cioc":"KGZ"}
+{"name":"Lao People's Democratic Republic","topLevelDomain":[".la"],"alpha2Code":"LA","alpha3Code":"LAO","callingCodes":["856"],"capital":"Vientiane","altSpellings":["LA","Lao","Laos","Lao People's Democratic Republic","Sathalanalat Paxathipatai Paxaxon Lao"],"region":"Asia","subregion":"South-Eastern Asia","population":6492400,"latlng":[18.0,105.0],"demonym":"Laotian","area":236800.0,"gini":36.7,"timezones":["UTC+07:00"],"borders":["MMR","KHM","CHN","THA","VNM"],"nativeName":"ສປປລາວ","numericCode":"418","currencies":[{"code":"LAK","name":"Lao kip","symbol":"₭"}],"languages":[{"iso639_1":"lo","iso639_2":"lao","name":"Lao","nativeName":"ພາສາລາວ"}],"translations":{"de":"Laos","es":"Laos","fr":"Laos","ja":"ラオス人民民主共和国","it":"Laos","br":"Laos","pt":"Laos","nl":"Laos","hr":"Laos","fa":"لائوس"},"flag":"https://restcountries.eu/data/lao.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"LAO"}
+{"name":"Latvia","topLevelDomain":[".lv"],"alpha2Code":"LV","alpha3Code":"LVA","callingCodes":["371"],"capital":"Riga","altSpellings":["LV","Republic of Latvia","Latvijas Republika"],"region":"Europe","subregion":"Northern Europe","population":1961600,"latlng":[57.0,25.0],"demonym":"Latvian","area":64559.0,"gini":36.6,"timezones":["UTC+02:00"],"borders":["BLR","EST","LTU","RUS"],"nativeName":"Latvija","numericCode":"428","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"lv","iso639_2":"lav","name":"Latvian","nativeName":"latviešu valoda"}],"translations":{"de":"Lettland","es":"Letonia","fr":"Lettonie","ja":"ラトビア","it":"Lettonia","br":"Letônia","pt":"Letónia","nl":"Letland","hr":"Latvija","fa":"لتونی"},"flag":"https://restcountries.eu/data/lva.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"LAT"}
+{"name":"Lebanon","topLevelDomain":[".lb"],"alpha2Code":"LB","alpha3Code":"LBN","callingCodes":["961"],"capital":"Beirut","altSpellings":["LB","Lebanese Republic","Al-Jumhūrīyah Al-Libnānīyah"],"region":"Asia","subregion":"Western Asia","population":5988000,"latlng":[33.83333333,35.83333333],"demonym":"Lebanese","area":10452.0,"gini":null,"timezones":["UTC+02:00"],"borders":["ISR","SYR"],"nativeName":"لبنان","numericCode":"422","currencies":[{"code":"LBP","name":"Lebanese pound","symbol":"ل.ل"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Libanon","es":"Líbano","fr":"Liban","ja":"レバノン","it":"Libano","br":"Líbano","pt":"Líbano","nl":"Libanon","hr":"Libanon","fa":"لبنان"},"flag":"https://restcountries.eu/data/lbn.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"LIB"}
+{"name":"Lesotho","topLevelDomain":[".ls"],"alpha2Code":"LS","alpha3Code":"LSO","callingCodes":["266"],"capital":"Maseru","altSpellings":["LS","Kingdom of Lesotho","Muso oa Lesotho"],"region":"Africa","subregion":"Southern Africa","population":1894194,"latlng":[-29.5,28.5],"demonym":"Mosotho","area":30355.0,"gini":52.5,"timezones":["UTC+02:00"],"borders":["ZAF"],"nativeName":"Lesotho","numericCode":"426","currencies":[{"code":"LSL","name":"Lesotho loti","symbol":"L"},{"code":"ZAR","name":"South African rand","symbol":"R"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"st","iso639_2":"sot","name":"Southern Sotho","nativeName":"Sesotho"}],"translations":{"de":"Lesotho","es":"Lesotho","fr":"Lesotho","ja":"レソト","it":"Lesotho","br":"Lesoto","pt":"Lesoto","nl":"Lesotho","hr":"Lesoto","fa":"لسوتو"},"flag":"https://restcountries.eu/data/lso.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"LES"}
+{"name":"Liberia","topLevelDomain":[".lr"],"alpha2Code":"LR","alpha3Code":"LBR","callingCodes":["231"],"capital":"Monrovia","altSpellings":["LR","Republic of Liberia"],"region":"Africa","subregion":"Western Africa","population":4615000,"latlng":[6.5,-9.5],"demonym":"Liberian","area":111369.0,"gini":38.2,"timezones":["UTC"],"borders":["GIN","CIV","SLE"],"nativeName":"Liberia","numericCode":"430","currencies":[{"code":"LRD","name":"Liberian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Liberia","es":"Liberia","fr":"Liberia","ja":"リベリア","it":"Liberia","br":"Libéria","pt":"Libéria","nl":"Liberia","hr":"Liberija","fa":"لیبریا"},"flag":"https://restcountries.eu/data/lbr.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"LBR"}
+{"name":"Libya","topLevelDomain":[".ly"],"alpha2Code":"LY","alpha3Code":"LBY","callingCodes":["218"],"capital":"Tripoli","altSpellings":["LY","State of Libya","Dawlat Libya"],"region":"Africa","subregion":"Northern Africa","population":6385000,"latlng":[25.0,17.0],"demonym":"Libyan","area":1759540.0,"gini":null,"timezones":["UTC+01:00"],"borders":["DZA","TCD","EGY","NER","SDN","TUN"],"nativeName":"ليبيا","numericCode":"434","currencies":[{"code":"LYD","name":"Libyan dinar","symbol":"ل.د"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Libyen","es":"Libia","fr":"Libye","ja":"リビア","it":"Libia","br":"Líbia","pt":"Líbia","nl":"Libië","hr":"Libija","fa":"لیبی"},"flag":"https://restcountries.eu/data/lby.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"LBA"}
+{"name":"Liechtenstein","topLevelDomain":[".li"],"alpha2Code":"LI","alpha3Code":"LIE","callingCodes":["423"],"capital":"Vaduz","altSpellings":["LI","Principality of Liechtenstein","Fürstentum Liechtenstein"],"region":"Europe","subregion":"Western Europe","population":37623,"latlng":[47.26666666,9.53333333],"demonym":"Liechtensteiner","area":160.0,"gini":null,"timezones":["UTC+01:00"],"borders":["AUT","CHE"],"nativeName":"Liechtenstein","numericCode":"438","currencies":[{"code":"CHF","name":"Swiss franc","symbol":"Fr"}],"languages":[{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"}],"translations":{"de":"Liechtenstein","es":"Liechtenstein","fr":"Liechtenstein","ja":"リヒテンシュタイン","it":"Liechtenstein","br":"Liechtenstein","pt":"Listenstaine","nl":"Liechtenstein","hr":"Lihtenštajn","fa":"لیختناشتاین"},"flag":"https://restcountries.eu/data/lie.svg","regionalBlocs":[{"acronym":"EFTA","name":"European Free Trade Association","otherAcronyms":[],"otherNames":[]}],"cioc":"LIE"}
+{"name":"Lithuania","topLevelDomain":[".lt"],"alpha2Code":"LT","alpha3Code":"LTU","callingCodes":["370"],"capital":"Vilnius","altSpellings":["LT","Republic of Lithuania","Lietuvos Respublika"],"region":"Europe","subregion":"Northern Europe","population":2872294,"latlng":[56.0,24.0],"demonym":"Lithuanian","area":65300.0,"gini":37.6,"timezones":["UTC+02:00"],"borders":["BLR","LVA","POL","RUS"],"nativeName":"Lietuva","numericCode":"440","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"lt","iso639_2":"lit","name":"Lithuanian","nativeName":"lietuvių kalba"}],"translations":{"de":"Litauen","es":"Lituania","fr":"Lituanie","ja":"リトアニア","it":"Lituania","br":"Lituânia","pt":"Lituânia","nl":"Litouwen","hr":"Litva","fa":"لیتوانی"},"flag":"https://restcountries.eu/data/ltu.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"LTU"}
+{"name":"Luxembourg","topLevelDomain":[".lu"],"alpha2Code":"LU","alpha3Code":"LUX","callingCodes":["352"],"capital":"Luxembourg","altSpellings":["LU","Grand Duchy of Luxembourg","Grand-Duché de Luxembourg","Großherzogtum Luxemburg","Groussherzogtum Lëtzebuerg"],"region":"Europe","subregion":"Western Europe","population":576200,"latlng":[49.75,6.16666666],"demonym":"Luxembourger","area":2586.0,"gini":30.8,"timezones":["UTC+01:00"],"borders":["BEL","FRA","DEU"],"nativeName":"Luxembourg","numericCode":"442","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"},{"iso639_1":"lb","iso639_2":"ltz","name":"Luxembourgish","nativeName":"Lëtzebuergesch"}],"translations":{"de":"Luxemburg","es":"Luxemburgo","fr":"Luxembourg","ja":"ルクセンブルク","it":"Lussemburgo","br":"Luxemburgo","pt":"Luxemburgo","nl":"Luxemburg","hr":"Luksemburg","fa":"لوکزامبورگ"},"flag":"https://restcountries.eu/data/lux.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"LUX"}
+{"name":"Macao","topLevelDomain":[".mo"],"alpha2Code":"MO","alpha3Code":"MAC","callingCodes":["853"],"capital":"","altSpellings":["MO","澳门","Macao Special Administrative Region of the People's Republic of China","中華人民共和國澳門特別行政區","Região Administrativa Especial de Macau da República Popular da China"],"region":"Asia","subregion":"Eastern Asia","population":649100,"latlng":[22.16666666,113.55],"demonym":"Chinese","area":30.0,"gini":null,"timezones":["UTC+08:00"],"borders":["CHN"],"nativeName":"澳門","numericCode":"446","currencies":[{"code":"MOP","name":"Macanese pataca","symbol":"P"}],"languages":[{"iso639_1":"zh","iso639_2":"zho","name":"Chinese","nativeName":"中文 (Zhōngwén)"},{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Macao","es":"Macao","fr":"Macao","ja":"マカオ","it":"Macao","br":"Macau","pt":"Macau","nl":"Macao","hr":"Makao","fa":"مکائو"},"flag":"https://restcountries.eu/data/mac.svg","regionalBlocs":[],"cioc":""}
+{"name":"Macedonia (the former Yugoslav Republic of)","topLevelDomain":[".mk"],"alpha2Code":"MK","alpha3Code":"MKD","callingCodes":["389"],"capital":"Skopje","altSpellings":["MK","Republic of Macedonia","Република Македонија"],"region":"Europe","subregion":"Southern Europe","population":2058539,"latlng":[41.83333333,22.0],"demonym":"Macedonian","area":25713.0,"gini":43.2,"timezones":["UTC+01:00"],"borders":["ALB","BGR","GRC","KOS","SRB"],"nativeName":"Македонија","numericCode":"807","currencies":[{"code":"MKD","name":"Macedonian denar","symbol":"ден"}],"languages":[{"iso639_1":"mk","iso639_2":"mkd","name":"Macedonian","nativeName":"македонски јазик"}],"translations":{"de":"Mazedonien","es":"Macedonia","fr":"Macédoine","ja":"マケドニア旧ユーゴスラビア共和国","it":"Macedonia","br":"Macedônia","pt":"Macedónia","nl":"Macedonië","hr":"Makedonija","fa":""},"flag":"https://restcountries.eu/data/mkd.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":"MKD"}
+{"name":"Madagascar","topLevelDomain":[".mg"],"alpha2Code":"MG","alpha3Code":"MDG","callingCodes":["261"],"capital":"Antananarivo","altSpellings":["MG","Republic of Madagascar","Repoblikan'i Madagasikara","République de Madagascar"],"region":"Africa","subregion":"Eastern Africa","population":22434363,"latlng":[-20.0,47.0],"demonym":"Malagasy","area":587041.0,"gini":44.1,"timezones":["UTC+03:00"],"borders":[],"nativeName":"Madagasikara","numericCode":"450","currencies":[{"code":"MGA","name":"Malagasy ariary","symbol":"Ar"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"mg","iso639_2":"mlg","name":"Malagasy","nativeName":"fiteny malagasy"}],"translations":{"de":"Madagaskar","es":"Madagascar","fr":"Madagascar","ja":"マダガスカル","it":"Madagascar","br":"Madagascar","pt":"Madagáscar","nl":"Madagaskar","hr":"Madagaskar","fa":"ماداگاسکار"},"flag":"https://restcountries.eu/data/mdg.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"MAD"}
+{"name":"Malawi","topLevelDomain":[".mw"],"alpha2Code":"MW","alpha3Code":"MWI","callingCodes":["265"],"capital":"Lilongwe","altSpellings":["MW","Republic of Malawi"],"region":"Africa","subregion":"Eastern Africa","population":16832910,"latlng":[-13.5,34.0],"demonym":"Malawian","area":118484.0,"gini":39.0,"timezones":["UTC+02:00"],"borders":["MOZ","TZA","ZMB"],"nativeName":"Malawi","numericCode":"454","currencies":[{"code":"MWK","name":"Malawian kwacha","symbol":"MK"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ny","iso639_2":"nya","name":"Chichewa","nativeName":"chiCheŵa"}],"translations":{"de":"Malawi","es":"Malawi","fr":"Malawi","ja":"マラウイ","it":"Malawi","br":"Malawi","pt":"Malávi","nl":"Malawi","hr":"Malavi","fa":"مالاوی"},"flag":"https://restcountries.eu/data/mwi.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"MAW"}
+{"name":"Malaysia","topLevelDomain":[".my"],"alpha2Code":"MY","alpha3Code":"MYS","callingCodes":["60"],"capital":"Kuala Lumpur","altSpellings":["MY"],"region":"Asia","subregion":"South-Eastern Asia","population":31405416,"latlng":[2.5,112.5],"demonym":"Malaysian","area":330803.0,"gini":46.2,"timezones":["UTC+08:00"],"borders":["BRN","IDN","THA"],"nativeName":"Malaysia","numericCode":"458","currencies":[{"code":"MYR","name":"Malaysian ringgit","symbol":"RM"}],"languages":[{"iso639_1":null,"iso639_2":"zsm","name":"Malaysian","nativeName":"بهاس مليسيا"}],"translations":{"de":"Malaysia","es":"Malasia","fr":"Malaisie","ja":"マレーシア","it":"Malesia","br":"Malásia","pt":"Malásia","nl":"Maleisië","hr":"Malezija","fa":"مالزی"},"flag":"https://restcountries.eu/data/mys.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"MAS"}
+{"name":"Maldives","topLevelDomain":[".mv"],"alpha2Code":"MV","alpha3Code":"MDV","callingCodes":["960"],"capital":"Malé","altSpellings":["MV","Maldive Islands","Republic of the Maldives","Dhivehi Raajjeyge Jumhooriyya"],"region":"Asia","subregion":"Southern Asia","population":344023,"latlng":[3.25,73.0],"demonym":"Maldivan","area":300.0,"gini":37.4,"timezones":["UTC+05:00"],"borders":[],"nativeName":"Maldives","numericCode":"462","currencies":[{"code":"MVR","name":"Maldivian rufiyaa","symbol":".ރ"}],"languages":[{"iso639_1":"dv","iso639_2":"div","name":"Divehi","nativeName":"ދިވެހި"}],"translations":{"de":"Malediven","es":"Maldivas","fr":"Maldives","ja":"モルディブ","it":"Maldive","br":"Maldivas","pt":"Maldivas","nl":"Maldiven","hr":"Maldivi","fa":"مالدیو"},"flag":"https://restcountries.eu/data/mdv.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"MDV"}
+{"name":"Mali","topLevelDomain":[".ml"],"alpha2Code":"ML","alpha3Code":"MLI","callingCodes":["223"],"capital":"Bamako","altSpellings":["ML","Republic of Mali","République du Mali"],"region":"Africa","subregion":"Western Africa","population":18135000,"latlng":[17.0,-4.0],"demonym":"Malian","area":1240192.0,"gini":33.0,"timezones":["UTC"],"borders":["DZA","BFA","GIN","CIV","MRT","NER","SEN"],"nativeName":"Mali","numericCode":"466","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Mali","es":"Mali","fr":"Mali","ja":"マリ","it":"Mali","br":"Mali","pt":"Mali","nl":"Mali","hr":"Mali","fa":"مالی"},"flag":"https://restcountries.eu/data/mli.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"MLI"}
+{"name":"Malta","topLevelDomain":[".mt"],"alpha2Code":"MT","alpha3Code":"MLT","callingCodes":["356"],"capital":"Valletta","altSpellings":["MT","Republic of Malta","Repubblika ta' Malta"],"region":"Europe","subregion":"Southern Europe","population":425384,"latlng":[35.83333333,14.58333333],"demonym":"Maltese","area":316.0,"gini":null,"timezones":["UTC+01:00"],"borders":[],"nativeName":"Malta","numericCode":"470","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"mt","iso639_2":"mlt","name":"Maltese","nativeName":"Malti"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Malta","es":"Malta","fr":"Malte","ja":"マルタ","it":"Malta","br":"Malta","pt":"Malta","nl":"Malta","hr":"Malta","fa":"مالت"},"flag":"https://restcountries.eu/data/mlt.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"MLT"}
+{"name":"Marshall Islands","topLevelDomain":[".mh"],"alpha2Code":"MH","alpha3Code":"MHL","callingCodes":["692"],"capital":"Majuro","altSpellings":["MH","Republic of the Marshall Islands","Aolepān Aorōkin M̧ajeļ"],"region":"Oceania","subregion":"Micronesia","population":54880,"latlng":[9.0,168.0],"demonym":"Marshallese","area":181.0,"gini":null,"timezones":["UTC+12:00"],"borders":[],"nativeName":"M̧ajeļ","numericCode":"584","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"mh","iso639_2":"mah","name":"Marshallese","nativeName":"Kajin M̧ajeļ"}],"translations":{"de":"Marshallinseln","es":"Islas Marshall","fr":"Îles Marshall","ja":"マーシャル諸島","it":"Isole Marshall","br":"Ilhas Marshall","pt":"Ilhas Marshall","nl":"Marshalleilanden","hr":"Maršalovi Otoci","fa":"جزایر مارشال"},"flag":"https://restcountries.eu/data/mhl.svg","regionalBlocs":[],"cioc":"MHL"}
+{"name":"Martinique","topLevelDomain":[".mq"],"alpha2Code":"MQ","alpha3Code":"MTQ","callingCodes":["596"],"capital":"Fort-de-France","altSpellings":["MQ"],"region":"Americas","subregion":"Caribbean","population":378243,"latlng":[14.666667,-61.0],"demonym":"French","area":null,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Martinique","numericCode":"474","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Martinique","es":"Martinica","fr":"Martinique","ja":"マルティニーク","it":"Martinica","br":"Martinica","pt":"Martinica","nl":"Martinique","hr":"Martinique","fa":"مونتسرات"},"flag":"https://restcountries.eu/data/mtq.svg","regionalBlocs":[],"cioc":""}
+{"name":"Mauritania","topLevelDomain":[".mr"],"alpha2Code":"MR","alpha3Code":"MRT","callingCodes":["222"],"capital":"Nouakchott","altSpellings":["MR","Islamic Republic of Mauritania","al-Jumhūriyyah al-ʾIslāmiyyah al-Mūrītāniyyah"],"region":"Africa","subregion":"Western Africa","population":3718678,"latlng":[20.0,-12.0],"demonym":"Mauritanian","area":1030700.0,"gini":40.5,"timezones":["UTC"],"borders":["DZA","MLI","SEN","ESH"],"nativeName":"موريتانيا","numericCode":"478","currencies":[{"code":"MRO","name":"Mauritanian ouguiya","symbol":"UM"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Mauretanien","es":"Mauritania","fr":"Mauritanie","ja":"モーリタニア","it":"Mauritania","br":"Mauritânia","pt":"Mauritânia","nl":"Mauritanië","hr":"Mauritanija","fa":"موریتانی"},"flag":"https://restcountries.eu/data/mrt.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"MTN"}
+{"name":"Mauritius","topLevelDomain":[".mu"],"alpha2Code":"MU","alpha3Code":"MUS","callingCodes":["230"],"capital":"Port Louis","altSpellings":["MU","Republic of Mauritius","République de Maurice"],"region":"Africa","subregion":"Eastern Africa","population":1262879,"latlng":[-20.28333333,57.55],"demonym":"Mauritian","area":2040.0,"gini":null,"timezones":["UTC+04:00"],"borders":[],"nativeName":"Maurice","numericCode":"480","currencies":[{"code":"MUR","name":"Mauritian rupee","symbol":"₨"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Mauritius","es":"Mauricio","fr":"Île Maurice","ja":"モーリシャス","it":"Mauritius","br":"Maurício","pt":"Maurícia","nl":"Mauritius","hr":"Mauricijus","fa":"موریس"},"flag":"https://restcountries.eu/data/mus.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"MRI"}
+{"name":"Mayotte","topLevelDomain":[".yt"],"alpha2Code":"YT","alpha3Code":"MYT","callingCodes":["262"],"capital":"Mamoudzou","altSpellings":["YT","Department of Mayotte","Département de Mayotte"],"region":"Africa","subregion":"Eastern Africa","population":226915,"latlng":[-12.83333333,45.16666666],"demonym":"French","area":null,"gini":null,"timezones":["UTC+03:00"],"borders":[],"nativeName":"Mayotte","numericCode":"175","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Mayotte","es":"Mayotte","fr":"Mayotte","ja":"マヨット","it":"Mayotte","br":"Mayotte","pt":"Mayotte","nl":"Mayotte","hr":"Mayotte","fa":"مایوت"},"flag":"https://restcountries.eu/data/myt.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":""}
+{"name":"Mexico","topLevelDomain":[".mx"],"alpha2Code":"MX","alpha3Code":"MEX","callingCodes":["52"],"capital":"Mexico City","altSpellings":["MX","Mexicanos","United Mexican States","Estados Unidos Mexicanos"],"region":"Americas","subregion":"Central America","population":122273473,"latlng":[23.0,-102.0],"demonym":"Mexican","area":1964375.0,"gini":47.0,"timezones":["UTC-08:00","UTC-07:00","UTC-06:00"],"borders":["BLZ","GTM","USA"],"nativeName":"México","numericCode":"484","currencies":[{"code":"MXN","name":"Mexican peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Mexiko","es":"México","fr":"Mexique","ja":"メキシコ","it":"Messico","br":"México","pt":"México","nl":"Mexico","hr":"Meksiko","fa":"مکزیک"},"flag":"https://restcountries.eu/data/mex.svg","regionalBlocs":[{"acronym":"PA","name":"Pacific Alliance","otherAcronyms":[],"otherNames":["Alianza del Pacífico"]},{"acronym":"NAFTA","name":"North American Free Trade Agreement","otherAcronyms":[],"otherNames":["Tratado de Libre Comercio de América del Norte","Accord de Libre-échange Nord-Américain"]}],"cioc":"MEX"}
+{"name":"Micronesia (Federated States of)","topLevelDomain":[".fm"],"alpha2Code":"FM","alpha3Code":"FSM","callingCodes":["691"],"capital":"Palikir","altSpellings":["FM","Federated States of Micronesia"],"region":"Oceania","subregion":"Micronesia","population":102800,"latlng":[6.91666666,158.25],"demonym":"Micronesian","area":702.0,"gini":null,"timezones":["UTC+10:00","UTC+11"],"borders":[],"nativeName":"Micronesia","numericCode":"583","currencies":[{"code":null,"name":"[D]","symbol":"$"},{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Mikronesien","es":"Micronesia","fr":"Micronésie","ja":"ミクロネシア連邦","it":"Micronesia","br":"Micronésia","pt":"Micronésia","nl":"Micronesië","hr":"Mikronezija","fa":"ایالات فدرال میکرونزی"},"flag":"https://restcountries.eu/data/fsm.svg","regionalBlocs":[],"cioc":"FSM"}
+{"name":"Moldova (Republic of)","topLevelDomain":[".md"],"alpha2Code":"MD","alpha3Code":"MDA","callingCodes":["373"],"capital":"Chișinău","altSpellings":["MD","Republic of Moldova","Republica Moldova"],"region":"Europe","subregion":"Eastern Europe","population":3553100,"latlng":[47.0,29.0],"demonym":"Moldovan","area":33846.0,"gini":33.0,"timezones":["UTC+02:00"],"borders":["ROU","UKR"],"nativeName":"Moldova","numericCode":"498","currencies":[{"code":"MDL","name":"Moldovan leu","symbol":"L"}],"languages":[{"iso639_1":"ro","iso639_2":"ron","name":"Romanian","nativeName":"Română"}],"translations":{"de":"Moldawie","es":"Moldavia","fr":"Moldavie","ja":"モルドバ共和国","it":"Moldavia","br":"Moldávia","pt":"Moldávia","nl":"Moldavië","hr":"Moldova","fa":"مولداوی"},"flag":"https://restcountries.eu/data/mda.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":"MDA"}
+{"name":"Monaco","topLevelDomain":[".mc"],"alpha2Code":"MC","alpha3Code":"MCO","callingCodes":["377"],"capital":"Monaco","altSpellings":["MC","Principality of Monaco","Principauté de Monaco"],"region":"Europe","subregion":"Western Europe","population":38400,"latlng":[43.73333333,7.4],"demonym":"Monegasque","area":2.02,"gini":null,"timezones":["UTC+01:00"],"borders":["FRA"],"nativeName":"Monaco","numericCode":"492","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Monaco","es":"Mónaco","fr":"Monaco","ja":"モナコ","it":"Principato di Monaco","br":"Mônaco","pt":"Mónaco","nl":"Monaco","hr":"Monako","fa":"موناکو"},"flag":"https://restcountries.eu/data/mco.svg","regionalBlocs":[],"cioc":"MON"}
+{"name":"Mongolia","topLevelDomain":[".mn"],"alpha2Code":"MN","alpha3Code":"MNG","callingCodes":["976"],"capital":"Ulan Bator","altSpellings":["MN"],"region":"Asia","subregion":"Eastern Asia","population":3093100,"latlng":[46.0,105.0],"demonym":"Mongolian","area":1564110.0,"gini":36.5,"timezones":["UTC+07:00","UTC+08:00"],"borders":["CHN","RUS"],"nativeName":"Монгол улс","numericCode":"496","currencies":[{"code":"MNT","name":"Mongolian tögrög","symbol":"₮"}],"languages":[{"iso639_1":"mn","iso639_2":"mon","name":"Mongolian","nativeName":"Монгол хэл"}],"translations":{"de":"Mongolei","es":"Mongolia","fr":"Mongolie","ja":"モンゴル","it":"Mongolia","br":"Mongólia","pt":"Mongólia","nl":"Mongolië","hr":"Mongolija","fa":"مغولستان"},"flag":"https://restcountries.eu/data/mng.svg","regionalBlocs":[],"cioc":"MGL"}
+{"name":"Montenegro","topLevelDomain":[".me"],"alpha2Code":"ME","alpha3Code":"MNE","callingCodes":["382"],"capital":"Podgorica","altSpellings":["ME","Crna Gora"],"region":"Europe","subregion":"Southern Europe","population":621810,"latlng":[42.5,19.3],"demonym":"Montenegrin","area":13812.0,"gini":30.0,"timezones":["UTC+01:00"],"borders":["ALB","BIH","HRV","KOS","SRB"],"nativeName":"Црна Гора","numericCode":"499","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"sr","iso639_2":"srp","name":"Serbian","nativeName":"српски језик"},{"iso639_1":"bs","iso639_2":"bos","name":"Bosnian","nativeName":"bosanski jezik"},{"iso639_1":"sq","iso639_2":"sqi","name":"Albanian","nativeName":"Shqip"},{"iso639_1":"hr","iso639_2":"hrv","name":"Croatian","nativeName":"hrvatski jezik"}],"translations":{"de":"Montenegro","es":"Montenegro","fr":"Monténégro","ja":"モンテネグロ","it":"Montenegro","br":"Montenegro","pt":"Montenegro","nl":"Montenegro","hr":"Crna Gora","fa":"مونتهنگرو"},"flag":"https://restcountries.eu/data/mne.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":"MNE"}
+{"name":"Montserrat","topLevelDomain":[".ms"],"alpha2Code":"MS","alpha3Code":"MSR","callingCodes":["1664"],"capital":"Plymouth","altSpellings":["MS"],"region":"Americas","subregion":"Caribbean","population":4922,"latlng":[16.75,-62.2],"demonym":"Montserratian","area":102.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Montserrat","numericCode":"500","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Montserrat","es":"Montserrat","fr":"Montserrat","ja":"モントセラト","it":"Montserrat","br":"Montserrat","pt":"Monserrate","nl":"Montserrat","hr":"Montserrat","fa":"مایوت"},"flag":"https://restcountries.eu/data/msr.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":""}
+{"name":"Morocco","topLevelDomain":[".ma"],"alpha2Code":"MA","alpha3Code":"MAR","callingCodes":["212"],"capital":"Rabat","altSpellings":["MA","Kingdom of Morocco","Al-Mamlakah al-Maġribiyah"],"region":"Africa","subregion":"Northern Africa","population":33337529,"latlng":[32.0,-5.0],"demonym":"Moroccan","area":446550.0,"gini":40.9,"timezones":["UTC"],"borders":["DZA","ESH","ESP"],"nativeName":"المغرب","numericCode":"504","currencies":[{"code":"MAD","name":"Moroccan dirham","symbol":"د.م."}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Marokko","es":"Marruecos","fr":"Maroc","ja":"モロッコ","it":"Marocco","br":"Marrocos","pt":"Marrocos","nl":"Marokko","hr":"Maroko","fa":"مراکش"},"flag":"https://restcountries.eu/data/mar.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"MAR"}
+{"name":"Mozambique","topLevelDomain":[".mz"],"alpha2Code":"MZ","alpha3Code":"MOZ","callingCodes":["258"],"capital":"Maputo","altSpellings":["MZ","Republic of Mozambique","República de Moçambique"],"region":"Africa","subregion":"Eastern Africa","population":26423700,"latlng":[-18.25,35.0],"demonym":"Mozambican","area":801590.0,"gini":45.7,"timezones":["UTC+02:00"],"borders":["MWI","ZAF","SWZ","TZA","ZMB","ZWE"],"nativeName":"Moçambique","numericCode":"508","currencies":[{"code":"MZN","name":"Mozambican metical","symbol":"MT"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Mosambik","es":"Mozambique","fr":"Mozambique","ja":"モザンビーク","it":"Mozambico","br":"Moçambique","pt":"Moçambique","nl":"Mozambique","hr":"Mozambik","fa":"موزامبیک"},"flag":"https://restcountries.eu/data/moz.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"MOZ"}
+{"name":"Myanmar","topLevelDomain":[".mm"],"alpha2Code":"MM","alpha3Code":"MMR","callingCodes":["95"],"capital":"Naypyidaw","altSpellings":["MM","Burma","Republic of the Union of Myanmar","Pyidaunzu Thanmăda Myăma Nainngandaw"],"region":"Asia","subregion":"South-Eastern Asia","population":51419420,"latlng":[22.0,98.0],"demonym":"Burmese","area":676578.0,"gini":null,"timezones":["UTC+06:30"],"borders":["BGD","CHN","IND","LAO","THA"],"nativeName":"Myanma","numericCode":"104","currencies":[{"code":"MMK","name":"Burmese kyat","symbol":"Ks"}],"languages":[{"iso639_1":"my","iso639_2":"mya","name":"Burmese","nativeName":"ဗမာစာ"}],"translations":{"de":"Myanmar","es":"Myanmar","fr":"Myanmar","ja":"ミャンマー","it":"Birmania","br":"Myanmar","pt":"Myanmar","nl":"Myanmar","hr":"Mijanmar","fa":"میانمار"},"flag":"https://restcountries.eu/data/mmr.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"MYA"}
+{"name":"Namibia","topLevelDomain":[".na"],"alpha2Code":"NA","alpha3Code":"NAM","callingCodes":["264"],"capital":"Windhoek","altSpellings":["NA","Namibië","Republic of Namibia"],"region":"Africa","subregion":"Southern Africa","population":2324388,"latlng":[-22.0,17.0],"demonym":"Namibian","area":825615.0,"gini":63.9,"timezones":["UTC+01:00"],"borders":["AGO","BWA","ZAF","ZMB"],"nativeName":"Namibia","numericCode":"516","currencies":[{"code":"NAD","name":"Namibian dollar","symbol":"$"},{"code":"ZAR","name":"South African rand","symbol":"R"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"af","iso639_2":"afr","name":"Afrikaans","nativeName":"Afrikaans"}],"translations":{"de":"Namibia","es":"Namibia","fr":"Namibie","ja":"ナミビア","it":"Namibia","br":"Namíbia","pt":"Namíbia","nl":"Namibië","hr":"Namibija","fa":"نامیبیا"},"flag":"https://restcountries.eu/data/nam.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"NAM"}
+{"name":"Nauru","topLevelDomain":[".nr"],"alpha2Code":"NR","alpha3Code":"NRU","callingCodes":["674"],"capital":"Yaren","altSpellings":["NR","Naoero","Pleasant Island","Republic of Nauru","Ripublik Naoero"],"region":"Oceania","subregion":"Micronesia","population":10084,"latlng":[-0.53333333,166.91666666],"demonym":"Nauruan","area":21.0,"gini":null,"timezones":["UTC+12:00"],"borders":[],"nativeName":"Nauru","numericCode":"520","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"},{"code":"(none)","name":null,"symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"na","iso639_2":"nau","name":"Nauruan","nativeName":"Dorerin Naoero"}],"translations":{"de":"Nauru","es":"Nauru","fr":"Nauru","ja":"ナウル","it":"Nauru","br":"Nauru","pt":"Nauru","nl":"Nauru","hr":"Nauru","fa":"نائورو"},"flag":"https://restcountries.eu/data/nru.svg","regionalBlocs":[],"cioc":"NRU"}
+{"name":"Nepal","topLevelDomain":[".np"],"alpha2Code":"NP","alpha3Code":"NPL","callingCodes":["977"],"capital":"Kathmandu","altSpellings":["NP","Federal Democratic Republic of Nepal","Loktāntrik Ganatantra Nepāl"],"region":"Asia","subregion":"Southern Asia","population":28431500,"latlng":[28.0,84.0],"demonym":"Nepalese","area":147181.0,"gini":32.8,"timezones":["UTC+05:45"],"borders":["CHN","IND"],"nativeName":"नेपाल","numericCode":"524","currencies":[{"code":"NPR","name":"Nepalese rupee","symbol":"₨"}],"languages":[{"iso639_1":"ne","iso639_2":"nep","name":"Nepali","nativeName":"नेपाली"}],"translations":{"de":"Népal","es":"Nepal","fr":"Népal","ja":"ネパール","it":"Nepal","br":"Nepal","pt":"Nepal","nl":"Nepal","hr":"Nepal","fa":"نپال"},"flag":"https://restcountries.eu/data/npl.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"NEP"}
+{"name":"Netherlands","topLevelDomain":[".nl"],"alpha2Code":"NL","alpha3Code":"NLD","callingCodes":["31"],"capital":"Amsterdam","altSpellings":["NL","Holland","Nederland"],"region":"Europe","subregion":"Western Europe","population":17019800,"latlng":[52.5,5.75],"demonym":"Dutch","area":41850.0,"gini":30.9,"timezones":["UTC-04:00","UTC+01:00"],"borders":["BEL","DEU"],"nativeName":"Nederland","numericCode":"528","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"}],"translations":{"de":"Niederlande","es":"Países Bajos","fr":"Pays-Bas","ja":"オランダ","it":"Paesi Bassi","br":"Holanda","pt":"Países Baixos","nl":"Nederland","hr":"Nizozemska","fa":"پادشاهی هلند"},"flag":"https://restcountries.eu/data/nld.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"NED"}
+{"name":"New Caledonia","topLevelDomain":[".nc"],"alpha2Code":"NC","alpha3Code":"NCL","callingCodes":["687"],"capital":"Nouméa","altSpellings":["NC"],"region":"Oceania","subregion":"Melanesia","population":268767,"latlng":[-21.5,165.5],"demonym":"New Caledonian","area":18575.0,"gini":null,"timezones":["UTC+11:00"],"borders":[],"nativeName":"Nouvelle-Calédonie","numericCode":"540","currencies":[{"code":"XPF","name":"CFP franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Neukaledonien","es":"Nueva Caledonia","fr":"Nouvelle-Calédonie","ja":"ニューカレドニア","it":"Nuova Caledonia","br":"Nova Caledônia","pt":"Nova Caledónia","nl":"Nieuw-Caledonië","hr":"Nova Kaledonija","fa":"کالدونیای جدید"},"flag":"https://restcountries.eu/data/ncl.svg","regionalBlocs":[],"cioc":""}
+{"name":"New Zealand","topLevelDomain":[".nz"],"alpha2Code":"NZ","alpha3Code":"NZL","callingCodes":["64"],"capital":"Wellington","altSpellings":["NZ","Aotearoa"],"region":"Oceania","subregion":"Australia and New Zealand","population":4697854,"latlng":[-41.0,174.0],"demonym":"New Zealander","area":270467.0,"gini":36.2,"timezones":["UTC-11:00","UTC-10:00","UTC+12:00","UTC+12:45","UTC+13:00"],"borders":[],"nativeName":"New Zealand","numericCode":"554","currencies":[{"code":"NZD","name":"New Zealand dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"mi","iso639_2":"mri","name":"Māori","nativeName":"te reo Māori"}],"translations":{"de":"Neuseeland","es":"Nueva Zelanda","fr":"Nouvelle-Zélande","ja":"ニュージーランド","it":"Nuova Zelanda","br":"Nova Zelândia","pt":"Nova Zelândia","nl":"Nieuw-Zeeland","hr":"Novi Zeland","fa":"نیوزیلند"},"flag":"https://restcountries.eu/data/nzl.svg","regionalBlocs":[],"cioc":"NZL"}
+{"name":"Nicaragua","topLevelDomain":[".ni"],"alpha2Code":"NI","alpha3Code":"NIC","callingCodes":["505"],"capital":"Managua","altSpellings":["NI","Republic of Nicaragua","República de Nicaragua"],"region":"Americas","subregion":"Central America","population":6262703,"latlng":[13.0,-85.0],"demonym":"Nicaraguan","area":130373.0,"gini":40.5,"timezones":["UTC-06:00"],"borders":["CRI","HND"],"nativeName":"Nicaragua","numericCode":"558","currencies":[{"code":"NIO","name":"Nicaraguan córdoba","symbol":"C$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Nicaragua","es":"Nicaragua","fr":"Nicaragua","ja":"ニカラグア","it":"Nicaragua","br":"Nicarágua","pt":"Nicarágua","nl":"Nicaragua","hr":"Nikaragva","fa":"نیکاراگوئه"},"flag":"https://restcountries.eu/data/nic.svg","regionalBlocs":[{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"NCA"}
+{"name":"Niger","topLevelDomain":[".ne"],"alpha2Code":"NE","alpha3Code":"NER","callingCodes":["227"],"capital":"Niamey","altSpellings":["NE","Nijar","Republic of Niger","République du Niger"],"region":"Africa","subregion":"Western Africa","population":20715000,"latlng":[16.0,8.0],"demonym":"Nigerien","area":1267000.0,"gini":34.6,"timezones":["UTC+01:00"],"borders":["DZA","BEN","BFA","TCD","LBY","MLI","NGA"],"nativeName":"Niger","numericCode":"562","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Niger","es":"Níger","fr":"Niger","ja":"ニジェール","it":"Niger","br":"Níger","pt":"Níger","nl":"Niger","hr":"Niger","fa":"نیجر"},"flag":"https://restcountries.eu/data/ner.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"NIG"}
+{"name":"Nigeria","topLevelDomain":[".ng"],"alpha2Code":"NG","alpha3Code":"NGA","callingCodes":["234"],"capital":"Abuja","altSpellings":["NG","Nijeriya","Naíjíríà","Federal Republic of Nigeria"],"region":"Africa","subregion":"Western Africa","population":186988000,"latlng":[10.0,8.0],"demonym":"Nigerian","area":923768.0,"gini":48.8,"timezones":["UTC+01:00"],"borders":["BEN","CMR","TCD","NER"],"nativeName":"Nigeria","numericCode":"566","currencies":[{"code":"NGN","name":"Nigerian naira","symbol":"₦"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Nigeria","es":"Nigeria","fr":"Nigéria","ja":"ナイジェリア","it":"Nigeria","br":"Nigéria","pt":"Nigéria","nl":"Nigeria","hr":"Nigerija","fa":"نیجریه"},"flag":"https://restcountries.eu/data/nga.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"NGR"}
+{"name":"Niue","topLevelDomain":[".nu"],"alpha2Code":"NU","alpha3Code":"NIU","callingCodes":["683"],"capital":"Alofi","altSpellings":["NU"],"region":"Oceania","subregion":"Polynesia","population":1470,"latlng":[-19.03333333,-169.86666666],"demonym":"Niuean","area":260.0,"gini":null,"timezones":["UTC-11:00"],"borders":[],"nativeName":"Niuē","numericCode":"570","currencies":[{"code":"NZD","name":"New Zealand dollar","symbol":"$"},{"code":"(none)","name":"Niue dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Niue","es":"Niue","fr":"Niue","ja":"ニウエ","it":"Niue","br":"Niue","pt":"Niue","nl":"Niue","hr":"Niue","fa":"نیووی"},"flag":"https://restcountries.eu/data/niu.svg","regionalBlocs":[],"cioc":""}
+{"name":"Norfolk Island","topLevelDomain":[".nf"],"alpha2Code":"NF","alpha3Code":"NFK","callingCodes":["672"],"capital":"Kingston","altSpellings":["NF","Territory of Norfolk Island","Teratri of Norf'k Ailen"],"region":"Oceania","subregion":"Australia and New Zealand","population":2302,"latlng":[-29.03333333,167.95],"demonym":"Norfolk Islander","area":36.0,"gini":null,"timezones":["UTC+11:30"],"borders":[],"nativeName":"Norfolk Island","numericCode":"574","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Norfolkinsel","es":"Isla de Norfolk","fr":"Île de Norfolk","ja":"ノーフォーク島","it":"Isola Norfolk","br":"Ilha Norfolk","pt":"Ilha Norfolk","nl":"Norfolkeiland","hr":"Otok Norfolk","fa":"جزیره نورفک"},"flag":"https://restcountries.eu/data/nfk.svg","regionalBlocs":[],"cioc":""}
+{"name":"Korea (Democratic People's Republic of)","topLevelDomain":[".kp"],"alpha2Code":"KP","alpha3Code":"PRK","callingCodes":["850"],"capital":"Pyongyang","altSpellings":["KP","Democratic People's Republic of Korea","조선민주주의인민공화국","Chosŏn Minjujuŭi Inmin Konghwaguk"],"region":"Asia","subregion":"Eastern Asia","population":25281000,"latlng":[40.0,127.0],"demonym":"North Korean","area":120538.0,"gini":null,"timezones":["UTC+09:00"],"borders":["CHN","KOR","RUS"],"nativeName":"북한","numericCode":"408","currencies":[{"code":"KPW","name":"North Korean won","symbol":"₩"}],"languages":[{"iso639_1":"ko","iso639_2":"kor","name":"Korean","nativeName":"한국어"}],"translations":{"de":"Nordkorea","es":"Corea del Norte","fr":"Corée du Nord","ja":"朝鮮民主主義人民共和国","it":"Corea del Nord","br":"Coreia do Norte","pt":"Coreia do Norte","nl":"Noord-Korea","hr":"Sjeverna Koreja","fa":"کره جنوبی"},"flag":"https://restcountries.eu/data/prk.svg","regionalBlocs":[],"cioc":"PRK"}
+{"name":"Northern Mariana Islands","topLevelDomain":[".mp"],"alpha2Code":"MP","alpha3Code":"MNP","callingCodes":["1670"],"capital":"Saipan","altSpellings":["MP","Commonwealth of the Northern Mariana Islands","Sankattan Siha Na Islas Mariånas"],"region":"Oceania","subregion":"Micronesia","population":56940,"latlng":[15.2,145.75],"demonym":"American","area":464.0,"gini":null,"timezones":["UTC+10:00"],"borders":[],"nativeName":"Northern Mariana Islands","numericCode":"580","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ch","iso639_2":"cha","name":"Chamorro","nativeName":"Chamoru"}],"translations":{"de":"Nördliche Marianen","es":"Islas Marianas del Norte","fr":"Îles Mariannes du Nord","ja":"北マリアナ諸島","it":"Isole Marianne Settentrionali","br":"Ilhas Marianas","pt":"Ilhas Marianas","nl":"Noordelijke Marianeneilanden","hr":"Sjevernomarijanski otoci","fa":"جزایر ماریانای شمالی"},"flag":"https://restcountries.eu/data/mnp.svg","regionalBlocs":[],"cioc":""}
+{"name":"Norway","topLevelDomain":[".no"],"alpha2Code":"NO","alpha3Code":"NOR","callingCodes":["47"],"capital":"Oslo","altSpellings":["NO","Norge","Noreg","Kingdom of Norway","Kongeriket Norge","Kongeriket Noreg"],"region":"Europe","subregion":"Northern Europe","population":5223256,"latlng":[62.0,10.0],"demonym":"Norwegian","area":323802.0,"gini":25.8,"timezones":["UTC+01:00"],"borders":["FIN","SWE","RUS"],"nativeName":"Norge","numericCode":"578","currencies":[{"code":"NOK","name":"Norwegian krone","symbol":"kr"}],"languages":[{"iso639_1":"no","iso639_2":"nor","name":"Norwegian","nativeName":"Norsk"},{"iso639_1":"nb","iso639_2":"nob","name":"Norwegian Bokmål","nativeName":"Norsk bokmål"},{"iso639_1":"nn","iso639_2":"nno","name":"Norwegian Nynorsk","nativeName":"Norsk nynorsk"}],"translations":{"de":"Norwegen","es":"Noruega","fr":"Norvège","ja":"ノルウェー","it":"Norvegia","br":"Noruega","pt":"Noruega","nl":"Noorwegen","hr":"Norveška","fa":"نروژ"},"flag":"https://restcountries.eu/data/nor.svg","regionalBlocs":[{"acronym":"EFTA","name":"European Free Trade Association","otherAcronyms":[],"otherNames":[]}],"cioc":"NOR"}
+{"name":"Oman","topLevelDomain":[".om"],"alpha2Code":"OM","alpha3Code":"OMN","callingCodes":["968"],"capital":"Muscat","altSpellings":["OM","Sultanate of Oman","Salṭanat ʻUmān"],"region":"Asia","subregion":"Western Asia","population":4420133,"latlng":[21.0,57.0],"demonym":"Omani","area":309500.0,"gini":null,"timezones":["UTC+04:00"],"borders":["SAU","ARE","YEM"],"nativeName":"عمان","numericCode":"512","currencies":[{"code":"OMR","name":"Omani rial","symbol":"ر.ع."}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Oman","es":"Omán","fr":"Oman","ja":"オマーン","it":"oman","br":"Omã","pt":"Omã","nl":"Oman","hr":"Oman","fa":"عمان"},"flag":"https://restcountries.eu/data/omn.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"OMA"}
+{"name":"Pakistan","topLevelDomain":[".pk"],"alpha2Code":"PK","alpha3Code":"PAK","callingCodes":["92"],"capital":"Islamabad","altSpellings":["PK","Pākistān","Islamic Republic of Pakistan","Islāmī Jumhūriya'eh Pākistān"],"region":"Asia","subregion":"Southern Asia","population":194125062,"latlng":[30.0,70.0],"demonym":"Pakistani","area":881912.0,"gini":30.0,"timezones":["UTC+05:00"],"borders":["AFG","CHN","IND","IRN"],"nativeName":"Pakistan","numericCode":"586","currencies":[{"code":"PKR","name":"Pakistani rupee","symbol":"₨"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ur","iso639_2":"urd","name":"Urdu","nativeName":"اردو"}],"translations":{"de":"Pakistan","es":"Pakistán","fr":"Pakistan","ja":"パキスタン","it":"Pakistan","br":"Paquistão","pt":"Paquistão","nl":"Pakistan","hr":"Pakistan","fa":"پاکستان"},"flag":"https://restcountries.eu/data/pak.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"PAK"}
+{"name":"Palau","topLevelDomain":[".pw"],"alpha2Code":"PW","alpha3Code":"PLW","callingCodes":["680"],"capital":"Ngerulmud","altSpellings":["PW","Republic of Palau","Beluu er a Belau"],"region":"Oceania","subregion":"Micronesia","population":17950,"latlng":[7.5,134.5],"demonym":"Palauan","area":459.0,"gini":null,"timezones":["UTC+09:00"],"borders":[],"nativeName":"Palau","numericCode":"585","currencies":[{"code":"(none)","name":"[E]","symbol":"$"},{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Palau","es":"Palau","fr":"Palaos","ja":"パラオ","it":"Palau","br":"Palau","pt":"Palau","nl":"Palau","hr":"Palau","fa":"پالائو"},"flag":"https://restcountries.eu/data/plw.svg","regionalBlocs":[],"cioc":"PLW"}
+{"name":"Palestine, State of","topLevelDomain":[".ps"],"alpha2Code":"PS","alpha3Code":"PSE","callingCodes":["970"],"capital":"Ramallah","altSpellings":["PS","State of Palestine","Dawlat Filasṭin"],"region":"Asia","subregion":"Western Asia","population":4682467,"latlng":[31.9,35.2],"demonym":"Palestinian","area":null,"gini":35.5,"timezones":["UTC+02:00"],"borders":["ISR","EGY","JOR"],"nativeName":"فلسطين","numericCode":"275","currencies":[{"code":"ILS","name":"Israeli new sheqel","symbol":"₪"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Palästina","es":"Palestina","fr":"Palestine","ja":"パレスチナ","it":"Palestina","br":"Palestina","pt":"Palestina","nl":"Palestijnse gebieden","hr":"Palestina","fa":"فلسطین"},"flag":"https://restcountries.eu/data/pse.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"PLE"}
+{"name":"Panama","topLevelDomain":[".pa"],"alpha2Code":"PA","alpha3Code":"PAN","callingCodes":["507"],"capital":"Panama City","altSpellings":["PA","Republic of Panama","República de Panamá"],"region":"Americas","subregion":"Central America","population":3814672,"latlng":[9.0,-80.0],"demonym":"Panamanian","area":75417.0,"gini":51.9,"timezones":["UTC-05:00"],"borders":["COL","CRI"],"nativeName":"Panamá","numericCode":"591","currencies":[{"code":"PAB","name":"Panamanian balboa","symbol":"B/."},{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Panama","es":"Panamá","fr":"Panama","ja":"パナマ","it":"Panama","br":"Panamá","pt":"Panamá","nl":"Panama","hr":"Panama","fa":"پاناما"},"flag":"https://restcountries.eu/data/pan.svg","regionalBlocs":[{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"PAN"}
+{"name":"Papua New Guinea","topLevelDomain":[".pg"],"alpha2Code":"PG","alpha3Code":"PNG","callingCodes":["675"],"capital":"Port Moresby","altSpellings":["PG","Independent State of Papua New Guinea","Independen Stet bilong Papua Niugini"],"region":"Oceania","subregion":"Melanesia","population":8083700,"latlng":[-6.0,147.0],"demonym":"Papua New Guinean","area":462840.0,"gini":50.9,"timezones":["UTC+10:00"],"borders":["IDN"],"nativeName":"Papua Niugini","numericCode":"598","currencies":[{"code":"PGK","name":"Papua New Guinean kina","symbol":"K"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Papua-Neuguinea","es":"Papúa Nueva Guinea","fr":"Papouasie-Nouvelle-Guinée","ja":"パプアニューギニア","it":"Papua Nuova Guinea","br":"Papua Nova Guiné","pt":"Papua Nova Guiné","nl":"Papoea-Nieuw-Guinea","hr":"Papua Nova Gvineja","fa":"پاپوآ گینه نو"},"flag":"https://restcountries.eu/data/png.svg","regionalBlocs":[],"cioc":"PNG"}
+{"name":"Paraguay","topLevelDomain":[".py"],"alpha2Code":"PY","alpha3Code":"PRY","callingCodes":["595"],"capital":"Asunción","altSpellings":["PY","Republic of Paraguay","República del Paraguay","Tetã Paraguái"],"region":"Americas","subregion":"South America","population":6854536,"latlng":[-23.0,-58.0],"demonym":"Paraguayan","area":406752.0,"gini":52.4,"timezones":["UTC-04:00"],"borders":["ARG","BOL","BRA"],"nativeName":"Paraguay","numericCode":"600","currencies":[{"code":"PYG","name":"Paraguayan guaraní","symbol":"₲"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"},{"iso639_1":"gn","iso639_2":"grn","name":"Guaraní","nativeName":"Avañe'ẽ"}],"translations":{"de":"Paraguay","es":"Paraguay","fr":"Paraguay","ja":"パラグアイ","it":"Paraguay","br":"Paraguai","pt":"Paraguai","nl":"Paraguay","hr":"Paragvaj","fa":"پاراگوئه"},"flag":"https://restcountries.eu/data/pry.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"PAR"}
+{"name":"Peru","topLevelDomain":[".pe"],"alpha2Code":"PE","alpha3Code":"PER","callingCodes":["51"],"capital":"Lima","altSpellings":["PE","Republic of Peru"," República del Perú"],"region":"Americas","subregion":"South America","population":31488700,"latlng":[-10.0,-76.0],"demonym":"Peruvian","area":1285216.0,"gini":48.1,"timezones":["UTC-05:00"],"borders":["BOL","BRA","CHL","COL","ECU"],"nativeName":"Perú","numericCode":"604","currencies":[{"code":"PEN","name":"Peruvian sol","symbol":"S/."}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Peru","es":"Perú","fr":"Pérou","ja":"ペルー","it":"Perù","br":"Peru","pt":"Peru","nl":"Peru","hr":"Peru","fa":"پرو"},"flag":"https://restcountries.eu/data/per.svg","regionalBlocs":[{"acronym":"PA","name":"Pacific Alliance","otherAcronyms":[],"otherNames":["Alianza del Pacífico"]},{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"PER"}
+{"name":"Philippines","topLevelDomain":[".ph"],"alpha2Code":"PH","alpha3Code":"PHL","callingCodes":["63"],"capital":"Manila","altSpellings":["PH","Republic of the Philippines","Repúblika ng Pilipinas"],"region":"Asia","subregion":"South-Eastern Asia","population":103279800,"latlng":[13.0,122.0],"demonym":"Filipino","area":342353.0,"gini":43.0,"timezones":["UTC+08:00"],"borders":[],"nativeName":"Pilipinas","numericCode":"608","currencies":[{"code":"PHP","name":"Philippine peso","symbol":"₱"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Philippinen","es":"Filipinas","fr":"Philippines","ja":"フィリピン","it":"Filippine","br":"Filipinas","pt":"Filipinas","nl":"Filipijnen","hr":"Filipini","fa":"جزایر الندفیلیپین"},"flag":"https://restcountries.eu/data/phl.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"PHI"}
+{"name":"Pitcairn","topLevelDomain":[".pn"],"alpha2Code":"PN","alpha3Code":"PCN","callingCodes":["64"],"capital":"Adamstown","altSpellings":["PN","Pitcairn Henderson Ducie and Oeno Islands"],"region":"Oceania","subregion":"Polynesia","population":56,"latlng":[-25.06666666,-130.1],"demonym":"Pitcairn Islander","area":47.0,"gini":null,"timezones":["UTC-08:00"],"borders":[],"nativeName":"Pitcairn Islands","numericCode":"612","currencies":[{"code":"NZD","name":"New Zealand dollar","symbol":"$"},{"code":null,"name":"Pitcairn Islands dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Pitcairn","es":"Islas Pitcairn","fr":"Îles Pitcairn","ja":"ピトケアン","it":"Isole Pitcairn","br":"Ilhas Pitcairn","pt":"Ilhas Picárnia","nl":"Pitcairneilanden","hr":"Pitcairnovo otočje","fa":"پیتکرن"},"flag":"https://restcountries.eu/data/pcn.svg","regionalBlocs":[],"cioc":""}
+{"name":"Poland","topLevelDomain":[".pl"],"alpha2Code":"PL","alpha3Code":"POL","callingCodes":["48"],"capital":"Warsaw","altSpellings":["PL","Republic of Poland","Rzeczpospolita Polska"],"region":"Europe","subregion":"Eastern Europe","population":38437239,"latlng":[52.0,20.0],"demonym":"Polish","area":312679.0,"gini":34.1,"timezones":["UTC+01:00"],"borders":["BLR","CZE","DEU","LTU","RUS","SVK","UKR"],"nativeName":"Polska","numericCode":"616","currencies":[{"code":"PLN","name":"Polish złoty","symbol":"zł"}],"languages":[{"iso639_1":"pl","iso639_2":"pol","name":"Polish","nativeName":"język polski"}],"translations":{"de":"Polen","es":"Polonia","fr":"Pologne","ja":"ポーランド","it":"Polonia","br":"Polônia","pt":"Polónia","nl":"Polen","hr":"Poljska","fa":"لهستان"},"flag":"https://restcountries.eu/data/pol.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"POL"}
+{"name":"Portugal","topLevelDomain":[".pt"],"alpha2Code":"PT","alpha3Code":"PRT","callingCodes":["351"],"capital":"Lisbon","altSpellings":["PT","Portuguesa","Portuguese Republic","República Portuguesa"],"region":"Europe","subregion":"Southern Europe","population":10374822,"latlng":[39.5,-8.0],"demonym":"Portuguese","area":92090.0,"gini":38.5,"timezones":["UTC-01:00","UTC"],"borders":["ESP"],"nativeName":"Portugal","numericCode":"620","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Portugal","es":"Portugal","fr":"Portugal","ja":"ポルトガル","it":"Portogallo","br":"Portugal","pt":"Portugal","nl":"Portugal","hr":"Portugal","fa":"پرتغال"},"flag":"https://restcountries.eu/data/prt.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"POR"}
+{"name":"Puerto Rico","topLevelDomain":[".pr"],"alpha2Code":"PR","alpha3Code":"PRI","callingCodes":["1787","1939"],"capital":"San Juan","altSpellings":["PR","Commonwealth of Puerto Rico","Estado Libre Asociado de Puerto Rico"],"region":"Americas","subregion":"Caribbean","population":3474182,"latlng":[18.25,-66.5],"demonym":"Puerto Rican","area":8870.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Puerto Rico","numericCode":"630","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Puerto Rico","es":"Puerto Rico","fr":"Porto Rico","ja":"プエルトリコ","it":"Porto Rico","br":"Porto Rico","pt":"Porto Rico","nl":"Puerto Rico","hr":"Portoriko","fa":"پورتو ریکو"},"flag":"https://restcountries.eu/data/pri.svg","regionalBlocs":[],"cioc":"PUR"}
+{"name":"Qatar","topLevelDomain":[".qa"],"alpha2Code":"QA","alpha3Code":"QAT","callingCodes":["974"],"capital":"Doha","altSpellings":["QA","State of Qatar","Dawlat Qaṭar"],"region":"Asia","subregion":"Western Asia","population":2587564,"latlng":[25.5,51.25],"demonym":"Qatari","area":11586.0,"gini":41.1,"timezones":["UTC+03:00"],"borders":["SAU"],"nativeName":"قطر","numericCode":"634","currencies":[{"code":"QAR","name":"Qatari riyal","symbol":"ر.ق"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Katar","es":"Catar","fr":"Qatar","ja":"カタール","it":"Qatar","br":"Catar","pt":"Catar","nl":"Qatar","hr":"Katar","fa":"قطر"},"flag":"https://restcountries.eu/data/qat.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"QAT"}
+{"name":"Republic of Kosovo","topLevelDomain":[""],"alpha2Code":"XK","alpha3Code":"KOS","callingCodes":["383"],"capital":"Pristina","altSpellings":["XK","Република Косово"],"region":"Europe","subregion":"Eastern Europe","population":1733842,"latlng":[42.666667,21.166667],"demonym":"Kosovar","area":10908.0,"gini":null,"timezones":["UTC+01:00"],"borders":["ALB","MKD","MNE","SRB"],"nativeName":"Republika e Kosovës","numericCode":null,"currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"sq","iso639_2":"sqi","name":"Albanian","nativeName":"Shqip"},{"iso639_1":"sr","iso639_2":"srp","name":"Serbian","nativeName":"српски језик"}],"translations":{"de":null,"es":"Kosovo","fr":null,"ja":null,"it":null,"br":"Kosovo","pt":"Kosovo","nl":null,"hr":"Kosovo","fa":"کوزوو"},"flag":"https://restcountries.eu/data/kos.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":null}
+{"name":"Réunion","topLevelDomain":[".re"],"alpha2Code":"RE","alpha3Code":"REU","callingCodes":["262"],"capital":"Saint-Denis","altSpellings":["RE","Reunion"],"region":"Africa","subregion":"Eastern Africa","population":840974,"latlng":[-21.15,55.5],"demonym":"French","area":null,"gini":null,"timezones":["UTC+04:00"],"borders":[],"nativeName":"La Réunion","numericCode":"638","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Réunion","es":"Reunión","fr":"Réunion","ja":"レユニオン","it":"Riunione","br":"Reunião","pt":"Reunião","nl":"Réunion","hr":"Réunion","fa":"رئونیون"},"flag":"https://restcountries.eu/data/reu.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":""}
+{"name":"Romania","topLevelDomain":[".ro"],"alpha2Code":"RO","alpha3Code":"ROU","callingCodes":["40"],"capital":"Bucharest","altSpellings":["RO","Rumania","Roumania","România"],"region":"Europe","subregion":"Eastern Europe","population":19861408,"latlng":[46.0,25.0],"demonym":"Romanian","area":238391.0,"gini":30.0,"timezones":["UTC+02:00"],"borders":["BGR","HUN","MDA","SRB","UKR"],"nativeName":"România","numericCode":"642","currencies":[{"code":"RON","name":"Romanian leu","symbol":"lei"}],"languages":[{"iso639_1":"ro","iso639_2":"ron","name":"Romanian","nativeName":"Română"}],"translations":{"de":"Rumänien","es":"Rumania","fr":"Roumanie","ja":"ルーマニア","it":"Romania","br":"Romênia","pt":"Roménia","nl":"Roemenië","hr":"Rumunjska","fa":"رومانی"},"flag":"https://restcountries.eu/data/rou.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"ROU"}
+{"name":"Russian Federation","topLevelDomain":[".ru"],"alpha2Code":"RU","alpha3Code":"RUS","callingCodes":["7"],"capital":"Moscow","altSpellings":["RU","Rossiya","Russian Federation","Российская Федерация","Rossiyskaya Federatsiya"],"region":"Europe","subregion":"Eastern Europe","population":146599183,"latlng":[60.0,100.0],"demonym":"Russian","area":1.7124442E7,"gini":40.1,"timezones":["UTC+03:00","UTC+04:00","UTC+06:00","UTC+07:00","UTC+08:00","UTC+09:00","UTC+10:00","UTC+11:00","UTC+12:00"],"borders":["AZE","BLR","CHN","EST","FIN","GEO","KAZ","PRK","LVA","LTU","MNG","NOR","POL","UKR"],"nativeName":"Россия","numericCode":"643","currencies":[{"code":"RUB","name":"Russian ruble","symbol":"₽"}],"languages":[{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Russland","es":"Rusia","fr":"Russie","ja":"ロシア連邦","it":"Russia","br":"Rússia","pt":"Rússia","nl":"Rusland","hr":"Rusija","fa":"روسیه"},"flag":"https://restcountries.eu/data/rus.svg","regionalBlocs":[{"acronym":"EEU","name":"Eurasian Economic Union","otherAcronyms":["EAEU"],"otherNames":[]}],"cioc":"RUS"}
+{"name":"Rwanda","topLevelDomain":[".rw"],"alpha2Code":"RW","alpha3Code":"RWA","callingCodes":["250"],"capital":"Kigali","altSpellings":["RW","Republic of Rwanda","Repubulika y'u Rwanda","République du Rwanda"],"region":"Africa","subregion":"Eastern Africa","population":11553188,"latlng":[-2.0,30.0],"demonym":"Rwandan","area":26338.0,"gini":50.8,"timezones":["UTC+02:00"],"borders":["BDI","COD","TZA","UGA"],"nativeName":"Rwanda","numericCode":"646","currencies":[{"code":"RWF","name":"Rwandan franc","symbol":"Fr"}],"languages":[{"iso639_1":"rw","iso639_2":"kin","name":"Kinyarwanda","nativeName":"Ikinyarwanda"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Ruanda","es":"Ruanda","fr":"Rwanda","ja":"ルワンダ","it":"Ruanda","br":"Ruanda","pt":"Ruanda","nl":"Rwanda","hr":"Ruanda","fa":"رواندا"},"flag":"https://restcountries.eu/data/rwa.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"RWA"}
+{"name":"Saint Barthélemy","topLevelDomain":[".bl"],"alpha2Code":"BL","alpha3Code":"BLM","callingCodes":["590"],"capital":"Gustavia","altSpellings":["BL","St. Barthelemy","Collectivity of Saint Barthélemy","Collectivité de Saint-Barthélemy"],"region":"Americas","subregion":"Caribbean","population":9417,"latlng":[18.5,-63.41666666],"demonym":"Saint Barthélemy Islander","area":21.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Saint-Barthélemy","numericCode":"652","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Saint-Barthélemy","es":"San Bartolomé","fr":"Saint-Barthélemy","ja":"サン・バルテルミー","it":"Antille Francesi","br":"São Bartolomeu","pt":"São Bartolomeu","nl":"Saint Barthélemy","hr":"Saint Barthélemy","fa":"سن-بارتلمی"},"flag":"https://restcountries.eu/data/blm.svg","regionalBlocs":[],"cioc":""}
+{"name":"Saint Helena, Ascension and Tristan da Cunha","topLevelDomain":[".sh"],"alpha2Code":"SH","alpha3Code":"SHN","callingCodes":["290"],"capital":"Jamestown","altSpellings":["SH"],"region":"Africa","subregion":"Western Africa","population":4255,"latlng":[-15.95,-5.7],"demonym":"Saint Helenian","area":null,"gini":null,"timezones":["UTC+00:00"],"borders":[],"nativeName":"Saint Helena","numericCode":"654","currencies":[{"code":"SHP","name":"Saint Helena pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Sankt Helena","es":"Santa Helena","fr":"Sainte-Hélène","ja":"セントヘレナ・アセンションおよびトリスタンダクーニャ","it":"Sant'Elena","br":"Santa Helena","pt":"Santa Helena","nl":"Sint-Helena","hr":"Sveta Helena","fa":"سنت هلنا، اسنشن و تریستان دا کونا"},"flag":"https://restcountries.eu/data/shn.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":null}
+{"name":"Saint Kitts and Nevis","topLevelDomain":[".kn"],"alpha2Code":"KN","alpha3Code":"KNA","callingCodes":["1869"],"capital":"Basseterre","altSpellings":["KN","Federation of Saint Christopher and Nevis"],"region":"Americas","subregion":"Caribbean","population":46204,"latlng":[17.33333333,-62.75],"demonym":"Kittian and Nevisian","area":261.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Saint Kitts and Nevis","numericCode":"659","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"St. Kitts und Nevis","es":"San Cristóbal y Nieves","fr":"Saint-Christophe-et-Niévès","ja":"セントクリストファー・ネイビス","it":"Saint Kitts e Nevis","br":"São Cristóvão e Neves","pt":"São Cristóvão e Neves","nl":"Saint Kitts en Nevis","hr":"Sveti Kristof i Nevis","fa":"سنت کیتس و نویس"},"flag":"https://restcountries.eu/data/kna.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"SKN"}
+{"name":"Saint Lucia","topLevelDomain":[".lc"],"alpha2Code":"LC","alpha3Code":"LCA","callingCodes":["1758"],"capital":"Castries","altSpellings":["LC"],"region":"Americas","subregion":"Caribbean","population":186000,"latlng":[13.88333333,-60.96666666],"demonym":"Saint Lucian","area":616.0,"gini":42.6,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Saint Lucia","numericCode":"662","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Saint Lucia","es":"Santa Lucía","fr":"Saint-Lucie","ja":"セントルシア","it":"Santa Lucia","br":"Santa Lúcia","pt":"Santa Lúcia","nl":"Saint Lucia","hr":"Sveta Lucija","fa":"سنت لوسیا"},"flag":"https://restcountries.eu/data/lca.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"LCA"}
+{"name":"Saint Martin (French part)","topLevelDomain":[".mf",".fr",".gp"],"alpha2Code":"MF","alpha3Code":"MAF","callingCodes":["590"],"capital":"Marigot","altSpellings":["MF","Collectivity of Saint Martin","Collectivité de Saint-Martin"],"region":"Americas","subregion":"Caribbean","population":36979,"latlng":[18.08333333,-63.95],"demonym":"Saint Martin Islander","area":53.0,"gini":null,"timezones":["UTC-04:00"],"borders":["SXM","NLD"],"nativeName":"Saint-Martin","numericCode":"663","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"}],"translations":{"de":"Saint Martin","es":"Saint Martin","fr":"Saint-Martin","ja":"サン・マルタン(フランス領)","it":"Saint Martin","br":"Saint Martin","pt":"Ilha São Martinho","nl":"Saint-Martin","hr":"Sveti Martin","fa":"سینت مارتن"},"flag":"https://restcountries.eu/data/maf.svg","regionalBlocs":[],"cioc":""}
+{"name":"Saint Pierre and Miquelon","topLevelDomain":[".pm"],"alpha2Code":"PM","alpha3Code":"SPM","callingCodes":["508"],"capital":"Saint-Pierre","altSpellings":["PM","Collectivité territoriale de Saint-Pierre-et-Miquelon"],"region":"Americas","subregion":"Northern America","population":6069,"latlng":[46.83333333,-56.33333333],"demonym":"French","area":242.0,"gini":null,"timezones":["UTC-03:00"],"borders":[],"nativeName":"Saint-Pierre-et-Miquelon","numericCode":"666","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Saint-Pierre und Miquelon","es":"San Pedro y Miquelón","fr":"Saint-Pierre-et-Miquelon","ja":"サンピエール島・ミクロン島","it":"Saint-Pierre e Miquelon","br":"Saint-Pierre e Miquelon","pt":"São Pedro e Miquelon","nl":"Saint Pierre en Miquelon","hr":"Sveti Petar i Mikelon","fa":"سن پیر و میکلن"},"flag":"https://restcountries.eu/data/spm.svg","regionalBlocs":[],"cioc":""}
+{"name":"Saint Vincent and the Grenadines","topLevelDomain":[".vc"],"alpha2Code":"VC","alpha3Code":"VCT","callingCodes":["1784"],"capital":"Kingstown","altSpellings":["VC"],"region":"Americas","subregion":"Caribbean","population":109991,"latlng":[13.25,-61.2],"demonym":"Saint Vincentian","area":389.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Saint Vincent and the Grenadines","numericCode":"670","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Saint Vincent und die Grenadinen","es":"San Vicente y Granadinas","fr":"Saint-Vincent-et-les-Grenadines","ja":"セントビンセントおよびグレナディーン諸島","it":"Saint Vincent e Grenadine","br":"São Vicente e Granadinas","pt":"São Vicente e Granadinas","nl":"Saint Vincent en de Grenadines","hr":"Sveti Vincent i Grenadini","fa":"سنت وینسنت و گرنادینها"},"flag":"https://restcountries.eu/data/vct.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"VIN"}
+{"name":"Samoa","topLevelDomain":[".ws"],"alpha2Code":"WS","alpha3Code":"WSM","callingCodes":["685"],"capital":"Apia","altSpellings":["WS","Independent State of Samoa","Malo Saʻoloto Tutoʻatasi o Sāmoa"],"region":"Oceania","subregion":"Polynesia","population":194899,"latlng":[-13.58333333,-172.33333333],"demonym":"Samoan","area":2842.0,"gini":null,"timezones":["UTC+13:00"],"borders":[],"nativeName":"Samoa","numericCode":"882","currencies":[{"code":"WST","name":"Samoan tālā","symbol":"T"}],"languages":[{"iso639_1":"sm","iso639_2":"smo","name":"Samoan","nativeName":"gagana fa'a Samoa"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Samoa","es":"Samoa","fr":"Samoa","ja":"サモア","it":"Samoa","br":"Samoa","pt":"Samoa","nl":"Samoa","hr":"Samoa","fa":"ساموآ"},"flag":"https://restcountries.eu/data/wsm.svg","regionalBlocs":[],"cioc":"SAM"}
+{"name":"San Marino","topLevelDomain":[".sm"],"alpha2Code":"SM","alpha3Code":"SMR","callingCodes":["378"],"capital":"City of San Marino","altSpellings":["SM","Republic of San Marino","Repubblica di San Marino"],"region":"Europe","subregion":"Southern Europe","population":33005,"latlng":[43.76666666,12.41666666],"demonym":"Sammarinese","area":61.0,"gini":null,"timezones":["UTC+01:00"],"borders":["ITA"],"nativeName":"San Marino","numericCode":"674","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"it","iso639_2":"ita","name":"Italian","nativeName":"Italiano"}],"translations":{"de":"San Marino","es":"San Marino","fr":"Saint-Marin","ja":"サンマリノ","it":"San Marino","br":"San Marino","pt":"São Marinho","nl":"San Marino","hr":"San Marino","fa":"سان مارینو"},"flag":"https://restcountries.eu/data/smr.svg","regionalBlocs":[],"cioc":"SMR"}
+{"name":"Sao Tome and Principe","topLevelDomain":[".st"],"alpha2Code":"ST","alpha3Code":"STP","callingCodes":["239"],"capital":"São Tomé","altSpellings":["ST","Democratic Republic of São Tomé and Príncipe","República Democrática de São Tomé e Príncipe"],"region":"Africa","subregion":"Middle Africa","population":187356,"latlng":[1.0,7.0],"demonym":"Sao Tomean","area":964.0,"gini":50.8,"timezones":["UTC"],"borders":[],"nativeName":"São Tomé e Príncipe","numericCode":"678","currencies":[{"code":"STD","name":"São Tomé and Príncipe dobra","symbol":"Db"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"São Tomé und Príncipe","es":"Santo Tomé y Príncipe","fr":"Sao Tomé-et-Principe","ja":"サントメ・プリンシペ","it":"São Tomé e Príncipe","br":"São Tomé e Príncipe","pt":"São Tomé e Príncipe","nl":"Sao Tomé en Principe","hr":"Sveti Toma i Princip","fa":"کواترو دو فرویرو"},"flag":"https://restcountries.eu/data/stp.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"STP"}
+{"name":"Saudi Arabia","topLevelDomain":[".sa"],"alpha2Code":"SA","alpha3Code":"SAU","callingCodes":["966"],"capital":"Riyadh","altSpellings":["SA","Kingdom of Saudi Arabia","Al-Mamlakah al-‘Arabiyyah as-Su‘ūdiyyah"],"region":"Asia","subregion":"Western Asia","population":32248200,"latlng":[25.0,45.0],"demonym":"Saudi Arabian","area":2149690.0,"gini":null,"timezones":["UTC+03:00"],"borders":["IRQ","JOR","KWT","OMN","QAT","ARE","YEM"],"nativeName":"العربية السعودية","numericCode":"682","currencies":[{"code":"SAR","name":"Saudi riyal","symbol":"ر.س"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Saudi-Arabien","es":"Arabia Saudí","fr":"Arabie Saoudite","ja":"サウジアラビア","it":"Arabia Saudita","br":"Arábia Saudita","pt":"Arábia Saudita","nl":"Saoedi-Arabië","hr":"Saudijska Arabija","fa":"عربستان سعودی"},"flag":"https://restcountries.eu/data/sau.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"KSA"}
+{"name":"Senegal","topLevelDomain":[".sn"],"alpha2Code":"SN","alpha3Code":"SEN","callingCodes":["221"],"capital":"Dakar","altSpellings":["SN","Republic of Senegal","République du Sénégal"],"region":"Africa","subregion":"Western Africa","population":14799859,"latlng":[14.0,-14.0],"demonym":"Senegalese","area":196722.0,"gini":39.2,"timezones":["UTC"],"borders":["GMB","GIN","GNB","MLI","MRT"],"nativeName":"Sénégal","numericCode":"686","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Senegal","es":"Senegal","fr":"Sénégal","ja":"セネガル","it":"Senegal","br":"Senegal","pt":"Senegal","nl":"Senegal","hr":"Senegal","fa":"سنگال"},"flag":"https://restcountries.eu/data/sen.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"SEN"}
+{"name":"Serbia","topLevelDomain":[".rs"],"alpha2Code":"RS","alpha3Code":"SRB","callingCodes":["381"],"capital":"Belgrade","altSpellings":["RS","Srbija","Republic of Serbia","Република Србија","Republika Srbija"],"region":"Europe","subregion":"Southern Europe","population":7076372,"latlng":[44.0,21.0],"demonym":"Serbian","area":88361.0,"gini":27.8,"timezones":["UTC+01:00"],"borders":["BIH","BGR","HRV","HUN","KOS","MKD","MNE","ROU"],"nativeName":"Србија","numericCode":"688","currencies":[{"code":"RSD","name":"Serbian dinar","symbol":"дин."}],"languages":[{"iso639_1":"sr","iso639_2":"srp","name":"Serbian","nativeName":"српски језик"}],"translations":{"de":"Serbien","es":"Serbia","fr":"Serbie","ja":"セルビア","it":"Serbia","br":"Sérvia","pt":"Sérvia","nl":"Servië","hr":"Srbija","fa":"صربستان"},"flag":"https://restcountries.eu/data/srb.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":"SRB"}
+{"name":"Seychelles","topLevelDomain":[".sc"],"alpha2Code":"SC","alpha3Code":"SYC","callingCodes":["248"],"capital":"Victoria","altSpellings":["SC","Republic of Seychelles","Repiblik Sesel","République des Seychelles"],"region":"Africa","subregion":"Eastern Africa","population":91400,"latlng":[-4.58333333,55.66666666],"demonym":"Seychellois","area":452.0,"gini":65.8,"timezones":["UTC+04:00"],"borders":[],"nativeName":"Seychelles","numericCode":"690","currencies":[{"code":"SCR","name":"Seychellois rupee","symbol":"₨"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Seychellen","es":"Seychelles","fr":"Seychelles","ja":"セーシェル","it":"Seychelles","br":"Seicheles","pt":"Seicheles","nl":"Seychellen","hr":"Sejšeli","fa":"سیشل"},"flag":"https://restcountries.eu/data/syc.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"SEY"}
+{"name":"Sierra Leone","topLevelDomain":[".sl"],"alpha2Code":"SL","alpha3Code":"SLE","callingCodes":["232"],"capital":"Freetown","altSpellings":["SL","Republic of Sierra Leone"],"region":"Africa","subregion":"Western Africa","population":7075641,"latlng":[8.5,-11.5],"demonym":"Sierra Leonean","area":71740.0,"gini":42.5,"timezones":["UTC"],"borders":["GIN","LBR"],"nativeName":"Sierra Leone","numericCode":"694","currencies":[{"code":"SLL","name":"Sierra Leonean leone","symbol":"Le"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Sierra Leone","es":"Sierra Leone","fr":"Sierra Leone","ja":"シエラレオネ","it":"Sierra Leone","br":"Serra Leoa","pt":"Serra Leoa","nl":"Sierra Leone","hr":"Sijera Leone","fa":"سیرالئون"},"flag":"https://restcountries.eu/data/sle.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"SLE"}
+{"name":"Singapore","topLevelDomain":[".sg"],"alpha2Code":"SG","alpha3Code":"SGP","callingCodes":["65"],"capital":"Singapore","altSpellings":["SG","Singapura","Republik Singapura","新加坡共和国"],"region":"Asia","subregion":"South-Eastern Asia","population":5535000,"latlng":[1.36666666,103.8],"demonym":"Singaporean","area":710.0,"gini":48.1,"timezones":["UTC+08:00"],"borders":[],"nativeName":"Singapore","numericCode":"702","currencies":[{"code":"BND","name":"Brunei dollar","symbol":"$"},{"code":"SGD","name":"Singapore dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ms","iso639_2":"msa","name":"Malay","nativeName":"bahasa Melayu"},{"iso639_1":"ta","iso639_2":"tam","name":"Tamil","nativeName":"தமிழ்"},{"iso639_1":"zh","iso639_2":"zho","name":"Chinese","nativeName":"中文 (Zhōngwén)"}],"translations":{"de":"Singapur","es":"Singapur","fr":"Singapour","ja":"シンガポール","it":"Singapore","br":"Singapura","pt":"Singapura","nl":"Singapore","hr":"Singapur","fa":"سنگاپور"},"flag":"https://restcountries.eu/data/sgp.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"SIN"}
+{"name":"Sint Maarten (Dutch part)","topLevelDomain":[".sx"],"alpha2Code":"SX","alpha3Code":"SXM","callingCodes":["1721"],"capital":"Philipsburg","altSpellings":["SX"],"region":"Americas","subregion":"Caribbean","population":38247,"latlng":[18.033333,-63.05],"demonym":"Dutch","area":34.0,"gini":null,"timezones":["UTC-04:00"],"borders":["MAF"],"nativeName":"Sint Maarten","numericCode":"534","currencies":[{"code":"ANG","name":"Netherlands Antillean guilder","symbol":"ƒ"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Sint Maarten (niederl. Teil)","es":null,"fr":"Saint Martin (partie néerlandaise)","ja":null,"it":"Saint Martin (parte olandese)","br":"Sint Maarten","pt":"São Martinho","nl":"Sint Maarten","hr":null,"fa":"سینت مارتن"},"flag":"https://restcountries.eu/data/sxm.svg","regionalBlocs":[],"cioc":""}
+{"name":"Slovakia","topLevelDomain":[".sk"],"alpha2Code":"SK","alpha3Code":"SVK","callingCodes":["421"],"capital":"Bratislava","altSpellings":["SK","Slovak Republic","Slovenská republika"],"region":"Europe","subregion":"Eastern Europe","population":5426252,"latlng":[48.66666666,19.5],"demonym":"Slovak","area":49037.0,"gini":26.0,"timezones":["UTC+01:00"],"borders":["AUT","CZE","HUN","POL","UKR"],"nativeName":"Slovensko","numericCode":"703","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"sk","iso639_2":"slk","name":"Slovak","nativeName":"slovenčina"}],"translations":{"de":"Slowakei","es":"República Eslovaca","fr":"Slovaquie","ja":"スロバキア","it":"Slovacchia","br":"Eslováquia","pt":"Eslováquia","nl":"Slowakije","hr":"Slovačka","fa":"اسلواکی"},"flag":"https://restcountries.eu/data/svk.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"SVK"}
+{"name":"Slovenia","topLevelDomain":[".si"],"alpha2Code":"SI","alpha3Code":"SVN","callingCodes":["386"],"capital":"Ljubljana","altSpellings":["SI","Republic of Slovenia","Republika Slovenija"],"region":"Europe","subregion":"Southern Europe","population":2064188,"latlng":[46.11666666,14.81666666],"demonym":"Slovene","area":20273.0,"gini":31.2,"timezones":["UTC+01:00"],"borders":["AUT","HRV","ITA","HUN"],"nativeName":"Slovenija","numericCode":"705","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"sl","iso639_2":"slv","name":"Slovene","nativeName":"slovenski jezik"}],"translations":{"de":"Slowenien","es":"Eslovenia","fr":"Slovénie","ja":"スロベニア","it":"Slovenia","br":"Eslovênia","pt":"Eslovénia","nl":"Slovenië","hr":"Slovenija","fa":"اسلوونی"},"flag":"https://restcountries.eu/data/svn.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"SLO"}
+{"name":"Solomon Islands","topLevelDomain":[".sb"],"alpha2Code":"SB","alpha3Code":"SLB","callingCodes":["677"],"capital":"Honiara","altSpellings":["SB"],"region":"Oceania","subregion":"Melanesia","population":642000,"latlng":[-8.0,159.0],"demonym":"Solomon Islander","area":28896.0,"gini":null,"timezones":["UTC+11:00"],"borders":[],"nativeName":"Solomon Islands","numericCode":"090","currencies":[{"code":"SBD","name":"Solomon Islands dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Salomonen","es":"Islas Salomón","fr":"Îles Salomon","ja":"ソロモン諸島","it":"Isole Salomone","br":"Ilhas Salomão","pt":"Ilhas Salomão","nl":"Salomonseilanden","hr":"Solomonski Otoci","fa":"جزایر سلیمان"},"flag":"https://restcountries.eu/data/slb.svg","regionalBlocs":[],"cioc":"SOL"}
+{"name":"Somalia","topLevelDomain":[".so"],"alpha2Code":"SO","alpha3Code":"SOM","callingCodes":["252"],"capital":"Mogadishu","altSpellings":["SO","aṣ-Ṣūmāl","Federal Republic of Somalia","Jamhuuriyadda Federaalka Soomaaliya","Jumhūriyyat aṣ-Ṣūmāl al-Fiderāliyya"],"region":"Africa","subregion":"Eastern Africa","population":11079000,"latlng":[10.0,49.0],"demonym":"Somali","area":637657.0,"gini":null,"timezones":["UTC+03:00"],"borders":["DJI","ETH","KEN"],"nativeName":"Soomaaliya","numericCode":"706","currencies":[{"code":"SOS","name":"Somali shilling","symbol":"Sh"}],"languages":[{"iso639_1":"so","iso639_2":"som","name":"Somali","nativeName":"Soomaaliga"},{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Somalia","es":"Somalia","fr":"Somalie","ja":"ソマリア","it":"Somalia","br":"Somália","pt":"Somália","nl":"Somalië","hr":"Somalija","fa":"سومالی"},"flag":"https://restcountries.eu/data/som.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"SOM"}
+{"name":"South Africa","topLevelDomain":[".za"],"alpha2Code":"ZA","alpha3Code":"ZAF","callingCodes":["27"],"capital":"Pretoria","altSpellings":["ZA","RSA","Suid-Afrika","Republic of South Africa"],"region":"Africa","subregion":"Southern Africa","population":55653654,"latlng":[-29.0,24.0],"demonym":"South African","area":1221037.0,"gini":63.1,"timezones":["UTC+02:00"],"borders":["BWA","LSO","MOZ","NAM","SWZ","ZWE"],"nativeName":"South Africa","numericCode":"710","currencies":[{"code":"ZAR","name":"South African rand","symbol":"R"}],"languages":[{"iso639_1":"af","iso639_2":"afr","name":"Afrikaans","nativeName":"Afrikaans"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"nr","iso639_2":"nbl","name":"Southern Ndebele","nativeName":"isiNdebele"},{"iso639_1":"st","iso639_2":"sot","name":"Southern Sotho","nativeName":"Sesotho"},{"iso639_1":"ss","iso639_2":"ssw","name":"Swati","nativeName":"SiSwati"},{"iso639_1":"tn","iso639_2":"tsn","name":"Tswana","nativeName":"Setswana"},{"iso639_1":"ts","iso639_2":"tso","name":"Tsonga","nativeName":"Xitsonga"},{"iso639_1":"ve","iso639_2":"ven","name":"Venda","nativeName":"Tshivenḓa"},{"iso639_1":"xh","iso639_2":"xho","name":"Xhosa","nativeName":"isiXhosa"},{"iso639_1":"zu","iso639_2":"zul","name":"Zulu","nativeName":"isiZulu"}],"translations":{"de":"Republik Südafrika","es":"República de Sudáfrica","fr":"Afrique du Sud","ja":"南アフリカ","it":"Sud Africa","br":"República Sul-Africana","pt":"República Sul-Africana","nl":"Zuid-Afrika","hr":"Južnoafrička Republika","fa":"آفریقای جنوبی"},"flag":"https://restcountries.eu/data/zaf.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"RSA"}
+{"name":"South Georgia and the South Sandwich Islands","topLevelDomain":[".gs"],"alpha2Code":"GS","alpha3Code":"SGS","callingCodes":["500"],"capital":"King Edward Point","altSpellings":["GS","South Georgia and the South Sandwich Islands"],"region":"Americas","subregion":"South America","population":30,"latlng":[-54.5,-37.0],"demonym":"South Georgia and the South Sandwich Islander","area":null,"gini":null,"timezones":["UTC-02:00"],"borders":[],"nativeName":"South Georgia","numericCode":"239","currencies":[{"code":"GBP","name":"British pound","symbol":"£"},{"code":"(none)","name":null,"symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Südgeorgien und die Südlichen Sandwichinseln","es":"Islas Georgias del Sur y Sandwich del Sur","fr":"Géorgie du Sud-et-les Îles Sandwich du Sud","ja":"サウスジョージア・サウスサンドウィッチ諸島","it":"Georgia del Sud e Isole Sandwich Meridionali","br":"Ilhas Geórgias do Sul e Sandwich do Sul","pt":"Ilhas Geórgia do Sul e Sanduíche do Sul","nl":"Zuid-Georgia en Zuidelijke Sandwicheilanden","hr":"Južna Georgija i otočje Južni Sandwich","fa":"جزایر جورجیای جنوبی و ساندویچ جنوبی"},"flag":"https://restcountries.eu/data/sgs.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":""}
+{"name":"Korea (Republic of)","topLevelDomain":[".kr"],"alpha2Code":"KR","alpha3Code":"KOR","callingCodes":["82"],"capital":"Seoul","altSpellings":["KR","Republic of Korea"],"region":"Asia","subregion":"Eastern Asia","population":50801405,"latlng":[37.0,127.5],"demonym":"South Korean","area":100210.0,"gini":31.3,"timezones":["UTC+09:00"],"borders":["PRK"],"nativeName":"대한민국","numericCode":"410","currencies":[{"code":"KRW","name":"South Korean won","symbol":"₩"}],"languages":[{"iso639_1":"ko","iso639_2":"kor","name":"Korean","nativeName":"한국어"}],"translations":{"de":"Südkorea","es":"Corea del Sur","fr":"Corée du Sud","ja":"大韓民国","it":"Corea del Sud","br":"Coreia do Sul","pt":"Coreia do Sul","nl":"Zuid-Korea","hr":"Južna Koreja","fa":"کره شمالی"},"flag":"https://restcountries.eu/data/kor.svg","regionalBlocs":[],"cioc":"KOR"}
+{"name":"South Sudan","topLevelDomain":[".ss"],"alpha2Code":"SS","alpha3Code":"SSD","callingCodes":["211"],"capital":"Juba","altSpellings":["SS"],"region":"Africa","subregion":"Middle Africa","population":12131000,"latlng":[7.0,30.0],"demonym":"South Sudanese","area":619745.0,"gini":45.5,"timezones":["UTC+03:00"],"borders":["CAF","COD","ETH","KEN","SDN","UGA"],"nativeName":"South Sudan","numericCode":"728","currencies":[{"code":"SSP","name":"South Sudanese pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Südsudan","es":"Sudán del Sur","fr":"Soudan du Sud","ja":"南スーダン","it":"Sudan del sud","br":"Sudão do Sul","pt":"Sudão do Sul","nl":"Zuid-Soedan","hr":"Južni Sudan","fa":"سودان جنوبی"},"flag":"https://restcountries.eu/data/ssd.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":""}
+{"name":"Spain","topLevelDomain":[".es"],"alpha2Code":"ES","alpha3Code":"ESP","callingCodes":["34"],"capital":"Madrid","altSpellings":["ES","Kingdom of Spain","Reino de España"],"region":"Europe","subregion":"Southern Europe","population":46438422,"latlng":[40.0,-4.0],"demonym":"Spanish","area":505992.0,"gini":34.7,"timezones":["UTC","UTC+01:00"],"borders":["AND","FRA","GIB","PRT","MAR"],"nativeName":"España","numericCode":"724","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Spanien","es":"España","fr":"Espagne","ja":"スペイン","it":"Spagna","br":"Espanha","pt":"Espanha","nl":"Spanje","hr":"Španjolska","fa":"اسپانیا"},"flag":"https://restcountries.eu/data/esp.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"ESP"}
+{"name":"Sri Lanka","topLevelDomain":[".lk"],"alpha2Code":"LK","alpha3Code":"LKA","callingCodes":["94"],"capital":"Colombo","altSpellings":["LK","ilaṅkai","Democratic Socialist Republic of Sri Lanka"],"region":"Asia","subregion":"Southern Asia","population":20966000,"latlng":[7.0,81.0],"demonym":"Sri Lankan","area":65610.0,"gini":40.3,"timezones":["UTC+05:30"],"borders":["IND"],"nativeName":"śrī laṃkāva","numericCode":"144","currencies":[{"code":"LKR","name":"Sri Lankan rupee","symbol":"Rs"}],"languages":[{"iso639_1":"si","iso639_2":"sin","name":"Sinhalese","nativeName":"සිංහල"},{"iso639_1":"ta","iso639_2":"tam","name":"Tamil","nativeName":"தமிழ்"}],"translations":{"de":"Sri Lanka","es":"Sri Lanka","fr":"Sri Lanka","ja":"スリランカ","it":"Sri Lanka","br":"Sri Lanka","pt":"Sri Lanka","nl":"Sri Lanka","hr":"Šri Lanka","fa":"سریلانکا"},"flag":"https://restcountries.eu/data/lka.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"SRI"}
+{"name":"Sudan","topLevelDomain":[".sd"],"alpha2Code":"SD","alpha3Code":"SDN","callingCodes":["249"],"capital":"Khartoum","altSpellings":["SD","Republic of the Sudan","Jumhūrīyat as-Sūdān"],"region":"Africa","subregion":"Northern Africa","population":39598700,"latlng":[15.0,30.0],"demonym":"Sudanese","area":1886068.0,"gini":35.3,"timezones":["UTC+03:00"],"borders":["CAF","TCD","EGY","ERI","ETH","LBY","SSD"],"nativeName":"السودان","numericCode":"729","currencies":[{"code":"SDG","name":"Sudanese pound","symbol":"ج.س."}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Sudan","es":"Sudán","fr":"Soudan","ja":"スーダン","it":"Sudan","br":"Sudão","pt":"Sudão","nl":"Soedan","hr":"Sudan","fa":"سودان"},"flag":"https://restcountries.eu/data/sdn.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"SUD"}
+{"name":"Suriname","topLevelDomain":[".sr"],"alpha2Code":"SR","alpha3Code":"SUR","callingCodes":["597"],"capital":"Paramaribo","altSpellings":["SR","Sarnam","Sranangron","Republic of Suriname","Republiek Suriname"],"region":"Americas","subregion":"South America","population":541638,"latlng":[4.0,-56.0],"demonym":"Surinamer","area":163820.0,"gini":52.9,"timezones":["UTC-03:00"],"borders":["BRA","GUF","FRA","GUY"],"nativeName":"Suriname","numericCode":"740","currencies":[{"code":"SRD","name":"Surinamese dollar","symbol":"$"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"}],"translations":{"de":"Suriname","es":"Surinam","fr":"Surinam","ja":"スリナム","it":"Suriname","br":"Suriname","pt":"Suriname","nl":"Suriname","hr":"Surinam","fa":"سورینام"},"flag":"https://restcountries.eu/data/sur.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]},{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"SUR"}
+{"name":"Svalbard and Jan Mayen","topLevelDomain":[".sj"],"alpha2Code":"SJ","alpha3Code":"SJM","callingCodes":["4779"],"capital":"Longyearbyen","altSpellings":["SJ","Svalbard and Jan Mayen Islands"],"region":"Europe","subregion":"Northern Europe","population":2562,"latlng":[78.0,20.0],"demonym":"Norwegian","area":null,"gini":null,"timezones":["UTC+01:00"],"borders":[],"nativeName":"Svalbard og Jan Mayen","numericCode":"744","currencies":[{"code":"NOK","name":"Norwegian krone","symbol":"kr"}],"languages":[{"iso639_1":"no","iso639_2":"nor","name":"Norwegian","nativeName":"Norsk"}],"translations":{"de":"Svalbard und Jan Mayen","es":"Islas Svalbard y Jan Mayen","fr":"Svalbard et Jan Mayen","ja":"スヴァールバル諸島およびヤンマイエン島","it":"Svalbard e Jan Mayen","br":"Svalbard","pt":"Svalbard","nl":"Svalbard en Jan Mayen","hr":"Svalbard i Jan Mayen","fa":"سوالبارد و یان ماین"},"flag":"https://restcountries.eu/data/sjm.svg","regionalBlocs":[],"cioc":""}
+{"name":"Swaziland","topLevelDomain":[".sz"],"alpha2Code":"SZ","alpha3Code":"SWZ","callingCodes":["268"],"capital":"Lobamba","altSpellings":["SZ","weSwatini","Swatini","Ngwane","Kingdom of Swaziland","Umbuso waseSwatini"],"region":"Africa","subregion":"Southern Africa","population":1132657,"latlng":[-26.5,31.5],"demonym":"Swazi","area":17364.0,"gini":51.5,"timezones":["UTC+02:00"],"borders":["MOZ","ZAF"],"nativeName":"Swaziland","numericCode":"748","currencies":[{"code":"SZL","name":"Swazi lilangeni","symbol":"L"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ss","iso639_2":"ssw","name":"Swati","nativeName":"SiSwati"}],"translations":{"de":"Swasiland","es":"Suazilandia","fr":"Swaziland","ja":"スワジランド","it":"Swaziland","br":"Suazilândia","pt":"Suazilândia","nl":"Swaziland","hr":"Svazi","fa":"سوازیلند"},"flag":"https://restcountries.eu/data/swz.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"SWZ"}
+{"name":"Sweden","topLevelDomain":[".se"],"alpha2Code":"SE","alpha3Code":"SWE","callingCodes":["46"],"capital":"Stockholm","altSpellings":["SE","Kingdom of Sweden","Konungariket Sverige"],"region":"Europe","subregion":"Northern Europe","population":9894888,"latlng":[62.0,15.0],"demonym":"Swedish","area":450295.0,"gini":25.0,"timezones":["UTC+01:00"],"borders":["FIN","NOR"],"nativeName":"Sverige","numericCode":"752","currencies":[{"code":"SEK","name":"Swedish krona","symbol":"kr"}],"languages":[{"iso639_1":"sv","iso639_2":"swe","name":"Swedish","nativeName":"svenska"}],"translations":{"de":"Schweden","es":"Suecia","fr":"Suède","ja":"スウェーデン","it":"Svezia","br":"Suécia","pt":"Suécia","nl":"Zweden","hr":"Švedska","fa":"سوئد"},"flag":"https://restcountries.eu/data/swe.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"SWE"}
+{"name":"Switzerland","topLevelDomain":[".ch"],"alpha2Code":"CH","alpha3Code":"CHE","callingCodes":["41"],"capital":"Bern","altSpellings":["CH","Swiss Confederation","Schweiz","Suisse","Svizzera","Svizra"],"region":"Europe","subregion":"Western Europe","population":8341600,"latlng":[47.0,8.0],"demonym":"Swiss","area":41284.0,"gini":33.7,"timezones":["UTC+01:00"],"borders":["AUT","FRA","ITA","LIE","DEU"],"nativeName":"Schweiz","numericCode":"756","currencies":[{"code":"CHF","name":"Swiss franc","symbol":"Fr"}],"languages":[{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"it","iso639_2":"ita","name":"Italian","nativeName":"Italiano"}],"translations":{"de":"Schweiz","es":"Suiza","fr":"Suisse","ja":"スイス","it":"Svizzera","br":"Suíça","pt":"Suíça","nl":"Zwitserland","hr":"Švicarska","fa":"سوئیس"},"flag":"https://restcountries.eu/data/che.svg","regionalBlocs":[{"acronym":"EFTA","name":"European Free Trade Association","otherAcronyms":[],"otherNames":[]}],"cioc":"SUI"}
+{"name":"Syrian Arab Republic","topLevelDomain":[".sy"],"alpha2Code":"SY","alpha3Code":"SYR","callingCodes":["963"],"capital":"Damascus","altSpellings":["SY","Syrian Arab Republic","Al-Jumhūrīyah Al-ʻArabīyah As-Sūrīyah"],"region":"Asia","subregion":"Western Asia","population":18564000,"latlng":[35.0,38.0],"demonym":"Syrian","area":185180.0,"gini":35.8,"timezones":["UTC+02:00"],"borders":["IRQ","ISR","JOR","LBN","TUR"],"nativeName":"سوريا","numericCode":"760","currencies":[{"code":"SYP","name":"Syrian pound","symbol":"£"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Syrien","es":"Siria","fr":"Syrie","ja":"シリア・アラブ共和国","it":"Siria","br":"Síria","pt":"Síria","nl":"Syrië","hr":"Sirija","fa":"سوریه"},"flag":"https://restcountries.eu/data/syr.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"SYR"}
+{"name":"Taiwan","topLevelDomain":[".tw"],"alpha2Code":"TW","alpha3Code":"TWN","callingCodes":["886"],"capital":"Taipei","altSpellings":["TW","Táiwān","Republic of China","中華民國","Zhōnghuá Mínguó"],"region":"Asia","subregion":"Eastern Asia","population":23503349,"latlng":[23.5,121.0],"demonym":"Taiwanese","area":36193.0,"gini":null,"timezones":["UTC+08:00"],"borders":[],"nativeName":"臺灣","numericCode":"158","currencies":[{"code":"TWD","name":"New Taiwan dollar","symbol":"$"}],"languages":[{"iso639_1":"zh","iso639_2":"zho","name":"Chinese","nativeName":"中文 (Zhōngwén)"}],"translations":{"de":"Taiwan","es":"Taiwán","fr":"Taïwan","ja":"台湾(中華民国)","it":"Taiwan","br":"Taiwan","pt":"Taiwan","nl":"Taiwan","hr":"Tajvan","fa":"تایوان"},"flag":"https://restcountries.eu/data/twn.svg","regionalBlocs":[],"cioc":"TPE"}
+{"name":"Tajikistan","topLevelDomain":[".tj"],"alpha2Code":"TJ","alpha3Code":"TJK","callingCodes":["992"],"capital":"Dushanbe","altSpellings":["TJ","Toçikiston","Republic of Tajikistan","Ҷумҳурии Тоҷикистон","Çumhuriyi Toçikiston"],"region":"Asia","subregion":"Central Asia","population":8593600,"latlng":[39.0,71.0],"demonym":"Tadzhik","area":143100.0,"gini":30.8,"timezones":["UTC+05:00"],"borders":["AFG","CHN","KGZ","UZB"],"nativeName":"Тоҷикистон","numericCode":"762","currencies":[{"code":"TJS","name":"Tajikistani somoni","symbol":"ЅМ"}],"languages":[{"iso639_1":"tg","iso639_2":"tgk","name":"Tajik","nativeName":"тоҷикӣ"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Tadschikistan","es":"Tayikistán","fr":"Tadjikistan","ja":"タジキスタン","it":"Tagikistan","br":"Tajiquistão","pt":"Tajiquistão","nl":"Tadzjikistan","hr":"Tađikistan","fa":"تاجیکستان"},"flag":"https://restcountries.eu/data/tjk.svg","regionalBlocs":[],"cioc":"TJK"}
+{"name":"Tanzania, United Republic of","topLevelDomain":[".tz"],"alpha2Code":"TZ","alpha3Code":"TZA","callingCodes":["255"],"capital":"Dodoma","altSpellings":["TZ","United Republic of Tanzania","Jamhuri ya Muungano wa Tanzania"],"region":"Africa","subregion":"Eastern Africa","population":55155000,"latlng":[-6.0,35.0],"demonym":"Tanzanian","area":945087.0,"gini":37.6,"timezones":["UTC+03:00"],"borders":["BDI","COD","KEN","MWI","MOZ","RWA","UGA","ZMB"],"nativeName":"Tanzania","numericCode":"834","currencies":[{"code":"TZS","name":"Tanzanian shilling","symbol":"Sh"}],"languages":[{"iso639_1":"sw","iso639_2":"swa","name":"Swahili","nativeName":"Kiswahili"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Tansania","es":"Tanzania","fr":"Tanzanie","ja":"タンザニア","it":"Tanzania","br":"Tanzânia","pt":"Tanzânia","nl":"Tanzania","hr":"Tanzanija","fa":"تانزانیا"},"flag":"https://restcountries.eu/data/tza.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"TAN"}
+{"name":"Thailand","topLevelDomain":[".th"],"alpha2Code":"TH","alpha3Code":"THA","callingCodes":["66"],"capital":"Bangkok","altSpellings":["TH","Prathet","Thai","Kingdom of Thailand","ราชอาณาจักรไทย","Ratcha Anachak Thai"],"region":"Asia","subregion":"South-Eastern Asia","population":65327652,"latlng":[15.0,100.0],"demonym":"Thai","area":513120.0,"gini":40.0,"timezones":["UTC+07:00"],"borders":["MMR","KHM","LAO","MYS"],"nativeName":"ประเทศไทย","numericCode":"764","currencies":[{"code":"THB","name":"Thai baht","symbol":"฿"}],"languages":[{"iso639_1":"th","iso639_2":"tha","name":"Thai","nativeName":"ไทย"}],"translations":{"de":"Thailand","es":"Tailandia","fr":"Thaïlande","ja":"タイ","it":"Tailandia","br":"Tailândia","pt":"Tailândia","nl":"Thailand","hr":"Tajland","fa":"تایلند"},"flag":"https://restcountries.eu/data/tha.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"THA"}
+{"name":"Timor-Leste","topLevelDomain":[".tl"],"alpha2Code":"TL","alpha3Code":"TLS","callingCodes":["670"],"capital":"Dili","altSpellings":["TL","East Timor","Democratic Republic of Timor-Leste","República Democrática de Timor-Leste","Repúblika Demokrátika Timór-Leste"],"region":"Asia","subregion":"South-Eastern Asia","population":1167242,"latlng":[-8.83333333,125.91666666],"demonym":"East Timorese","area":14874.0,"gini":31.9,"timezones":["UTC+09:00"],"borders":["IDN"],"nativeName":"Timor-Leste","numericCode":"626","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"},{"code":null,"name":null,"symbol":null}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Timor-Leste","es":"Timor Oriental","fr":"Timor oriental","ja":"東ティモール","it":"Timor Est","br":"Timor Leste","pt":"Timor Leste","nl":"Oost-Timor","hr":"Istočni Timor","fa":"تیمور شرقی"},"flag":"https://restcountries.eu/data/tls.svg","regionalBlocs":[],"cioc":"TLS"}
+{"name":"Togo","topLevelDomain":[".tg"],"alpha2Code":"TG","alpha3Code":"TGO","callingCodes":["228"],"capital":"Lomé","altSpellings":["TG","Togolese","Togolese Republic","République Togolaise"],"region":"Africa","subregion":"Western Africa","population":7143000,"latlng":[8.0,1.16666666],"demonym":"Togolese","area":56785.0,"gini":34.4,"timezones":["UTC"],"borders":["BEN","BFA","GHA"],"nativeName":"Togo","numericCode":"768","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Togo","es":"Togo","fr":"Togo","ja":"トーゴ","it":"Togo","br":"Togo","pt":"Togo","nl":"Togo","hr":"Togo","fa":"توگو"},"flag":"https://restcountries.eu/data/tgo.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"TOG"}
+{"name":"Tokelau","topLevelDomain":[".tk"],"alpha2Code":"TK","alpha3Code":"TKL","callingCodes":["690"],"capital":"Fakaofo","altSpellings":["TK"],"region":"Oceania","subregion":"Polynesia","population":1411,"latlng":[-9.0,-172.0],"demonym":"Tokelauan","area":12.0,"gini":null,"timezones":["UTC+13:00"],"borders":[],"nativeName":"Tokelau","numericCode":"772","currencies":[{"code":"NZD","name":"New Zealand dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Tokelau","es":"Islas Tokelau","fr":"Tokelau","ja":"トケラウ","it":"Isole Tokelau","br":"Tokelau","pt":"Toquelau","nl":"Tokelau","hr":"Tokelau","fa":"توکلائو"},"flag":"https://restcountries.eu/data/tkl.svg","regionalBlocs":[],"cioc":""}
+{"name":"Tonga","topLevelDomain":[".to"],"alpha2Code":"TO","alpha3Code":"TON","callingCodes":["676"],"capital":"Nuku'alofa","altSpellings":["TO"],"region":"Oceania","subregion":"Polynesia","population":103252,"latlng":[-20.0,-175.0],"demonym":"Tongan","area":747.0,"gini":null,"timezones":["UTC+13:00"],"borders":[],"nativeName":"Tonga","numericCode":"776","currencies":[{"code":"TOP","name":"Tongan paʻanga","symbol":"T$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"to","iso639_2":"ton","name":"Tonga (Tonga Islands)","nativeName":"faka Tonga"}],"translations":{"de":"Tonga","es":"Tonga","fr":"Tonga","ja":"トンガ","it":"Tonga","br":"Tonga","pt":"Tonga","nl":"Tonga","hr":"Tonga","fa":"تونگا"},"flag":"https://restcountries.eu/data/ton.svg","regionalBlocs":[],"cioc":"TGA"}
+{"name":"Trinidad and Tobago","topLevelDomain":[".tt"],"alpha2Code":"TT","alpha3Code":"TTO","callingCodes":["1868"],"capital":"Port of Spain","altSpellings":["TT","Republic of Trinidad and Tobago"],"region":"Americas","subregion":"Caribbean","population":1349667,"latlng":[11.0,-61.0],"demonym":"Trinidadian","area":5130.0,"gini":40.3,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Trinidad and Tobago","numericCode":"780","currencies":[{"code":"TTD","name":"Trinidad and Tobago dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Trinidad und Tobago","es":"Trinidad y Tobago","fr":"Trinité et Tobago","ja":"トリニダード・トバゴ","it":"Trinidad e Tobago","br":"Trinidad e Tobago","pt":"Trindade e Tobago","nl":"Trinidad en Tobago","hr":"Trinidad i Tobago","fa":"ترینیداد و توباگو"},"flag":"https://restcountries.eu/data/tto.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"TTO"}
+{"name":"Tunisia","topLevelDomain":[".tn"],"alpha2Code":"TN","alpha3Code":"TUN","callingCodes":["216"],"capital":"Tunis","altSpellings":["TN","Republic of Tunisia","al-Jumhūriyyah at-Tūnisiyyah"],"region":"Africa","subregion":"Northern Africa","population":11154400,"latlng":[34.0,9.0],"demonym":"Tunisian","area":163610.0,"gini":41.4,"timezones":["UTC+01:00"],"borders":["DZA","LBY"],"nativeName":"تونس","numericCode":"788","currencies":[{"code":"TND","name":"Tunisian dinar","symbol":"د.ت"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Tunesien","es":"Túnez","fr":"Tunisie","ja":"チュニジア","it":"Tunisia","br":"Tunísia","pt":"Tunísia","nl":"Tunesië","hr":"Tunis","fa":"تونس"},"flag":"https://restcountries.eu/data/tun.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"TUN"}
+{"name":"Turkey","topLevelDomain":[".tr"],"alpha2Code":"TR","alpha3Code":"TUR","callingCodes":["90"],"capital":"Ankara","altSpellings":["TR","Turkiye","Republic of Turkey","Türkiye Cumhuriyeti"],"region":"Asia","subregion":"Western Asia","population":78741053,"latlng":[39.0,35.0],"demonym":"Turkish","area":783562.0,"gini":39.0,"timezones":["UTC+03:00"],"borders":["ARM","AZE","BGR","GEO","GRC","IRN","IRQ","SYR"],"nativeName":"Türkiye","numericCode":"792","currencies":[{"code":"TRY","name":"Turkish lira","symbol":null}],"languages":[{"iso639_1":"tr","iso639_2":"tur","name":"Turkish","nativeName":"Türkçe"}],"translations":{"de":"Türkei","es":"Turquía","fr":"Turquie","ja":"トルコ","it":"Turchia","br":"Turquia","pt":"Turquia","nl":"Turkije","hr":"Turska","fa":"ترکیه"},"flag":"https://restcountries.eu/data/tur.svg","regionalBlocs":[],"cioc":"TUR"}
+{"name":"Turkmenistan","topLevelDomain":[".tm"],"alpha2Code":"TM","alpha3Code":"TKM","callingCodes":["993"],"capital":"Ashgabat","altSpellings":["TM"],"region":"Asia","subregion":"Central Asia","population":4751120,"latlng":[40.0,60.0],"demonym":"Turkmen","area":488100.0,"gini":40.8,"timezones":["UTC+05:00"],"borders":["AFG","IRN","KAZ","UZB"],"nativeName":"Türkmenistan","numericCode":"795","currencies":[{"code":"TMT","name":"Turkmenistan manat","symbol":"m"}],"languages":[{"iso639_1":"tk","iso639_2":"tuk","name":"Turkmen","nativeName":"Türkmen"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Turkmenistan","es":"Turkmenistán","fr":"Turkménistan","ja":"トルクメニスタン","it":"Turkmenistan","br":"Turcomenistão","pt":"Turquemenistão","nl":"Turkmenistan","hr":"Turkmenistan","fa":"ترکمنستان"},"flag":"https://restcountries.eu/data/tkm.svg","regionalBlocs":[],"cioc":"TKM"}
+{"name":"Turks and Caicos Islands","topLevelDomain":[".tc"],"alpha2Code":"TC","alpha3Code":"TCA","callingCodes":["1649"],"capital":"Cockburn Town","altSpellings":["TC"],"region":"Americas","subregion":"Caribbean","population":31458,"latlng":[21.75,-71.58333333],"demonym":"Turks and Caicos Islander","area":948.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Turks and Caicos Islands","numericCode":"796","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Turks- und Caicosinseln","es":"Islas Turks y Caicos","fr":"Îles Turques-et-Caïques","ja":"タークス・カイコス諸島","it":"Isole Turks e Caicos","br":"Ilhas Turcas e Caicos","pt":"Ilhas Turcas e Caicos","nl":"Turks- en Caicoseilanden","hr":"Otoci Turks i Caicos","fa":"جزایر تورکس و کایکوس"},"flag":"https://restcountries.eu/data/tca.svg","regionalBlocs":[],"cioc":""}
+{"name":"Tuvalu","topLevelDomain":[".tv"],"alpha2Code":"TV","alpha3Code":"TUV","callingCodes":["688"],"capital":"Funafuti","altSpellings":["TV"],"region":"Oceania","subregion":"Polynesia","population":10640,"latlng":[-8.0,178.0],"demonym":"Tuvaluan","area":26.0,"gini":null,"timezones":["UTC+12:00"],"borders":[],"nativeName":"Tuvalu","numericCode":"798","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"},{"code":"TVD[G]","name":"Tuvaluan dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Tuvalu","es":"Tuvalu","fr":"Tuvalu","ja":"ツバル","it":"Tuvalu","br":"Tuvalu","pt":"Tuvalu","nl":"Tuvalu","hr":"Tuvalu","fa":"تووالو"},"flag":"https://restcountries.eu/data/tuv.svg","regionalBlocs":[],"cioc":"TUV"}
+{"name":"Uganda","topLevelDomain":[".ug"],"alpha2Code":"UG","alpha3Code":"UGA","callingCodes":["256"],"capital":"Kampala","altSpellings":["UG","Republic of Uganda","Jamhuri ya Uganda"],"region":"Africa","subregion":"Eastern Africa","population":33860700,"latlng":[1.0,32.0],"demonym":"Ugandan","area":241550.0,"gini":44.3,"timezones":["UTC+03:00"],"borders":["COD","KEN","RWA","SSD","TZA"],"nativeName":"Uganda","numericCode":"800","currencies":[{"code":"UGX","name":"Ugandan shilling","symbol":"Sh"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"sw","iso639_2":"swa","name":"Swahili","nativeName":"Kiswahili"}],"translations":{"de":"Uganda","es":"Uganda","fr":"Uganda","ja":"ウガンダ","it":"Uganda","br":"Uganda","pt":"Uganda","nl":"Oeganda","hr":"Uganda","fa":"اوگاندا"},"flag":"https://restcountries.eu/data/uga.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"UGA"}
+{"name":"Ukraine","topLevelDomain":[".ua"],"alpha2Code":"UA","alpha3Code":"UKR","callingCodes":["380"],"capital":"Kiev","altSpellings":["UA","Ukrayina"],"region":"Europe","subregion":"Eastern Europe","population":42692393,"latlng":[49.0,32.0],"demonym":"Ukrainian","area":603700.0,"gini":26.4,"timezones":["UTC+02:00"],"borders":["BLR","HUN","MDA","POL","ROU","RUS","SVK"],"nativeName":"Україна","numericCode":"804","currencies":[{"code":"UAH","name":"Ukrainian hryvnia","symbol":"₴"}],"languages":[{"iso639_1":"uk","iso639_2":"ukr","name":"Ukrainian","nativeName":"Українська"}],"translations":{"de":"Ukraine","es":"Ucrania","fr":"Ukraine","ja":"ウクライナ","it":"Ucraina","br":"Ucrânia","pt":"Ucrânia","nl":"Oekraïne","hr":"Ukrajina","fa":"وکراین"},"flag":"https://restcountries.eu/data/ukr.svg","regionalBlocs":[],"cioc":"UKR"}
+{"name":"United Arab Emirates","topLevelDomain":[".ae"],"alpha2Code":"AE","alpha3Code":"ARE","callingCodes":["971"],"capital":"Abu Dhabi","altSpellings":["AE","UAE"],"region":"Asia","subregion":"Western Asia","population":9856000,"latlng":[24.0,54.0],"demonym":"Emirati","area":83600.0,"gini":null,"timezones":["UTC+04"],"borders":["OMN","SAU"],"nativeName":"دولة الإمارات العربية المتحدة","numericCode":"784","currencies":[{"code":"AED","name":"United Arab Emirates dirham","symbol":"د.إ"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Vereinigte Arabische Emirate","es":"Emiratos Árabes Unidos","fr":"Émirats arabes unis","ja":"アラブ首長国連邦","it":"Emirati Arabi Uniti","br":"Emirados árabes Unidos","pt":"Emirados árabes Unidos","nl":"Verenigde Arabische Emiraten","hr":"Ujedinjeni Arapski Emirati","fa":"امارات متحده عربی"},"flag":"https://restcountries.eu/data/are.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"UAE"}
+{"name":"United Kingdom of Great Britain and Northern Ireland","topLevelDomain":[".uk"],"alpha2Code":"GB","alpha3Code":"GBR","callingCodes":["44"],"capital":"London","altSpellings":["GB","UK","Great Britain"],"region":"Europe","subregion":"Northern Europe","population":65110000,"latlng":[54.0,-2.0],"demonym":"British","area":242900.0,"gini":34.0,"timezones":["UTC-08:00","UTC-05:00","UTC-04:00","UTC-03:00","UTC-02:00","UTC","UTC+01:00","UTC+02:00","UTC+06:00"],"borders":["IRL"],"nativeName":"United Kingdom","numericCode":"826","currencies":[{"code":"GBP","name":"British pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Vereinigtes Königreich","es":"Reino Unido","fr":"Royaume-Uni","ja":"イギリス","it":"Regno Unito","br":"Reino Unido","pt":"Reino Unido","nl":"Verenigd Koninkrijk","hr":"Ujedinjeno Kraljevstvo","fa":"بریتانیای کبیر و ایرلند شمالی"},"flag":"https://restcountries.eu/data/gbr.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"GBR"}
+{"name":"United States of America","topLevelDomain":[".us"],"alpha2Code":"US","alpha3Code":"USA","callingCodes":["1"],"capital":"Washington, D.C.","altSpellings":["US","USA","United States of America"],"region":"Americas","subregion":"Northern America","population":323947000,"latlng":[38.0,-97.0],"demonym":"American","area":9629091.0,"gini":48.0,"timezones":["UTC-12:00","UTC-11:00","UTC-10:00","UTC-09:00","UTC-08:00","UTC-07:00","UTC-06:00","UTC-05:00","UTC-04:00","UTC+10:00","UTC+12:00"],"borders":["CAN","MEX"],"nativeName":"United States","numericCode":"840","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Vereinigte Staaten von Amerika","es":"Estados Unidos","fr":"États-Unis","ja":"アメリカ合衆国","it":"Stati Uniti D'America","br":"Estados Unidos","pt":"Estados Unidos","nl":"Verenigde Staten","hr":"Sjedinjene Američke Države","fa":"ایالات متحده آمریکا"},"flag":"https://restcountries.eu/data/usa.svg","regionalBlocs":[{"acronym":"NAFTA","name":"North American Free Trade Agreement","otherAcronyms":[],"otherNames":["Tratado de Libre Comercio de América del Norte","Accord de Libre-échange Nord-Américain"]}],"cioc":"USA"}
+{"name":"Uruguay","topLevelDomain":[".uy"],"alpha2Code":"UY","alpha3Code":"URY","callingCodes":["598"],"capital":"Montevideo","altSpellings":["UY","Oriental Republic of Uruguay","República Oriental del Uruguay"],"region":"Americas","subregion":"South America","population":3480222,"latlng":[-33.0,-56.0],"demonym":"Uruguayan","area":181034.0,"gini":39.7,"timezones":["UTC-03:00"],"borders":["ARG","BRA"],"nativeName":"Uruguay","numericCode":"858","currencies":[{"code":"UYU","name":"Uruguayan peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Uruguay","es":"Uruguay","fr":"Uruguay","ja":"ウルグアイ","it":"Uruguay","br":"Uruguai","pt":"Uruguai","nl":"Uruguay","hr":"Urugvaj","fa":"اروگوئه"},"flag":"https://restcountries.eu/data/ury.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"URU"}
+{"name":"Uzbekistan","topLevelDomain":[".uz"],"alpha2Code":"UZ","alpha3Code":"UZB","callingCodes":["998"],"capital":"Tashkent","altSpellings":["UZ","Republic of Uzbekistan","O‘zbekiston Respublikasi","Ўзбекистон Республикаси"],"region":"Asia","subregion":"Central Asia","population":31576400,"latlng":[41.0,64.0],"demonym":"Uzbekistani","area":447400.0,"gini":36.7,"timezones":["UTC+05:00"],"borders":["AFG","KAZ","KGZ","TJK","TKM"],"nativeName":"O‘zbekiston","numericCode":"860","currencies":[{"code":"UZS","name":"Uzbekistani so'm","symbol":null}],"languages":[{"iso639_1":"uz","iso639_2":"uzb","name":"Uzbek","nativeName":"Oʻzbek"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Usbekistan","es":"Uzbekistán","fr":"Ouzbékistan","ja":"ウズベキスタン","it":"Uzbekistan","br":"Uzbequistão","pt":"Usbequistão","nl":"Oezbekistan","hr":"Uzbekistan","fa":"ازبکستان"},"flag":"https://restcountries.eu/data/uzb.svg","regionalBlocs":[],"cioc":"UZB"}
+{"name":"Vanuatu","topLevelDomain":[".vu"],"alpha2Code":"VU","alpha3Code":"VUT","callingCodes":["678"],"capital":"Port Vila","altSpellings":["VU","Republic of Vanuatu","Ripablik blong Vanuatu","République de Vanuatu"],"region":"Oceania","subregion":"Melanesia","population":277500,"latlng":[-16.0,167.0],"demonym":"Ni-Vanuatu","area":12189.0,"gini":null,"timezones":["UTC+11:00"],"borders":[],"nativeName":"Vanuatu","numericCode":"548","currencies":[{"code":"VUV","name":"Vanuatu vatu","symbol":"Vt"}],"languages":[{"iso639_1":"bi","iso639_2":"bis","name":"Bislama","nativeName":"Bislama"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Vanuatu","es":"Vanuatu","fr":"Vanuatu","ja":"バヌアツ","it":"Vanuatu","br":"Vanuatu","pt":"Vanuatu","nl":"Vanuatu","hr":"Vanuatu","fa":"وانواتو"},"flag":"https://restcountries.eu/data/vut.svg","regionalBlocs":[],"cioc":"VAN"}
+{"name":"Venezuela (Bolivarian Republic of)","topLevelDomain":[".ve"],"alpha2Code":"VE","alpha3Code":"VEN","callingCodes":["58"],"capital":"Caracas","altSpellings":["VE","Bolivarian Republic of Venezuela","República Bolivariana de Venezuela"],"region":"Americas","subregion":"South America","population":31028700,"latlng":[8.0,-66.0],"demonym":"Venezuelan","area":916445.0,"gini":44.8,"timezones":["UTC-04:00"],"borders":["BRA","COL","GUY"],"nativeName":"Venezuela","numericCode":"862","currencies":[{"code":"VEF","name":"Venezuelan bolívar","symbol":"Bs F"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Venezuela","es":"Venezuela","fr":"Venezuela","ja":"ベネズエラ・ボリバル共和国","it":"Venezuela","br":"Venezuela","pt":"Venezuela","nl":"Venezuela","hr":"Venezuela","fa":"ونزوئلا"},"flag":"https://restcountries.eu/data/ven.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"VEN"}
+{"name":"Viet Nam","topLevelDomain":[".vn"],"alpha2Code":"VN","alpha3Code":"VNM","callingCodes":["84"],"capital":"Hanoi","altSpellings":["VN","Socialist Republic of Vietnam","Cộng hòa Xã hội chủ nghĩa Việt Nam"],"region":"Asia","subregion":"South-Eastern Asia","population":92700000,"latlng":[16.16666666,107.83333333],"demonym":"Vietnamese","area":331212.0,"gini":35.6,"timezones":["UTC+07:00"],"borders":["KHM","CHN","LAO"],"nativeName":"Việt Nam","numericCode":"704","currencies":[{"code":"VND","name":"Vietnamese đồng","symbol":"₫"}],"languages":[{"iso639_1":"vi","iso639_2":"vie","name":"Vietnamese","nativeName":"Tiếng Việt"}],"translations":{"de":"Vietnam","es":"Vietnam","fr":"Viêt Nam","ja":"ベトナム","it":"Vietnam","br":"Vietnã","pt":"Vietname","nl":"Vietnam","hr":"Vijetnam","fa":"ویتنام"},"flag":"https://restcountries.eu/data/vnm.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"VIE"}
+{"name":"Wallis and Futuna","topLevelDomain":[".wf"],"alpha2Code":"WF","alpha3Code":"WLF","callingCodes":["681"],"capital":"Mata-Utu","altSpellings":["WF","Territory of the Wallis and Futuna Islands","Territoire des îles Wallis et Futuna"],"region":"Oceania","subregion":"Polynesia","population":11750,"latlng":[-13.3,-176.2],"demonym":"Wallis and Futuna Islander","area":142.0,"gini":null,"timezones":["UTC+12:00"],"borders":[],"nativeName":"Wallis et Futuna","numericCode":"876","currencies":[{"code":"XPF","name":"CFP franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Wallis und Futuna","es":"Wallis y Futuna","fr":"Wallis-et-Futuna","ja":"ウォリス・フツナ","it":"Wallis e Futuna","br":"Wallis e Futuna","pt":"Wallis e Futuna","nl":"Wallis en Futuna","hr":"Wallis i Fortuna","fa":"والیس و فوتونا"},"flag":"https://restcountries.eu/data/wlf.svg","regionalBlocs":[],"cioc":""}
+{"name":"Western Sahara","topLevelDomain":[".eh"],"alpha2Code":"EH","alpha3Code":"ESH","callingCodes":["212"],"capital":"El Aaiún","altSpellings":["EH","Taneẓroft Tutrimt"],"region":"Africa","subregion":"Northern Africa","population":510713,"latlng":[24.5,-13.0],"demonym":"Sahrawi","area":266000.0,"gini":null,"timezones":["UTC+00:00"],"borders":["DZA","MRT","MAR"],"nativeName":"الصحراء الغربية","numericCode":"732","currencies":[{"code":"MAD","name":"Moroccan dirham","symbol":"د.م."},{"code":"DZD","name":"Algerian dinar","symbol":"د.ج"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Westsahara","es":"Sahara Occidental","fr":"Sahara Occidental","ja":"西サハラ","it":"Sahara Occidentale","br":"Saara Ocidental","pt":"Saara Ocidental","nl":"Westelijke Sahara","hr":"Zapadna Sahara","fa":"جمهوری دموکراتیک عربی صحرا"},"flag":"https://restcountries.eu/data/esh.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":""}
+{"name":"Yemen","topLevelDomain":[".ye"],"alpha2Code":"YE","alpha3Code":"YEM","callingCodes":["967"],"capital":"Sana'a","altSpellings":["YE","Yemeni Republic","al-Jumhūriyyah al-Yamaniyyah"],"region":"Asia","subregion":"Western Asia","population":27478000,"latlng":[15.0,48.0],"demonym":"Yemeni","area":527968.0,"gini":37.7,"timezones":["UTC+03:00"],"borders":["OMN","SAU"],"nativeName":"اليَمَن","numericCode":"887","currencies":[{"code":"YER","name":"Yemeni rial","symbol":"﷼"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Jemen","es":"Yemen","fr":"Yémen","ja":"イエメン","it":"Yemen","br":"Iêmen","pt":"Iémen","nl":"Jemen","hr":"Jemen","fa":"یمن"},"flag":"https://restcountries.eu/data/yem.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"YEM"}
+{"name":"Zambia","topLevelDomain":[".zm"],"alpha2Code":"ZM","alpha3Code":"ZMB","callingCodes":["260"],"capital":"Lusaka","altSpellings":["ZM","Republic of Zambia"],"region":"Africa","subregion":"Eastern Africa","population":15933883,"latlng":[-15.0,30.0],"demonym":"Zambian","area":752612.0,"gini":54.6,"timezones":["UTC+02:00"],"borders":["AGO","BWA","COD","MWI","MOZ","NAM","TZA","ZWE"],"nativeName":"Zambia","numericCode":"894","currencies":[{"code":"ZMW","name":"Zambian kwacha","symbol":"ZK"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Sambia","es":"Zambia","fr":"Zambie","ja":"ザンビア","it":"Zambia","br":"Zâmbia","pt":"Zâmbia","nl":"Zambia","hr":"Zambija","fa":"زامبیا"},"flag":"https://restcountries.eu/data/zmb.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"ZAM"}
+{"name":"Zimbabwe","topLevelDomain":[".zw"],"alpha2Code":"ZW","alpha3Code":"ZWE","callingCodes":["263"],"capital":"Harare","altSpellings":["ZW","Republic of Zimbabwe"],"region":"Africa","subregion":"Eastern Africa","population":14240168,"latlng":[-20.0,30.0],"demonym":"Zimbabwean","area":390757.0,"gini":null,"timezones":["UTC+02:00"],"borders":["BWA","MOZ","ZAF","ZMB"],"nativeName":"Zimbabwe","numericCode":"716","currencies":[{"code":"BWP","name":"Botswana pula","symbol":"P"},{"code":"GBP","name":"British pound","symbol":"£"},{"code":"CNY","name":"Chinese yuan","symbol":"¥"},{"code":"EUR","name":"Euro","symbol":"€"},{"code":"INR","name":"Indian rupee","symbol":"₹"},{"code":"JPY","name":"Japanese yen","symbol":"¥"},{"code":"ZAR","name":"South African rand","symbol":"Rs"},{"code":"USD","name":"United States dollar","symbol":"$"},{"code":"(none)","name":null,"symbol":null}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"sn","iso639_2":"sna","name":"Shona","nativeName":"chiShona"},{"iso639_1":"nd","iso639_2":"nde","name":"Northern Ndebele","nativeName":"isiNdebele"}],"translations":{"de":"Simbabwe","es":"Zimbabue","fr":"Zimbabwe","ja":"ジンバブエ","it":"Zimbabwe","br":"Zimbabwe","pt":"Zimbabué","nl":"Zimbabwe","hr":"Zimbabve","fa":"زیمباوه"},"flag":"https://restcountries.eu/data/zwe.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"ZIM"}
\ No newline at end of file
diff --git a/persistence-modules/jnosql/jnosql-diana/pom.xml b/persistence-modules/jnosql/jnosql-diana/pom.xml
index 22e066d36d..79c455646c 100644
--- a/persistence-modules/jnosql/jnosql-diana/pom.xml
+++ b/persistence-modules/jnosql/jnosql-diana/pom.xml
@@ -55,7 +55,7 @@
org.codehaus.mojo
exec-maven-plugin
- 1.6.0
+ ${exec-maven-plugin.version}
document
diff --git a/persistence-modules/jnosql/pom.xml b/persistence-modules/jnosql/pom.xml
index b96722de18..fb7ac72b05 100644
--- a/persistence-modules/jnosql/pom.xml
+++ b/persistence-modules/jnosql/pom.xml
@@ -11,9 +11,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
@@ -22,8 +21,6 @@
- 1.8
- 1.8
0.0.5
diff --git a/persistence-modules/jpa-hibernate-cascade-type/pom.xml b/persistence-modules/jpa-hibernate-cascade-type/pom.xml
index a545723746..1fc119592c 100644
--- a/persistence-modules/jpa-hibernate-cascade-type/pom.xml
+++ b/persistence-modules/jpa-hibernate-cascade-type/pom.xml
@@ -4,13 +4,10 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
jpa-hibernate-cascade-type
- 1.0.0-SNAPSHOT
-
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
@@ -48,24 +45,12 @@
-
- jpa-hibernate-cascade-type
-
-
- src/test/resources
- true
-
-
-
-
5.4.3.Final
3.12.2
6.0.17.Final
3.0.0
3.0.1-b11
- 1.8
- 1.8
\ No newline at end of file
diff --git a/persistence-modules/liquibase/pom.xml b/persistence-modules/liquibase/pom.xml
index 39e86b5186..af1af2259e 100644
--- a/persistence-modules/liquibase/pom.xml
+++ b/persistence-modules/liquibase/pom.xml
@@ -7,9 +7,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/orientdb/pom.xml b/persistence-modules/orientdb/pom.xml
index 7b0bef7fc5..5b28fb01b0 100644
--- a/persistence-modules/orientdb/pom.xml
+++ b/persistence-modules/orientdb/pom.xml
@@ -10,9 +10,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/persistence-libraries/pom.xml b/persistence-modules/persistence-libraries/pom.xml
index 74ff262637..a72654f2aa 100644
--- a/persistence-modules/persistence-libraries/pom.xml
+++ b/persistence-modules/persistence-libraries/pom.xml
@@ -10,7 +10,6 @@
com.baeldung
persistence-modules
1.0.0-SNAPSHOT
- ..
@@ -25,30 +24,10 @@
${hsqldb.version}
test
-
- junit
- junit
- ${junit.version}
- test
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- 8
- 8
-
-
-
-
-
2.4.0
- 4.12
1.6.0
diff --git a/persistence-modules/pom.xml b/persistence-modules/pom.xml
index c0f7c07b70..15b62d5d77 100644
--- a/persistence-modules/pom.xml
+++ b/persistence-modules/pom.xml
@@ -10,7 +10,6 @@
com.baeldung
parent-modules
1.0.0-SNAPSHOT
- ..
@@ -42,7 +41,7 @@
redis
solr
- spring-boot-jdbi
+ spring-boot-persistence-2
spring-boot-mysql
spring-boot-persistence
spring-boot-persistence-h2
diff --git a/persistence-modules/querydsl/README.md b/persistence-modules/querydsl/README.md
index 77b9fd6baf..03e113795d 100644
--- a/persistence-modules/querydsl/README.md
+++ b/persistence-modules/querydsl/README.md
@@ -1,3 +1,3 @@
### Relevant Articles:
-- [Intro to Querydsl](http://www.baeldung.com/intro-to-querydsl)
-- [A Guide to Querydsl with JPA](http://www.baeldung.com/querydsl-with-jpa-tutorial)
+- [Intro to Querydsl](https://www.baeldung.com/intro-to-querydsl)
+- [A Guide to Querydsl with JPA](https://www.baeldung.com/querydsl-with-jpa-tutorial)
diff --git a/persistence-modules/querydsl/pom.xml b/persistence-modules/querydsl/pom.xml
index 690e65d737..9f6802ff77 100644
--- a/persistence-modules/querydsl/pom.xml
+++ b/persistence-modules/querydsl/pom.xml
@@ -6,13 +6,11 @@
0.1-SNAPSHOT
querydsl
jar
- http://maven.apache.org
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/querydsl/src/main/java/org/baeldung/dao/PersonDao.java b/persistence-modules/querydsl/src/main/java/com/baeldung/dao/PersonDao.java
similarity index 88%
rename from persistence-modules/querydsl/src/main/java/org/baeldung/dao/PersonDao.java
rename to persistence-modules/querydsl/src/main/java/com/baeldung/dao/PersonDao.java
index 7df4ebb22d..fb39821981 100644
--- a/persistence-modules/querydsl/src/main/java/org/baeldung/dao/PersonDao.java
+++ b/persistence-modules/querydsl/src/main/java/com/baeldung/dao/PersonDao.java
@@ -1,9 +1,9 @@
-package org.baeldung.dao;
+package com.baeldung.dao;
import java.util.List;
import java.util.Map;
-import org.baeldung.entity.Person;
+import com.baeldung.entity.Person;
public interface PersonDao {
diff --git a/persistence-modules/querydsl/src/main/java/org/baeldung/dao/PersonDaoImpl.java b/persistence-modules/querydsl/src/main/java/com/baeldung/dao/PersonDaoImpl.java
similarity index 95%
rename from persistence-modules/querydsl/src/main/java/org/baeldung/dao/PersonDaoImpl.java
rename to persistence-modules/querydsl/src/main/java/com/baeldung/dao/PersonDaoImpl.java
index 9acaf1dd18..20ebe0e3fe 100644
--- a/persistence-modules/querydsl/src/main/java/org/baeldung/dao/PersonDaoImpl.java
+++ b/persistence-modules/querydsl/src/main/java/com/baeldung/dao/PersonDaoImpl.java
@@ -1,17 +1,15 @@
-package org.baeldung.dao;
+package com.baeldung.dao;
-import java.util.List;
-import java.util.Map;
+import com.baeldung.entity.Person;
+import com.baeldung.entity.QPerson;
+import com.querydsl.core.group.GroupBy;
+import com.querydsl.jpa.impl.JPAQuery;
+import org.springframework.stereotype.Repository;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
-
-import org.baeldung.entity.Person;
-import org.baeldung.entity.QPerson;
-import org.springframework.stereotype.Repository;
-
-import com.querydsl.core.group.GroupBy;
-import com.querydsl.jpa.impl.JPAQuery;
+import java.util.List;
+import java.util.Map;
@Repository
public class PersonDaoImpl implements PersonDao {
diff --git a/persistence-modules/querydsl/src/main/java/org/baeldung/entity/Person.java b/persistence-modules/querydsl/src/main/java/com/baeldung/entity/Person.java
similarity index 97%
rename from persistence-modules/querydsl/src/main/java/org/baeldung/entity/Person.java
rename to persistence-modules/querydsl/src/main/java/com/baeldung/entity/Person.java
index 6f04210d90..310f21ab2a 100644
--- a/persistence-modules/querydsl/src/main/java/org/baeldung/entity/Person.java
+++ b/persistence-modules/querydsl/src/main/java/com/baeldung/entity/Person.java
@@ -1,4 +1,4 @@
-package org.baeldung.entity;
+package com.baeldung.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
diff --git a/persistence-modules/querydsl/src/main/java/org/baeldung/querydsl/intro/entities/BlogPost.java b/persistence-modules/querydsl/src/main/java/com/baeldung/querydsl/intro/entities/BlogPost.java
similarity index 95%
rename from persistence-modules/querydsl/src/main/java/org/baeldung/querydsl/intro/entities/BlogPost.java
rename to persistence-modules/querydsl/src/main/java/com/baeldung/querydsl/intro/entities/BlogPost.java
index 241bc50b03..6712ad08d5 100644
--- a/persistence-modules/querydsl/src/main/java/org/baeldung/querydsl/intro/entities/BlogPost.java
+++ b/persistence-modules/querydsl/src/main/java/com/baeldung/querydsl/intro/entities/BlogPost.java
@@ -1,7 +1,7 @@
/*
* (c) Центр ИТ, 2016. Все права защищены.
*/
-package org.baeldung.querydsl.intro.entities;
+package com.baeldung.querydsl.intro.entities;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
diff --git a/persistence-modules/querydsl/src/main/java/org/baeldung/querydsl/intro/entities/User.java b/persistence-modules/querydsl/src/main/java/com/baeldung/querydsl/intro/entities/User.java
similarity index 95%
rename from persistence-modules/querydsl/src/main/java/org/baeldung/querydsl/intro/entities/User.java
rename to persistence-modules/querydsl/src/main/java/com/baeldung/querydsl/intro/entities/User.java
index c0681e15d1..4111284d5a 100644
--- a/persistence-modules/querydsl/src/main/java/org/baeldung/querydsl/intro/entities/User.java
+++ b/persistence-modules/querydsl/src/main/java/com/baeldung/querydsl/intro/entities/User.java
@@ -1,7 +1,7 @@
/*
* (c) Центр ИТ, 2016. Все права защищены.
*/
-package org.baeldung.querydsl.intro.entities;
+package com.baeldung.querydsl.intro.entities;
import java.util.HashSet;
import java.util.Set;
diff --git a/persistence-modules/querydsl/src/main/resources/META-INF/persistence.xml b/persistence-modules/querydsl/src/main/resources/META-INF/persistence.xml
index 2964382d48..4b51cb444b 100644
--- a/persistence-modules/querydsl/src/main/resources/META-INF/persistence.xml
+++ b/persistence-modules/querydsl/src/main/resources/META-INF/persistence.xml
@@ -17,7 +17,7 @@
-
+
org.hibernate.jpa.HibernatePersistenceProvider
diff --git a/persistence-modules/querydsl/src/test/java/org/baeldung/dao/PersonDaoIntegrationTest.java b/persistence-modules/querydsl/src/test/java/com/baeldung/dao/PersonDaoIntegrationTest.java
similarity index 97%
rename from persistence-modules/querydsl/src/test/java/org/baeldung/dao/PersonDaoIntegrationTest.java
rename to persistence-modules/querydsl/src/test/java/com/baeldung/dao/PersonDaoIntegrationTest.java
index a666aea8da..cf4e9ab872 100644
--- a/persistence-modules/querydsl/src/test/java/org/baeldung/dao/PersonDaoIntegrationTest.java
+++ b/persistence-modules/querydsl/src/test/java/com/baeldung/dao/PersonDaoIntegrationTest.java
@@ -1,8 +1,8 @@
-package org.baeldung.dao;
+package com.baeldung.dao;
import java.util.Map;
-import org.baeldung.entity.Person;
+import com.baeldung.entity.Person;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/persistence-modules/querydsl/src/test/java/org/baeldung/querydsl/intro/QueryDSLIntegrationTest.java b/persistence-modules/querydsl/src/test/java/com/baeldung/querydsl/intro/QueryDSLIntegrationTest.java
similarity index 94%
rename from persistence-modules/querydsl/src/test/java/org/baeldung/querydsl/intro/QueryDSLIntegrationTest.java
rename to persistence-modules/querydsl/src/test/java/com/baeldung/querydsl/intro/QueryDSLIntegrationTest.java
index 15a32b8df5..7ae97c2880 100644
--- a/persistence-modules/querydsl/src/test/java/org/baeldung/querydsl/intro/QueryDSLIntegrationTest.java
+++ b/persistence-modules/querydsl/src/test/java/com/baeldung/querydsl/intro/QueryDSLIntegrationTest.java
@@ -1,17 +1,17 @@
/*
* (c) Центр ИТ, 2016. Все права защищены.
*/
-package org.baeldung.querydsl.intro;
+package com.baeldung.querydsl.intro;
+import com.baeldung.querydsl.intro.entities.BlogPost;
+import com.baeldung.querydsl.intro.entities.QBlogPost;
+import com.baeldung.querydsl.intro.entities.QUser;
+import com.baeldung.querydsl.intro.entities.User;
import com.querydsl.core.Tuple;
import com.querydsl.core.types.dsl.Expressions;
import com.querydsl.core.types.dsl.NumberPath;
import com.querydsl.jpa.JPAExpressions;
import com.querydsl.jpa.impl.JPAQueryFactory;
-import org.baeldung.querydsl.intro.entities.BlogPost;
-import org.baeldung.querydsl.intro.entities.QBlogPost;
-import org.baeldung.querydsl.intro.entities.QUser;
-import org.baeldung.querydsl.intro.entities.User;
import org.junit.*;
import javax.persistence.EntityManager;
@@ -31,7 +31,7 @@ public class QueryDSLIntegrationTest {
@BeforeClass
public static void populateDatabase() {
- emf = Persistence.createEntityManagerFactory("org.baeldung.querydsl.intro");
+ emf = Persistence.createEntityManagerFactory("com.baeldung.querydsl.intro");
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
diff --git a/persistence-modules/querydsl/src/test/resources/test-context.xml b/persistence-modules/querydsl/src/test/resources/test-context.xml
index 13d823a857..1503364320 100644
--- a/persistence-modules/querydsl/src/test/resources/test-context.xml
+++ b/persistence-modules/querydsl/src/test/resources/test-context.xml
@@ -13,7 +13,7 @@
>
-
+
diff --git a/persistence-modules/r2dbc/pom.xml b/persistence-modules/r2dbc/pom.xml
index 2c06931487..55197ad560 100644
--- a/persistence-modules/r2dbc/pom.xml
+++ b/persistence-modules/r2dbc/pom.xml
@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- org.baeldung.examples.r2dbc
+ com.baeldung.examples.r2dbc
r2dbc-example
0.0.1-SNAPSHOT
r2dbc-example
diff --git a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/Account.java b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/Account.java
similarity index 96%
rename from persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/Account.java
rename to persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/Account.java
index 65bf33168e..0310cd94b6 100644
--- a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/Account.java
+++ b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/Account.java
@@ -1,4 +1,4 @@
-package org.baeldung.examples.r2dbc;
+package com.baeldung.examples.r2dbc;
import java.math.BigDecimal;
diff --git a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/AccountResource.java b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/AccountResource.java
similarity index 87%
rename from persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/AccountResource.java
rename to persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/AccountResource.java
index 90816a7522..5b0d0cded3 100644
--- a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/AccountResource.java
+++ b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/AccountResource.java
@@ -1,12 +1,8 @@
/**
*
*/
-package org.baeldung.examples.r2dbc;
+package com.baeldung.examples.r2dbc;
-import java.math.BigDecimal;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
@@ -15,8 +11,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
-import io.r2dbc.spi.Connection;
-import io.r2dbc.spi.ConnectionFactory;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
diff --git a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/DatasourceConfig.java b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/DatasourceConfig.java
similarity index 94%
rename from persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/DatasourceConfig.java
rename to persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/DatasourceConfig.java
index 5b695f39f5..21cc0bc6d3 100644
--- a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/DatasourceConfig.java
+++ b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/DatasourceConfig.java
@@ -1,16 +1,14 @@
-package org.baeldung.examples.r2dbc;
+package com.baeldung.examples.r2dbc;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.util.StringUtils;
import io.netty.util.internal.StringUtil;
import io.r2dbc.spi.ConnectionFactories;
import io.r2dbc.spi.ConnectionFactory;
import io.r2dbc.spi.ConnectionFactoryOptions;
import io.r2dbc.spi.ConnectionFactoryOptions.Builder;
-import io.r2dbc.spi.Option;
import reactor.core.publisher.Flux;
import static io.r2dbc.spi.ConnectionFactoryOptions.*;
diff --git a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/R2DBCConfigurationProperties.java b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/R2DBCConfigurationProperties.java
similarity index 96%
rename from persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/R2DBCConfigurationProperties.java
rename to persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/R2DBCConfigurationProperties.java
index 02733ebed9..b40c7ec2cd 100644
--- a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/R2DBCConfigurationProperties.java
+++ b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/R2DBCConfigurationProperties.java
@@ -1,4 +1,4 @@
-package org.baeldung.examples.r2dbc;
+package com.baeldung.examples.r2dbc;
import javax.validation.constraints.NotEmpty;
diff --git a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/R2dbcExampleApplication.java b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/R2dbcExampleApplication.java
similarity index 92%
rename from persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/R2dbcExampleApplication.java
rename to persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/R2dbcExampleApplication.java
index 1147936e2d..11670a4154 100644
--- a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/R2dbcExampleApplication.java
+++ b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/R2dbcExampleApplication.java
@@ -1,4 +1,4 @@
-package org.baeldung.examples.r2dbc;
+package com.baeldung.examples.r2dbc;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/ReactiveAccountDao.java b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/ReactiveAccountDao.java
similarity index 95%
rename from persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/ReactiveAccountDao.java
rename to persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/ReactiveAccountDao.java
index f9717d4b9b..6a7974aeb1 100644
--- a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/ReactiveAccountDao.java
+++ b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/ReactiveAccountDao.java
@@ -1,9 +1,7 @@
-package org.baeldung.examples.r2dbc;
+package com.baeldung.examples.r2dbc;
import java.math.BigDecimal;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import io.r2dbc.spi.Connection;
diff --git a/persistence-modules/r2dbc/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/persistence-modules/r2dbc/src/main/resources/META-INF/additional-spring-configuration-metadata.json
index 55eb5659a7..79d401392c 100644
--- a/persistence-modules/r2dbc/src/main/resources/META-INF/additional-spring-configuration-metadata.json
+++ b/persistence-modules/r2dbc/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -1,5 +1,5 @@
{"properties": [{
"name": "r2dbc",
- "type": "org.baeldung.examples.r2dbc.R2DBCConfigurationProperties",
+ "type": "com.baeldung.examples.r2dbc.R2DBCConfigurationProperties",
"description": "R2DBC Connection properties"
}]}
\ No newline at end of file
diff --git a/persistence-modules/r2dbc/src/test/java/org/baeldung/examples/r2dbc/R2dbcExampleApplicationTests.java b/persistence-modules/r2dbc/src/test/java/com/baeldung/examples/r2dbc/R2dbcExampleApplicationTests.java
similarity index 92%
rename from persistence-modules/r2dbc/src/test/java/org/baeldung/examples/r2dbc/R2dbcExampleApplicationTests.java
rename to persistence-modules/r2dbc/src/test/java/com/baeldung/examples/r2dbc/R2dbcExampleApplicationTests.java
index a1d433847b..3fb9e24a8e 100644
--- a/persistence-modules/r2dbc/src/test/java/org/baeldung/examples/r2dbc/R2dbcExampleApplicationTests.java
+++ b/persistence-modules/r2dbc/src/test/java/com/baeldung/examples/r2dbc/R2dbcExampleApplicationTests.java
@@ -1,19 +1,15 @@
-package org.baeldung.examples.r2dbc;
+package com.baeldung.examples.r2dbc;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import java.util.List;
-import org.hamcrest.core.IsNull;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.reactive.server.WebTestClient;
diff --git a/persistence-modules/redis/README.md b/persistence-modules/redis/README.md
index 21cd048693..668b8d33f8 100644
--- a/persistence-modules/redis/README.md
+++ b/persistence-modules/redis/README.md
@@ -2,3 +2,4 @@
- [Intro to Jedis – the Java Redis Client Library](http://www.baeldung.com/jedis-java-redis-client-library)
- [A Guide to Redis with Redisson](http://www.baeldung.com/redis-redisson)
- [Introduction to Lettuce – the Java Redis Client](https://www.baeldung.com/java-redis-lettuce)
+- [List All Available Redis Keys](https://www.baeldung.com/redis-list-available-keys)
diff --git a/persistence-modules/redis/pom.xml b/persistence-modules/redis/pom.xml
index c4a928bb4a..fffcfbb96b 100644
--- a/persistence-modules/redis/pom.xml
+++ b/persistence-modules/redis/pom.xml
@@ -9,9 +9,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
@@ -38,7 +37,7 @@
- 2.9.0
+ 3.2.0
0.6
3.3.0
5.0.1.RELEASE
diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/client/RedisClient.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/client/RedisClient.java
new file mode 100644
index 0000000000..72ff42ff74
--- /dev/null
+++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/client/RedisClient.java
@@ -0,0 +1,154 @@
+package com.baeldung.redis_scan.client;
+
+import com.baeldung.redis_scan.iterator.RedisIterator;
+import com.baeldung.redis_scan.strategy.ScanStrategy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.JedisPool;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.*;
+
+public class RedisClient {
+ private static Logger log = LoggerFactory.getLogger(RedisClient.class);
+
+ private static volatile RedisClient instance = null;
+
+ private static JedisPool jedisPool;
+
+ public static RedisClient getInstance(String ip, final int port) {
+ if (instance == null) {
+ synchronized (RedisClient.class) {
+ if (instance == null) {
+ instance = new RedisClient(ip, port);
+ }
+ }
+ }
+ return instance;
+ }
+
+ private RedisClient(String ip, int port) {
+ try {
+ if (jedisPool == null) {
+ jedisPool = new JedisPool(new URI("http://" + ip + ":" + port));
+ }
+ } catch (URISyntaxException e) {
+ log.error("Malformed server address", e);
+ }
+ }
+
+ public Long lpush(final String key, final String[] strings) {
+ try (Jedis jedis = jedisPool.getResource()) {
+ return jedis.lpush(key, strings);
+ } catch (Exception ex) {
+ log.error("Exception caught in lpush", ex);
+ }
+ return null;
+ }
+
+ public List lrange(final String key, final long start, final long stop) {
+ try (Jedis jedis = jedisPool.getResource()) {
+ return jedis.lrange(key, start, stop);
+ } catch (Exception ex) {
+ log.error("Exception caught in lrange", ex);
+ }
+ return new LinkedList();
+ }
+
+ public String hmset(final String key, final Map hash) {
+ try (Jedis jedis = jedisPool.getResource()) {
+ return jedis.hmset(key, hash);
+ } catch (Exception ex) {
+ log.error("Exception caught in hmset", ex);
+ }
+ return null;
+ }
+
+ public Map hgetAll(final String key) {
+ try (Jedis jedis = jedisPool.getResource()) {
+ return jedis.hgetAll(key);
+ } catch (Exception ex) {
+ log.error("Exception caught in hgetAll", ex);
+ }
+ return new HashMap();
+ }
+
+ public Long sadd(final String key, final String... members) {
+ try (Jedis jedis = jedisPool.getResource()) {
+ return jedis.sadd(key, members);
+ } catch (Exception ex) {
+ log.error("Exception caught in sadd", ex);
+ }
+ return null;
+ }
+
+ public Set smembers(final String key) {
+ try (Jedis jedis = jedisPool.getResource()) {
+ return jedis.smembers(key);
+ } catch (Exception ex) {
+ log.error("Exception caught in smembers", ex);
+ }
+ return new HashSet();
+ }
+
+ public Long zadd(final String key, final Map scoreMembers) {
+ try (Jedis jedis = jedisPool.getResource()) {
+ return jedis.zadd(key, scoreMembers);
+ } catch (Exception ex) {
+ log.error("Exception caught in zadd", ex);
+ }
+ return 0L;
+ }
+
+ public Set zrange(final String key, final long start, final long stop) {
+ try (Jedis jedis = jedisPool.getResource()) {
+ return jedis.zrange(key, start, stop);
+ } catch (Exception ex) {
+ log.error("Exception caught in zrange", ex);
+ }
+ return new HashSet();
+ }
+
+ public String mset(final HashMap keysValues) {
+ try (Jedis jedis = jedisPool.getResource()) {
+ ArrayList keysValuesArrayList = new ArrayList();
+ keysValues.forEach((key, value) -> {
+ keysValuesArrayList.add(key);
+ keysValuesArrayList.add(value);
+ });
+ return jedis.mset((keysValuesArrayList.toArray(new String[keysValues.size()])));
+ } catch (Exception ex) {
+ log.error("Exception caught in mset", ex);
+ }
+ return null;
+ }
+
+ public Set keys(final String pattern) {
+ try (Jedis jedis = jedisPool.getResource()) {
+ return jedis.keys(pattern);
+ } catch (Exception ex) {
+ log.error("Exception caught in keys", ex);
+ }
+ return new HashSet();
+ }
+
+ public RedisIterator iterator(int initialScanCount, String pattern, ScanStrategy strategy) {
+ return new RedisIterator(jedisPool, initialScanCount, pattern, strategy);
+ }
+
+ public void flushAll() {
+ try (Jedis jedis = jedisPool.getResource()) {
+ jedis.flushAll();
+ } catch (Exception ex) {
+ log.error("Exception caught in flushAll", ex);
+ }
+ }
+
+ public void destroyInstance() {
+ jedisPool = null;
+ instance = null;
+ }
+
+}
diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/iterator/RedisIterator.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/iterator/RedisIterator.java
new file mode 100644
index 0000000000..5fbd798ac2
--- /dev/null
+++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/iterator/RedisIterator.java
@@ -0,0 +1,60 @@
+package com.baeldung.redis_scan.iterator;
+
+import com.baeldung.redis_scan.strategy.ScanStrategy;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.JedisPool;
+import redis.clients.jedis.ScanParams;
+import redis.clients.jedis.ScanResult;
+
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+public class RedisIterator implements Iterator> {
+
+ private static Logger log = LoggerFactory.getLogger(RedisIterator.class);
+ private static final int DEFAULT_SCAN_COUNT = 10;
+
+ private final JedisPool jedisPool;
+ private ScanParams scanParams;
+ private String cursor;
+ private ScanStrategy strategy;
+
+ public RedisIterator(JedisPool jedisPool, int initialScanCount, String pattern, ScanStrategy strategy) {
+ super();
+ this.jedisPool = jedisPool;
+ this.scanParams = new ScanParams().match(pattern).count(initialScanCount);
+ this.strategy = strategy;
+ }
+
+ public RedisIterator(JedisPool jedisPool, String pattern, ScanStrategy strategy) {
+ super();
+ this.jedisPool = jedisPool;
+ this.scanParams = new ScanParams().match(pattern).count(DEFAULT_SCAN_COUNT);
+ this.strategy = strategy;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return !"0".equals(cursor);
+ }
+
+ @Override
+ public List next() {
+ if (cursor == null) {
+ cursor = "0";
+ }
+ try (Jedis jedis = jedisPool.getResource()) {
+ ScanResult scanResult = strategy.scan(jedis, cursor, scanParams);
+ cursor = scanResult.getCursor();
+ return scanResult.getResult();
+
+ } catch (Exception ex) {
+ log.error("Exception caught in next()", ex);
+ }
+ return new LinkedList();
+ }
+
+}
diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/ScanStrategy.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/ScanStrategy.java
new file mode 100644
index 0000000000..39d9e44a63
--- /dev/null
+++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/ScanStrategy.java
@@ -0,0 +1,9 @@
+package com.baeldung.redis_scan.strategy;
+
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.ScanParams;
+import redis.clients.jedis.ScanResult;
+
+public interface ScanStrategy {
+ ScanResult scan(Jedis jedis, String cursor, ScanParams scanParams);
+}
diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Hscan.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Hscan.java
new file mode 100644
index 0000000000..fd5ecd14ec
--- /dev/null
+++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Hscan.java
@@ -0,0 +1,25 @@
+package com.baeldung.redis_scan.strategy.impl;
+
+import com.baeldung.redis_scan.strategy.ScanStrategy;
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.ScanParams;
+import redis.clients.jedis.ScanResult;
+
+import java.util.Map;
+import java.util.Map.Entry;
+
+public class Hscan implements ScanStrategy> {
+
+ private String key;
+
+ public Hscan(String key) {
+ super();
+ this.key = key;
+ }
+
+ @Override
+ public ScanResult> scan(Jedis jedis, String cursor, ScanParams scanParams) {
+ return jedis.hscan(key, cursor, scanParams);
+ }
+
+}
diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Scan.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Scan.java
new file mode 100644
index 0000000000..f28b56e34c
--- /dev/null
+++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Scan.java
@@ -0,0 +1,14 @@
+package com.baeldung.redis_scan.strategy.impl;
+
+import com.baeldung.redis_scan.strategy.ScanStrategy;
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.ScanParams;
+import redis.clients.jedis.ScanResult;
+
+public class Scan implements ScanStrategy {
+
+
+ public ScanResult scan(Jedis jedis, String cursor, ScanParams scanParams) {
+ return jedis.scan(cursor, scanParams);
+ }
+}
diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Sscan.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Sscan.java
new file mode 100644
index 0000000000..ed47f7087e
--- /dev/null
+++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Sscan.java
@@ -0,0 +1,29 @@
+package com.baeldung.redis_scan.strategy.impl;
+
+import com.baeldung.redis_scan.strategy.ScanStrategy;
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.ScanParams;
+import redis.clients.jedis.ScanResult;
+
+public class Sscan implements ScanStrategy {
+
+ private String key;
+
+
+ public Sscan(String key) {
+ super();
+ this.key = key;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public ScanResult scan(Jedis jedis, String cursor, ScanParams scanParams) {
+ return jedis.sscan(key, cursor, scanParams);
+ }
+}
diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Zscan.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Zscan.java
new file mode 100644
index 0000000000..bdffc15883
--- /dev/null
+++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Zscan.java
@@ -0,0 +1,25 @@
+package com.baeldung.redis_scan.strategy.impl;
+
+import com.baeldung.redis_scan.strategy.ScanStrategy;
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.ScanParams;
+import redis.clients.jedis.ScanResult;
+import redis.clients.jedis.Tuple;
+
+public class Zscan implements ScanStrategy {
+
+ private String key;
+
+
+ public Zscan(String key) {
+ super();
+ this.key = key;
+ }
+
+
+ @Override
+ public ScanResult scan(Jedis jedis, String cursor, ScanParams scanParams) {
+ return jedis.zscan(key, cursor, scanParams);
+ }
+
+}
diff --git a/persistence-modules/redis/src/test/java/com/baeldung/redis_scan/NaiveApproachIntegrationTest.java b/persistence-modules/redis/src/test/java/com/baeldung/redis_scan/NaiveApproachIntegrationTest.java
new file mode 100644
index 0000000000..9bf0b2b086
--- /dev/null
+++ b/persistence-modules/redis/src/test/java/com/baeldung/redis_scan/NaiveApproachIntegrationTest.java
@@ -0,0 +1,97 @@
+package com.baeldung.redis_scan;
+
+import com.baeldung.redis_scan.client.RedisClient;
+import org.junit.*;
+import redis.embedded.RedisServer;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+public class NaiveApproachIntegrationTest {
+ private static RedisServer redisServer;
+ private static int port;
+ private static RedisClient redisClient;
+
+ @BeforeClass
+ public static void setUp() throws IOException {
+
+ // Take an available port
+ ServerSocket s = new ServerSocket(0);
+ port = s.getLocalPort();
+ s.close();
+
+ redisServer = new RedisServer(port);
+ }
+
+ @AfterClass
+ public static void destroy() {
+ if (redisServer.isActive()) {
+ redisServer.stop();
+ redisClient.destroyInstance();
+ }
+ }
+
+ @Before
+ public void init() {
+ if (!redisServer.isActive()) {
+ redisServer.start();
+ }
+ redisClient = RedisClient.getInstance("127.0.0.1", port);
+ }
+
+ @After
+ public void flushAll() {
+ redisClient.flushAll();
+ }
+
+ @Test
+ public void testKeys() {
+ HashMap keyValues = new HashMap();
+ keyValues.put("balls:cricket", "160");
+ keyValues.put("balls:football", "450");
+ keyValues.put("balls:volleyball", "270");
+ redisClient.mset(keyValues);
+ Set readKeys = redisClient.keys("ball*");
+ Assert.assertEquals(keyValues.size(), readKeys.size());
+
+ }
+
+ @Test
+ public void testSmembers() {
+ HashSet setMembers = new HashSet();
+ setMembers.add("cricket_160");
+ setMembers.add("football_450");
+ setMembers.add("volleyball_270");
+ redisClient.sadd("balls", setMembers.toArray(new String[setMembers.size()]));
+ Set readSetMembers = redisClient.smembers("balls");
+ Assert.assertEquals(setMembers.size(), readSetMembers.size());
+ }
+
+ @Test
+ public void testHgetAll() {
+ HashMap keyValues = new HashMap();
+ keyValues.put("balls:cricket", "160");
+ keyValues.put("balls:football", "450");
+ keyValues.put("balls:volleyball", "270");
+ redisClient.hmset("balls", keyValues);
+ Map readHash = redisClient.hgetAll("balls");
+ Assert.assertEquals(keyValues.size(), readHash.size());
+ }
+
+ @Test
+ public void testZRange() {
+ HashMap scoreMembers = new HashMap();
+ scoreMembers.put("cricket", (double) 160);
+ scoreMembers.put("football", (double) 450);
+ scoreMembers.put("volleyball", (double) 270);
+ redisClient.zadd("balls", scoreMembers);
+ Set readSetMembers = redisClient.zrange("balls", 0, -1);
+
+ Assert.assertEquals(readSetMembers.size(), scoreMembers.size());
+ }
+
+}
diff --git a/persistence-modules/redis/src/test/java/com/baeldung/redis_scan/ScanStrategyIntegrationTest.java b/persistence-modules/redis/src/test/java/com/baeldung/redis_scan/ScanStrategyIntegrationTest.java
new file mode 100644
index 0000000000..9bde969b58
--- /dev/null
+++ b/persistence-modules/redis/src/test/java/com/baeldung/redis_scan/ScanStrategyIntegrationTest.java
@@ -0,0 +1,130 @@
+package com.baeldung.redis_scan;
+
+import com.baeldung.redis_scan.client.RedisClient;
+import com.baeldung.redis_scan.iterator.RedisIterator;
+import com.baeldung.redis_scan.strategy.ScanStrategy;
+import com.baeldung.redis_scan.strategy.impl.Hscan;
+import com.baeldung.redis_scan.strategy.impl.Scan;
+import com.baeldung.redis_scan.strategy.impl.Sscan;
+import com.baeldung.redis_scan.strategy.impl.Zscan;
+import org.junit.*;
+import redis.clients.jedis.Tuple;
+import redis.embedded.RedisServer;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.util.*;
+
+
+public class ScanStrategyIntegrationTest {
+
+ private static RedisServer redisServer;
+ private static int port;
+ private static RedisClient redisClient;
+
+ @BeforeClass
+ public static void setUp() throws IOException {
+
+ // Take an available port
+ ServerSocket s = new ServerSocket(0);
+ String ip = "127.0.0.1";
+ port = s.getLocalPort();
+ s.close();
+
+ redisServer = new RedisServer(port);
+ }
+
+ @AfterClass
+ public static void destroy() {
+ if (redisServer.isActive()) {
+ redisServer.stop();
+ redisClient.destroyInstance();
+ }
+ }
+
+ @Before
+ public void init() {
+ if (!redisServer.isActive()) {
+ redisServer.start();
+ }
+ redisClient = RedisClient.getInstance("127.0.0.1", port);
+ }
+
+ @After
+ public void flushAll() {
+ redisClient.flushAll();
+ }
+
+ @Test
+ public void testScanStrategy() {
+ HashMap keyValues = new HashMap();
+ keyValues.put("balls:cricket", "160");
+ keyValues.put("balls:football", "450");
+ keyValues.put("balls:volleyball", "270");
+ redisClient.mset(keyValues);
+
+ ScanStrategy scanStrategy = new Scan();
+ int iterationCount = 2;
+ RedisIterator iterator = redisClient.iterator(iterationCount, "ball*", scanStrategy);
+ List results = new LinkedList();
+ while (iterator.hasNext()) {
+ results.addAll(iterator.next());
+ }
+ Assert.assertEquals(keyValues.size(), results.size());
+ }
+
+ @Test
+ public void testSscanStrategy() {
+ HashSet setMembers = new HashSet();
+ setMembers.add("cricket_160");
+ setMembers.add("football_450");
+ setMembers.add("volleyball_270");
+ redisClient.sadd("balls", setMembers.toArray(new String[setMembers.size()]));
+
+ Sscan scanStrategy = new Sscan("balls");
+ int iterationCount = 2;
+ RedisIterator iterator = redisClient.iterator(iterationCount, "*", scanStrategy);
+ List results = new LinkedList();
+ while (iterator.hasNext()) {
+ results.addAll(iterator.next());
+ }
+ Assert.assertEquals(setMembers.size(), results.size());
+ }
+
+ @Test
+ public void testHscanStrategy() {
+ HashMap hash = new HashMap();
+ hash.put("cricket", "160");
+ hash.put("football", "450");
+ hash.put("volleyball", "270");
+ redisClient.hmset("balls", hash);
+
+ Hscan scanStrategy = new Hscan("balls");
+ int iterationCount = 2;
+ RedisIterator iterator = redisClient.iterator(iterationCount, "*", scanStrategy);
+ List> results = new LinkedList>();
+ while (iterator.hasNext()) {
+ results.addAll(iterator.next());
+ }
+ Assert.assertEquals(hash.size(), results.size());
+ }
+
+ @Test
+ public void testZscanStrategy() {
+ HashMap memberScores = new HashMap();
+ memberScores.put("cricket", (double) 160);
+ memberScores.put("football", (double) 450);
+ memberScores.put("volleyball", (double) 270);
+ redisClient.zadd("balls", memberScores);
+
+ Zscan scanStrategy = new Zscan("balls");
+ int iterationCount = 2;
+ RedisIterator iterator = redisClient.iterator(iterationCount, "*", scanStrategy);
+ List results = new LinkedList();
+ while (iterator.hasNext()) {
+ results.addAll(iterator.next());
+ }
+ Assert.assertEquals(memberScores.size(), results.size());
+ }
+
+}
diff --git a/persistence-modules/sirix/README.md b/persistence-modules/sirix/README.md
index ab7fb65e44..923b111e7a 100644
--- a/persistence-modules/sirix/README.md
+++ b/persistence-modules/sirix/README.md
@@ -1,4 +1,3 @@
## Relevant articles:
-- [Introduction to Sirix](https://www.baeldung.com/introduction-to-sirix)
- [A Guide to SirixDB](https://www.baeldung.com/sirix)
diff --git a/persistence-modules/sirix/pom.xml b/persistence-modules/sirix/pom.xml
index ccaec79775..d8e065ec2f 100644
--- a/persistence-modules/sirix/pom.xml
+++ b/persistence-modules/sirix/pom.xml
@@ -30,7 +30,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.8.0
+ ${compiler.plugin.version}
${maven.release.version}
${project.build.sourceEncoding}
@@ -39,7 +39,7 @@
org.ow2.asm
asm
- 6.1
+ ${asm.version}
@@ -50,6 +50,8 @@
UTF-8
11
0.9.3
+ 3.8.0
+ 6.1
diff --git a/persistence-modules/solr/pom.xml b/persistence-modules/solr/pom.xml
index 5902d42a82..fd993e0c67 100644
--- a/persistence-modules/solr/pom.xml
+++ b/persistence-modules/solr/pom.xml
@@ -9,9 +9,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/spring-boot-mysql/pom.xml b/persistence-modules/spring-boot-mysql/pom.xml
index e4456b2eaf..9f6ec73522 100644
--- a/persistence-modules/spring-boot-mysql/pom.xml
+++ b/persistence-modules/spring-boot-mysql/pom.xml
@@ -37,18 +37,7 @@
-
- spring-boot-mysql
-
-
- src/main/resources
- true
-
-
-
-
- UTF-8
8.0.12
diff --git a/persistence-modules/spring-boot-jdbi/HELP.md b/persistence-modules/spring-boot-persistence-2/HELP.md
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/HELP.md
rename to persistence-modules/spring-boot-persistence-2/HELP.md
diff --git a/persistence-modules/spring-boot-jdbi/README.md b/persistence-modules/spring-boot-persistence-2/README.md
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/README.md
rename to persistence-modules/spring-boot-persistence-2/README.md
diff --git a/persistence-modules/spring-boot-jdbi/pom.xml b/persistence-modules/spring-boot-persistence-2/pom.xml
similarity index 91%
rename from persistence-modules/spring-boot-jdbi/pom.xml
rename to persistence-modules/spring-boot-persistence-2/pom.xml
index db36185acd..048dd45c7f 100644
--- a/persistence-modules/spring-boot-jdbi/pom.xml
+++ b/persistence-modules/spring-boot-persistence-2/pom.xml
@@ -3,17 +3,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- com.baeldung.boot.jdbi
- spring-boot-jdbi
+ com.baeldung.boot.persistence
+ spring-boot-persistence-2
0.0.1-SNAPSHOT
spring-boot-jdbi
Sample SpringBoot JDBI Project
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../pom.xml
@@ -21,7 +20,7 @@
org.springframework.boot
spring-boot-dependencies
- 2.1.8.RELEASE
+ ${spring.boot.dependencies}
pom
import
@@ -95,8 +94,8 @@
- 1.8
3.9.1
+ 2.1.8.RELEASE
diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/JdbiConfiguration.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/JdbiConfiguration.java
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/JdbiConfiguration.java
rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/JdbiConfiguration.java
diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/SpringBootJdbiApplication.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/SpringBootJdbiApplication.java
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/SpringBootJdbiApplication.java
rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/SpringBootJdbiApplication.java
diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/dao/CarMakerDao.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/dao/CarMakerDao.java
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/dao/CarMakerDao.java
rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/dao/CarMakerDao.java
diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/dao/CarModelDao.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/dao/CarModelDao.java
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/dao/CarModelDao.java
rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/dao/CarModelDao.java
diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/domain/CarMaker.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/domain/CarMaker.java
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/domain/CarMaker.java
rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/domain/CarMaker.java
diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/domain/CarModel.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/domain/CarModel.java
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/domain/CarModel.java
rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/domain/CarModel.java
diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/mapper/CarMakerMapper.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/mapper/CarMakerMapper.java
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/mapper/CarMakerMapper.java
rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/mapper/CarMakerMapper.java
diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/mapper/CarModelMapper.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/mapper/CarModelMapper.java
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/mapper/CarModelMapper.java
rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/mapper/CarModelMapper.java
diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/service/CarMakerService.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/service/CarMakerService.java
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/service/CarMakerService.java
rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/service/CarMakerService.java
diff --git a/persistence-modules/spring-boot-jdbi/src/main/resources/application.yml b/persistence-modules/spring-boot-persistence-2/src/main/resources/application.yml
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/resources/application.yml
rename to persistence-modules/spring-boot-persistence-2/src/main/resources/application.yml
diff --git a/persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/findById.sql b/persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/findById.sql
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/findById.sql
rename to persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/findById.sql
diff --git a/persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/insert.sql b/persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/insert.sql
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/insert.sql
rename to persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/insert.sql
diff --git a/persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/findByMakerIdAndSku.sql b/persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/findByMakerIdAndSku.sql
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/findByMakerIdAndSku.sql
rename to persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/findByMakerIdAndSku.sql
diff --git a/persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/insert.sql b/persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/insert.sql
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/insert.sql
rename to persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/insert.sql
diff --git a/persistence-modules/spring-boot-jdbi/src/test/java/com/baeldung/boot/jdbi/SpringBootJdbiApplicationUnitTest.java b/persistence-modules/spring-boot-persistence-2/src/test/java/com/baeldung/boot/jdbi/SpringBootJdbiApplicationUnitTest.java
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/test/java/com/baeldung/boot/jdbi/SpringBootJdbiApplicationUnitTest.java
rename to persistence-modules/spring-boot-persistence-2/src/test/java/com/baeldung/boot/jdbi/SpringBootJdbiApplicationUnitTest.java
diff --git a/persistence-modules/spring-boot-jdbi/src/test/resources/data.sql b/persistence-modules/spring-boot-persistence-2/src/test/resources/data.sql
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/test/resources/data.sql
rename to persistence-modules/spring-boot-persistence-2/src/test/resources/data.sql
diff --git a/persistence-modules/spring-boot-jdbi/src/test/resources/schema.sql b/persistence-modules/spring-boot-persistence-2/src/test/resources/schema.sql
similarity index 100%
rename from persistence-modules/spring-boot-jdbi/src/test/resources/schema.sql
rename to persistence-modules/spring-boot-persistence-2/src/test/resources/schema.sql
diff --git a/persistence-modules/spring-boot-persistence-h2/pom.xml b/persistence-modules/spring-boot-persistence-h2/pom.xml
index 9a0a72ba23..5b5e255211 100644
--- a/persistence-modules/spring-boot-persistence-h2/pom.xml
+++ b/persistence-modules/spring-boot-persistence-h2/pom.xml
@@ -5,7 +5,6 @@
4.0.0
com.baeldung.h2db
spring-boot-persistence-h2
- 0.0.1-SNAPSHOT
spring-boot-persistence-h2
jar
Demo Spring Boot applications that starts H2 in memory database
@@ -32,19 +31,7 @@
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
- UTF-8
- UTF-8
- 1.8
com.baeldung.h2db.demo.server.SpringBootApp
2.0.4.RELEASE
diff --git a/persistence-modules/spring-boot-persistence-mongodb/pom.xml b/persistence-modules/spring-boot-persistence-mongodb/pom.xml
index da48f066f9..de52a4b2d6 100644
--- a/persistence-modules/spring-boot-persistence-mongodb/pom.xml
+++ b/persistence-modules/spring-boot-persistence-mongodb/pom.xml
@@ -34,80 +34,6 @@
de.flapdoodle.embed.mongo
test
-
-
- org.junit.jupiter
- junit-jupiter-api
- test
-
-
- org.junit.jupiter
- junit-jupiter-engine
- test
-
-
-
-
- org.junit.platform
- junit-platform-launcher
- ${junit-platform.version}
- test
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- spring-boot-persistence-mongodb
-
-
- src/main/resources
- true
-
-
-
-
- org.apache.maven.plugins
- maven-war-plugin
-
-
-
-
-
-
- autoconfiguration
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- integration-test
-
- test
-
-
-
- **/*LiveTest.java
- **/*IntegrationTest.java
- **/*IntTest.java
-
-
-
-
-
-
- json
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-boot-persistence/pom.xml b/persistence-modules/spring-boot-persistence/pom.xml
index 049e7225ac..c58e8dbf86 100644
--- a/persistence-modules/spring-boot-persistence/pom.xml
+++ b/persistence-modules/spring-boot-persistence/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-boot-persistence
0.1.0
@@ -17,17 +18,14 @@
org.springframework.boot
spring-boot-starter-web
- ${spring-boot.version}
org.springframework.boot
spring-boot-starter-thymeleaf
- ${spring-boot.version}
org.springframework.boot
spring-boot-starter-data-jpa
- ${spring-boot.version}
com.zaxxer
@@ -38,7 +36,6 @@
org.springframework.boot
spring-boot-starter-test
- ${spring-boot.version}
org.mockito
@@ -61,7 +58,6 @@
javax.validation
validation-api
- ${validation-api.version}
org.xerial
@@ -70,39 +66,17 @@
org.apache.derby
derby
- ${derby.version}
org.hsqldb
hsqldb
- ${hsqldb.version}
-
- spring-boot-persistence
-
-
- src/main/resources
- true
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
UTF-8
- 8.0.12
- 9.0.10
2.23.0
2.0.1.Final
- 10.13.1.1
- 2.3.4
2.1.7.RELEASE
diff --git a/persistence-modules/spring-data-cassandra-reactive/pom.xml b/persistence-modules/spring-data-cassandra-reactive/pom.xml
index a57ebbe703..70a5f556e2 100644
--- a/persistence-modules/spring-data-cassandra-reactive/pom.xml
+++ b/persistence-modules/spring-data-cassandra-reactive/pom.xml
@@ -1,10 +1,8 @@
-
+
4.0.0
spring-data-cassandra-reactive
- 0.0.1-SNAPSHOT
spring-data-cassandra-reactive
jar
Spring Data Cassandra reactive
@@ -20,7 +18,6 @@
org.springframework.data
spring-data-cassandra
- ${spring-data-cassandra.version}
io.projectreactor
@@ -54,10 +51,6 @@
- UTF-8
- UTF-8
-
- 2.1.2.RELEASE
3.11.2.0
diff --git a/persistence-modules/spring-data-cassandra/README.md b/persistence-modules/spring-data-cassandra/README.md
index 456eefcf18..9c6745470b 100644
--- a/persistence-modules/spring-data-cassandra/README.md
+++ b/persistence-modules/spring-data-cassandra/README.md
@@ -1,8 +1,8 @@
## Spring Data Cassandra
### Relevant Articles:
-- [Introduction to Spring Data Cassandra](http://www.baeldung.com/spring-data-cassandra-tutorial)
-- [Using the CassandraTemplate from Spring Data](http://www.baeldung.com/spring-data-cassandratemplate-cqltemplate)
+- [Introduction to Spring Data Cassandra](https://www.baeldung.com/spring-data-cassandra-tutorial)
+- [Using the CassandraTemplate from Spring Data](https://www.baeldung.com/spring-data-cassandratemplate-cqltemplate)
### Build the Project with Tests Running
```
diff --git a/persistence-modules/spring-data-cassandra/pom.xml b/persistence-modules/spring-data-cassandra/pom.xml
index 9ea39f3f55..0f0aae4ebf 100644
--- a/persistence-modules/spring-data-cassandra/pom.xml
+++ b/persistence-modules/spring-data-cassandra/pom.xml
@@ -3,7 +3,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-data-cassandra
- 0.0.1-SNAPSHOT
spring-data-cassandra
jar
@@ -80,7 +79,6 @@
2.1.9.2
2.1.9.2
2.0-0
- 19.0
diff --git a/persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/config/CassandraConfig.java b/persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/config/CassandraConfig.java
similarity index 94%
rename from persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/config/CassandraConfig.java
rename to persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/config/CassandraConfig.java
index 2edd5551a5..3614c2a9f6 100644
--- a/persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/config/CassandraConfig.java
+++ b/persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/config/CassandraConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.cassandra.config;
+package com.baeldung.spring.data.cassandra.config;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -15,7 +15,7 @@ import org.springframework.data.cassandra.repository.config.EnableCassandraRepos
@Configuration
@PropertySource(value = { "classpath:cassandra.properties" })
-@EnableCassandraRepositories(basePackages = "org.baeldung.spring.data.cassandra.repository")
+@EnableCassandraRepositories(basePackages = "com.baeldung.spring.data.cassandra.repository")
public class CassandraConfig extends AbstractCassandraConfiguration {
private static final Log LOGGER = LogFactory.getLog(CassandraConfig.class);
diff --git a/persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/model/Book.java b/persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/model/Book.java
similarity index 97%
rename from persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/model/Book.java
rename to persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/model/Book.java
index a8ec81d6b5..d347a36184 100644
--- a/persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/model/Book.java
+++ b/persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/model/Book.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.cassandra.model;
+package com.baeldung.spring.data.cassandra.model;
import java.util.HashSet;
import java.util.Set;
diff --git a/persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/repository/BookRepository.java b/persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/repository/BookRepository.java
similarity index 79%
rename from persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/repository/BookRepository.java
rename to persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/repository/BookRepository.java
index 66d656ac3a..ad144f3125 100644
--- a/persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/repository/BookRepository.java
+++ b/persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/repository/BookRepository.java
@@ -1,6 +1,6 @@
-package org.baeldung.spring.data.cassandra.repository;
+package com.baeldung.spring.data.cassandra.repository;
-import org.baeldung.spring.data.cassandra.model.Book;
+import com.baeldung.spring.data.cassandra.model.Book;
import org.springframework.data.cassandra.repository.CassandraRepository;
import org.springframework.data.cassandra.repository.Query;
import org.springframework.stereotype.Repository;
diff --git a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/SpringContextTest.java b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/SpringContextTest.java
similarity index 94%
rename from persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/SpringContextTest.java
rename to persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/SpringContextTest.java
index 89e729da86..22bd5c6551 100644
--- a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/SpringContextTest.java
+++ b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/SpringContextTest.java
@@ -1,12 +1,12 @@
-package org.baeldung;
+package com.baeldung;
import java.io.IOException;
import java.util.HashMap;
import org.apache.cassandra.exceptions.ConfigurationException;
import org.apache.thrift.transport.TTransportException;
-import org.baeldung.spring.data.cassandra.config.CassandraConfig;
-import org.baeldung.spring.data.cassandra.model.Book;
+import com.baeldung.spring.data.cassandra.config.CassandraConfig;
+import com.baeldung.spring.data.cassandra.model.Book;
import org.cassandraunit.utils.EmbeddedCassandraServerHelper;
import org.junit.After;
import org.junit.AfterClass;
diff --git a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/BookRepositoryIntegrationTest.java b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/BookRepositoryIntegrationTest.java
similarity index 96%
rename from persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/BookRepositoryIntegrationTest.java
rename to persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/BookRepositoryIntegrationTest.java
index 8cbcdc3195..55e968d6f2 100644
--- a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/BookRepositoryIntegrationTest.java
+++ b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/BookRepositoryIntegrationTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.cassandra.repository;
+package com.baeldung.spring.data.cassandra.repository;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
@@ -6,12 +6,12 @@ import static org.junit.Assert.assertNotEquals;
import java.io.IOException;
import java.util.HashMap;
+import com.baeldung.spring.data.cassandra.model.Book;
import org.apache.cassandra.exceptions.ConfigurationException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.thrift.transport.TTransportException;
-import org.baeldung.spring.data.cassandra.config.CassandraConfig;
-import org.baeldung.spring.data.cassandra.model.Book;
+import com.baeldung.spring.data.cassandra.config.CassandraConfig;
import org.cassandraunit.utils.EmbeddedCassandraServerHelper;
import org.junit.After;
import org.junit.AfterClass;
diff --git a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/CassandraTemplateIntegrationTest.java b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/CassandraTemplateIntegrationTest.java
similarity index 97%
rename from persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/CassandraTemplateIntegrationTest.java
rename to persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/CassandraTemplateIntegrationTest.java
index e331ac3cd4..90ae68ba98 100644
--- a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/CassandraTemplateIntegrationTest.java
+++ b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/CassandraTemplateIntegrationTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.cassandra.repository;
+package com.baeldung.spring.data.cassandra.repository;
import static junit.framework.TestCase.assertNull;
import static org.hamcrest.CoreMatchers.is;
@@ -10,12 +10,12 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+import com.baeldung.spring.data.cassandra.config.CassandraConfig;
+import com.baeldung.spring.data.cassandra.model.Book;
import org.apache.cassandra.exceptions.ConfigurationException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.thrift.transport.TTransportException;
-import org.baeldung.spring.data.cassandra.config.CassandraConfig;
-import org.baeldung.spring.data.cassandra.model.Book;
import org.cassandraunit.utils.EmbeddedCassandraServerHelper;
import org.junit.After;
import org.junit.AfterClass;
diff --git a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/CqlQueriesIntegrationTest.java b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/CqlQueriesIntegrationTest.java
similarity index 96%
rename from persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/CqlQueriesIntegrationTest.java
rename to persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/CqlQueriesIntegrationTest.java
index f7e42ae23b..f948218807 100644
--- a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/CqlQueriesIntegrationTest.java
+++ b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/CqlQueriesIntegrationTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.cassandra.repository;
+package com.baeldung.spring.data.cassandra.repository;
import static junit.framework.TestCase.assertEquals;
@@ -12,8 +12,8 @@ import org.apache.cassandra.exceptions.ConfigurationException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.thrift.transport.TTransportException;
-import org.baeldung.spring.data.cassandra.config.CassandraConfig;
-import org.baeldung.spring.data.cassandra.model.Book;
+import com.baeldung.spring.data.cassandra.config.CassandraConfig;
+import com.baeldung.spring.data.cassandra.model.Book;
import org.cassandraunit.utils.EmbeddedCassandraServerHelper;
import org.junit.After;
import org.junit.AfterClass;
diff --git a/persistence-modules/spring-data-couchbase-2/README.md b/persistence-modules/spring-data-couchbase-2/README.md
index 3145fc653a..aa6f7375cb 100644
--- a/persistence-modules/spring-data-couchbase-2/README.md
+++ b/persistence-modules/spring-data-couchbase-2/README.md
@@ -1,9 +1,9 @@
## Spring Data Couchbase Tutorial Project
### Relevant Articles:
-- [Intro to Spring Data Couchbase](http://www.baeldung.com/spring-data-couchbase)
-- [Entity Validation, Optimistic Locking, and Query Consistency in Spring Data Couchbase](http://www.baeldung.com/entity-validation-locking-and-query-consistency-in-spring-data-couchbase)
-- [Multiple Buckets and Spatial View Queries in Spring Data Couchbase](http://www.baeldung.com/spring-data-couchbase-buckets-and-spatial-view-queries)
+- [Intro to Spring Data Couchbase](https://www.baeldung.com/spring-data-couchbase)
+- [Entity Validation, Optimistic Locking, and Query Consistency in Spring Data Couchbase](https://www.baeldung.com/entity-validation-locking-and-query-consistency-in-spring-data-couchbase)
+- [Multiple Buckets and Spatial View Queries in Spring Data Couchbase](https://www.baeldung.com/spring-data-couchbase-buckets-and-spatial-view-queries)
### Overview
This Maven project contains the Java code for Spring Data Couchbase
@@ -25,14 +25,14 @@ mvn clean install
### Package Organization
Java classes for the first two tutorials listed above are in src/main/java in the package hierarchy
-org.baeldung.spring.data.couchbase
+com.baeldung.spring.data.couchbase
Java classes for the multiple-bucket tutorials are in src/main/java in the package hierarchy
-org.baeldung.spring.data.couchbase2b
+com.baeldung.spring.data.couchbase2b
### Running the tests
The test classes for the single-bucket tutorials are in src/test/java in the package
-org.baeldung.spring.data.couchbase.service:
+com.baeldung.spring.data.couchbase.service:
- PersonServiceTest (abstract)
- PersonRepositoryTest (concrete)
- PersonTemplateServiceTest (concrete)
@@ -41,7 +41,7 @@ org.baeldung.spring.data.couchbase.service:
- StudentTemplateServiceTest (concrete)
The concrete test classes for the multiple-bucket tutorial are in src/test/java in the package
-org.baeldung.spring.data.couchbase2b.service:
+com.baeldung.spring.data.couchbase2b.service:
- CampusRepositoryServiceImplTest
- PersonRepositoryServiceImplTest
- StudentRepositoryServiceImplTest
diff --git a/persistence-modules/spring-data-couchbase-2/pom.xml b/persistence-modules/spring-data-couchbase-2/pom.xml
index 56456fc04b..0a20a3ff0e 100644
--- a/persistence-modules/spring-data-couchbase-2/pom.xml
+++ b/persistence-modules/spring-data-couchbase-2/pom.xml
@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- org.baeldung
+ com.baeldung
spring-data-couchbase-2
0.1-SNAPSHOT
spring-data-couchbase-2
@@ -11,9 +11,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/model/Campus.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/model/Campus.java
similarity index 97%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/model/Campus.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/model/Campus.java
index c357ab8596..d710a35796 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/model/Campus.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/model/Campus.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase.model;
+package com.baeldung.spring.data.couchbase.model;
import javax.validation.constraints.NotNull;
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/model/Person.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/model/Person.java
similarity index 97%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/model/Person.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/model/Person.java
index fd41427d20..1e081f01da 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/model/Person.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/model/Person.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase.model;
+package com.baeldung.spring.data.couchbase.model;
import javax.validation.constraints.NotNull;
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/model/Student.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/model/Student.java
similarity index 98%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/model/Student.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/model/Student.java
index 726ed2347e..e979eca864 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/model/Student.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/model/Student.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase.model;
+package com.baeldung.spring.data.couchbase.model;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/CustomStudentRepository.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/repos/CustomStudentRepository.java
similarity index 54%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/CustomStudentRepository.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/repos/CustomStudentRepository.java
index 9a5bf21492..2aef524caf 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/CustomStudentRepository.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/repos/CustomStudentRepository.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase.repos;
+package com.baeldung.spring.data.couchbase.repos;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Student;
+import com.baeldung.spring.data.couchbase.model.Student;
public interface CustomStudentRepository {
List findByFirstNameStartsWith(String s);
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/CustomStudentRepositoryImpl.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/repos/CustomStudentRepositoryImpl.java
similarity index 85%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/CustomStudentRepositoryImpl.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/repos/CustomStudentRepositoryImpl.java
index 751895502c..c4742ac44a 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/CustomStudentRepositoryImpl.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/repos/CustomStudentRepositoryImpl.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase.repos;
+package com.baeldung.spring.data.couchbase.repos;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Student;
+import com.baeldung.spring.data.couchbase.model.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.couchbase.core.CouchbaseTemplate;
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/PersonRepository.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/repos/PersonRepository.java
similarity index 71%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/PersonRepository.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/repos/PersonRepository.java
index 717feb858f..dc9a20ffa2 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/PersonRepository.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/repos/PersonRepository.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase.repos;
+package com.baeldung.spring.data.couchbase.repos;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Person;
+import com.baeldung.spring.data.couchbase.model.Person;
import org.springframework.data.repository.CrudRepository;
public interface PersonRepository extends CrudRepository {
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/StudentRepository.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/repos/StudentRepository.java
similarity index 73%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/StudentRepository.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/repos/StudentRepository.java
index 9bbdeec642..7ea9433f21 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/repos/StudentRepository.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/repos/StudentRepository.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase.repos;
+package com.baeldung.spring.data.couchbase.repos;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Student;
+import com.baeldung.spring.data.couchbase.model.Student;
import org.springframework.data.repository.CrudRepository;
public interface StudentRepository extends CrudRepository, CustomStudentRepository {
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonRepositoryService.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/PersonRepositoryService.java
similarity index 89%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonRepositoryService.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/PersonRepositoryService.java
index 49548bdbfb..4051585e31 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonRepositoryService.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/PersonRepositoryService.java
@@ -1,11 +1,11 @@
-package org.baeldung.spring.data.couchbase.service;
+package com.baeldung.spring.data.couchbase.service;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Person;
-import org.baeldung.spring.data.couchbase.repos.PersonRepository;
+import com.baeldung.spring.data.couchbase.model.Person;
+import com.baeldung.spring.data.couchbase.repos.PersonRepository;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonService.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/PersonService.java
similarity index 75%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonService.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/PersonService.java
index a823908b01..f321eba94e 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonService.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/PersonService.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase.service;
+package com.baeldung.spring.data.couchbase.service;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Person;
+import com.baeldung.spring.data.couchbase.model.Person;
public interface PersonService {
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonTemplateService.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/PersonTemplateService.java
similarity index 93%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonTemplateService.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/PersonTemplateService.java
index 8398847f65..5e49465a25 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/PersonTemplateService.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/PersonTemplateService.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase.service;
+package com.baeldung.spring.data.couchbase.service;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Person;
+import com.baeldung.spring.data.couchbase.model.Person;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/StudentRepositoryService.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/StudentRepositoryService.java
similarity index 89%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/StudentRepositoryService.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/StudentRepositoryService.java
index 65f5a6e78e..ff9657260a 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/StudentRepositoryService.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/StudentRepositoryService.java
@@ -1,11 +1,11 @@
-package org.baeldung.spring.data.couchbase.service;
+package com.baeldung.spring.data.couchbase.service;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Student;
-import org.baeldung.spring.data.couchbase.repos.StudentRepository;
+import com.baeldung.spring.data.couchbase.model.Student;
+import com.baeldung.spring.data.couchbase.repos.StudentRepository;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/StudentService.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/StudentService.java
similarity index 75%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/StudentService.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/StudentService.java
index f483ef0fb6..aa99a770cd 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/StudentService.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/StudentService.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase.service;
+package com.baeldung.spring.data.couchbase.service;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Student;
+import com.baeldung.spring.data.couchbase.model.Student;
public interface StudentService {
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/StudentTemplateService.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/StudentTemplateService.java
similarity index 93%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/StudentTemplateService.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/StudentTemplateService.java
index 8d1292b5e4..9110f68276 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase/service/StudentTemplateService.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase/service/StudentTemplateService.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase.service;
+package com.baeldung.spring.data.couchbase.service;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Student;
+import com.baeldung.spring.data.couchbase.model.Student;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/repos/CampusRepository.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/repos/CampusRepository.java
similarity index 85%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/repos/CampusRepository.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/repos/CampusRepository.java
index b1857222c5..1120b7c55d 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/repos/CampusRepository.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/repos/CampusRepository.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase2b.repos;
+package com.baeldung.spring.data.couchbase2b.repos;
import java.util.Set;
-import org.baeldung.spring.data.couchbase.model.Campus;
+import com.baeldung.spring.data.couchbase.model.Campus;
import org.springframework.data.couchbase.core.query.Dimensional;
import org.springframework.data.couchbase.core.query.View;
import org.springframework.data.geo.Distance;
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/repos/PersonRepository.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/repos/PersonRepository.java
similarity index 71%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/repos/PersonRepository.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/repos/PersonRepository.java
index ef37106c6d..ec50dec471 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/repos/PersonRepository.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/repos/PersonRepository.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase2b.repos;
+package com.baeldung.spring.data.couchbase2b.repos;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Person;
+import com.baeldung.spring.data.couchbase.model.Person;
import org.springframework.data.repository.CrudRepository;
public interface PersonRepository extends CrudRepository {
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/repos/StudentRepository.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/repos/StudentRepository.java
similarity index 71%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/repos/StudentRepository.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/repos/StudentRepository.java
index 0d790d2f39..3fd4a717f9 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/repos/StudentRepository.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/repos/StudentRepository.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase2b.repos;
+package com.baeldung.spring.data.couchbase2b.repos;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Student;
+import com.baeldung.spring.data.couchbase.model.Student;
import org.springframework.data.repository.CrudRepository;
public interface StudentRepository extends CrudRepository {
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/CampusService.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/CampusService.java
similarity index 75%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/CampusService.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/CampusService.java
index 58f00dda25..567ffa2a7f 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/CampusService.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/CampusService.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase2b.service;
+package com.baeldung.spring.data.couchbase2b.service;
import java.util.Set;
-import org.baeldung.spring.data.couchbase.model.Campus;
+import com.baeldung.spring.data.couchbase.model.Campus;
import org.springframework.data.geo.Distance;
import org.springframework.data.geo.Point;
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/CampusServiceImpl.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/CampusServiceImpl.java
similarity index 87%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/CampusServiceImpl.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/CampusServiceImpl.java
index 586f5f0dc1..03e2dced1b 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/CampusServiceImpl.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/CampusServiceImpl.java
@@ -1,11 +1,11 @@
-package org.baeldung.spring.data.couchbase2b.service;
+package com.baeldung.spring.data.couchbase2b.service;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
-import org.baeldung.spring.data.couchbase.model.Campus;
-import org.baeldung.spring.data.couchbase2b.repos.CampusRepository;
+import com.baeldung.spring.data.couchbase2b.repos.CampusRepository;
+import com.baeldung.spring.data.couchbase.model.Campus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.geo.Distance;
import org.springframework.data.geo.Point;
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/PersonService.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/PersonService.java
similarity index 74%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/PersonService.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/PersonService.java
index c2c96ffb9c..7dc30ead11 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/PersonService.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/PersonService.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase2b.service;
+package com.baeldung.spring.data.couchbase2b.service;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Person;
+import com.baeldung.spring.data.couchbase.model.Person;
public interface PersonService {
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/PersonServiceImpl.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/PersonServiceImpl.java
similarity index 88%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/PersonServiceImpl.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/PersonServiceImpl.java
index fe0a9e48cd..af08bd4ca8 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/PersonServiceImpl.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/PersonServiceImpl.java
@@ -1,11 +1,11 @@
-package org.baeldung.spring.data.couchbase2b.service;
+package com.baeldung.spring.data.couchbase2b.service;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Person;
-import org.baeldung.spring.data.couchbase2b.repos.PersonRepository;
+import com.baeldung.spring.data.couchbase2b.repos.PersonRepository;
+import com.baeldung.spring.data.couchbase.model.Person;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/StudentService.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/StudentService.java
similarity index 75%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/StudentService.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/StudentService.java
index 5b83b403bb..3f318e1af1 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/StudentService.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/StudentService.java
@@ -1,8 +1,8 @@
-package org.baeldung.spring.data.couchbase2b.service;
+package com.baeldung.spring.data.couchbase2b.service;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Student;
+import com.baeldung.spring.data.couchbase.model.Student;
public interface StudentService {
diff --git a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/StudentServiceImpl.java b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/StudentServiceImpl.java
similarity index 88%
rename from persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/StudentServiceImpl.java
rename to persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/StudentServiceImpl.java
index 248d824081..53feaead10 100644
--- a/persistence-modules/spring-data-couchbase-2/src/main/java/org/baeldung/spring/data/couchbase2b/service/StudentServiceImpl.java
+++ b/persistence-modules/spring-data-couchbase-2/src/main/java/com/baeldung/spring/data/couchbase2b/service/StudentServiceImpl.java
@@ -1,11 +1,11 @@
-package org.baeldung.spring.data.couchbase2b.service;
+package com.baeldung.spring.data.couchbase2b.service;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Student;
-import org.baeldung.spring.data.couchbase2b.repos.StudentRepository;
+import com.baeldung.spring.data.couchbase2b.repos.StudentRepository;
+import com.baeldung.spring.data.couchbase.model.Student;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/SpringContextLiveTest.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/SpringContextLiveTest.java
similarity index 83%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/SpringContextLiveTest.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/SpringContextLiveTest.java
index 5e20a98a1d..553520e6e6 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/SpringContextLiveTest.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/SpringContextLiveTest.java
@@ -1,7 +1,7 @@
-package org.baeldung;
+package com.baeldung;
-import org.baeldung.spring.data.couchbase2b.MultiBucketCouchbaseConfig;
-import org.baeldung.spring.data.couchbase2b.MultiBucketIntegrationTestConfig;
+import com.baeldung.spring.data.couchbase2b.MultiBucketCouchbaseConfig;
+import com.baeldung.spring.data.couchbase2b.MultiBucketIntegrationTestConfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
@@ -25,7 +25,7 @@ import org.springframework.test.context.support.DependencyInjectionTestExecution
* {@code
* function (doc) {
* if (doc.location &&
- * doc._class == "org.baeldung.spring.data.couchbase.model.Campus") {
+ * doc._class == "com.baeldung.spring.data.couchbase.model.Campus") {
* emit([doc.location.x, doc.location.y], null);
* }
* }}
@@ -34,7 +34,7 @@ import org.springframework.test.context.support.DependencyInjectionTestExecution
* 2.4.1- view 'all' with function:
* {@code
* function (doc, meta) {
- * if(doc._class == "org.baeldung.spring.data.couchbase.model.Campus") {
+ * if(doc._class == "com.baeldung.spring.data.couchbase.model.Campus") {
* emit(meta.id, null);
* }
* }}
@@ -42,7 +42,7 @@ import org.springframework.test.context.support.DependencyInjectionTestExecution
* 2.4.2- view 'byName' with function:
* {@code
* function (doc, meta) {
- * if(doc._class == "org.baeldung.spring.data.couchbase.model.Campus" &&
+ * if(doc._class == "com.baeldung.spring.data.couchbase.model.Campus" &&
* doc.name) {
* emit(doc.name, null);
* }
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/CustomTypeKeyCouchbaseConfig.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/CustomTypeKeyCouchbaseConfig.java
similarity index 86%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/CustomTypeKeyCouchbaseConfig.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/CustomTypeKeyCouchbaseConfig.java
index 0e2e8d5dd3..403c012194 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/CustomTypeKeyCouchbaseConfig.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/CustomTypeKeyCouchbaseConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase;
+package com.baeldung.spring.data.couchbase;
import org.springframework.data.couchbase.core.convert.MappingCouchbaseConverter;
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/IntegrationTest.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/IntegrationTest.java
similarity index 92%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/IntegrationTest.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/IntegrationTest.java
index ce2daa92cd..df2802a15c 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/IntegrationTest.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/IntegrationTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase;
+package com.baeldung.spring.data.couchbase;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/IntegrationTestConfig.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/IntegrationTestConfig.java
similarity index 62%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/IntegrationTestConfig.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/IntegrationTestConfig.java
index 6f040c34db..6abb879236 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/IntegrationTestConfig.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/IntegrationTestConfig.java
@@ -1,9 +1,9 @@
-package org.baeldung.spring.data.couchbase;
+package com.baeldung.spring.data.couchbase;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
-@ComponentScan(basePackages = "org.baeldung.spring.data.couchbase")
+@ComponentScan(basePackages = "com.baeldung.spring.data.couchbase")
public class IntegrationTestConfig {
}
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/MyCouchbaseConfig.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/MyCouchbaseConfig.java
similarity index 93%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/MyCouchbaseConfig.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/MyCouchbaseConfig.java
index a37e918101..5a2180f4b8 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/MyCouchbaseConfig.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/MyCouchbaseConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase;
+package com.baeldung.spring.data.couchbase;
import java.util.Arrays;
import java.util.List;
@@ -12,7 +12,7 @@ import org.springframework.data.couchbase.repository.config.EnableCouchbaseRepos
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
@Configuration
-@EnableCouchbaseRepositories(basePackages = { "org.baeldung.spring.data.couchbase" })
+@EnableCouchbaseRepositories(basePackages = { "com.baeldung.spring.data.couchbase" })
public class MyCouchbaseConfig extends AbstractCouchbaseConfiguration {
public static final List NODE_LIST = Arrays.asList("localhost");
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/ReadYourOwnWritesCouchbaseConfig.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/ReadYourOwnWritesCouchbaseConfig.java
similarity index 85%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/ReadYourOwnWritesCouchbaseConfig.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/ReadYourOwnWritesCouchbaseConfig.java
index b4a372487e..b989bb39d8 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/ReadYourOwnWritesCouchbaseConfig.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/ReadYourOwnWritesCouchbaseConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase;
+package com.baeldung.spring.data.couchbase;
import org.springframework.data.couchbase.core.query.Consistency;
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonRepositoryServiceLiveTest.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/PersonRepositoryServiceLiveTest.java
similarity index 87%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonRepositoryServiceLiveTest.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/PersonRepositoryServiceLiveTest.java
index 899c21691d..ee3716030f 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonRepositoryServiceLiveTest.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/PersonRepositoryServiceLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase.service;
+package com.baeldung.spring.data.couchbase.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonServiceLiveTest.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/PersonServiceLiveTest.java
similarity index 95%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonServiceLiveTest.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/PersonServiceLiveTest.java
index 08d641dc2c..804bbdd2c8 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonServiceLiveTest.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/PersonServiceLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase.service;
+package com.baeldung.spring.data.couchbase.service;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -7,9 +7,9 @@ import static org.junit.Assert.assertTrue;
import java.util.List;
-import org.baeldung.spring.data.couchbase.IntegrationTest;
-import org.baeldung.spring.data.couchbase.MyCouchbaseConfig;
-import org.baeldung.spring.data.couchbase.model.Person;
+import com.baeldung.spring.data.couchbase.IntegrationTest;
+import com.baeldung.spring.data.couchbase.MyCouchbaseConfig;
+import com.baeldung.spring.data.couchbase.model.Person;
import org.joda.time.DateTime;
import org.junit.BeforeClass;
import org.junit.Test;
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonTemplateServiceLiveTest.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/PersonTemplateServiceLiveTest.java
similarity index 87%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonTemplateServiceLiveTest.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/PersonTemplateServiceLiveTest.java
index 3bc99d28df..a665fd756d 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/PersonTemplateServiceLiveTest.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/PersonTemplateServiceLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase.service;
+package com.baeldung.spring.data.couchbase.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/StudentRepositoryServiceLiveTest.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/StudentRepositoryServiceLiveTest.java
similarity index 87%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/StudentRepositoryServiceLiveTest.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/StudentRepositoryServiceLiveTest.java
index 162619db3e..9abf93b003 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/StudentRepositoryServiceLiveTest.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/StudentRepositoryServiceLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase.service;
+package com.baeldung.spring.data.couchbase.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/StudentServiceLiveTest.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/StudentServiceLiveTest.java
similarity index 96%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/StudentServiceLiveTest.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/StudentServiceLiveTest.java
index 6a18922007..c13b4930ca 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/StudentServiceLiveTest.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/StudentServiceLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase.service;
+package com.baeldung.spring.data.couchbase.service;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -9,9 +9,9 @@ import java.util.List;
import javax.validation.ConstraintViolationException;
-import org.baeldung.spring.data.couchbase.IntegrationTest;
-import org.baeldung.spring.data.couchbase.MyCouchbaseConfig;
-import org.baeldung.spring.data.couchbase.model.Student;
+import com.baeldung.spring.data.couchbase.IntegrationTest;
+import com.baeldung.spring.data.couchbase.MyCouchbaseConfig;
+import com.baeldung.spring.data.couchbase.model.Student;
import org.joda.time.DateTime;
import org.junit.BeforeClass;
import org.junit.Test;
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/StudentTemplateServiceLiveTest.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/StudentTemplateServiceLiveTest.java
similarity index 87%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/StudentTemplateServiceLiveTest.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/StudentTemplateServiceLiveTest.java
index c666e004af..92a4a23baf 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase/service/StudentTemplateServiceLiveTest.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase/service/StudentTemplateServiceLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase.service;
+package com.baeldung.spring.data.couchbase.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/MultiBucketCouchbaseConfig.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/MultiBucketCouchbaseConfig.java
similarity index 93%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/MultiBucketCouchbaseConfig.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/MultiBucketCouchbaseConfig.java
index fe32305feb..488819aaf5 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/MultiBucketCouchbaseConfig.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/MultiBucketCouchbaseConfig.java
@@ -1,9 +1,9 @@
-package org.baeldung.spring.data.couchbase2b;
+package com.baeldung.spring.data.couchbase2b;
import java.util.Arrays;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Campus;
+import com.baeldung.spring.data.couchbase.model.Campus;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.couchbase.config.AbstractCouchbaseConfiguration;
@@ -17,7 +17,7 @@ import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
import com.couchbase.client.java.Bucket;
@Configuration
-@EnableCouchbaseRepositories(basePackages = { "org.baeldung.spring.data.couchbase2b" })
+@EnableCouchbaseRepositories(basePackages = { "com.baeldung.spring.data.couchbase2b" })
public class MultiBucketCouchbaseConfig extends AbstractCouchbaseConfiguration {
public static final List NODE_LIST = Arrays.asList("localhost");
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/MultiBucketIntegrationTestConfig.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/MultiBucketIntegrationTestConfig.java
similarity index 64%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/MultiBucketIntegrationTestConfig.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/MultiBucketIntegrationTestConfig.java
index 94a95b06bb..c082a0d77c 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/MultiBucketIntegrationTestConfig.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/MultiBucketIntegrationTestConfig.java
@@ -1,10 +1,10 @@
-package org.baeldung.spring.data.couchbase2b;
+package com.baeldung.spring.data.couchbase2b;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
-@ComponentScan(basePackages = { "org.baeldung.spring.data.couchbase2b" })
+@ComponentScan(basePackages = { "com.baeldung.spring.data.couchbase2b" })
public class MultiBucketIntegrationTestConfig {
}
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/MultiBucketLiveTest.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/MultiBucketLiveTest.java
similarity index 92%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/MultiBucketLiveTest.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/MultiBucketLiveTest.java
index 3b406a851e..334af40866 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/MultiBucketLiveTest.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/MultiBucketLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase2b;
+package com.baeldung.spring.data.couchbase2b;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/service/CampusServiceImplLiveTest.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/service/CampusServiceImplLiveTest.java
similarity index 94%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/service/CampusServiceImplLiveTest.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/service/CampusServiceImplLiveTest.java
index 5e7a12f292..e94c09e6cd 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/service/CampusServiceImplLiveTest.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/service/CampusServiceImplLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase2b.service;
+package com.baeldung.spring.data.couchbase2b.service;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -9,9 +9,9 @@ import java.util.Set;
import javax.annotation.PostConstruct;
-import org.baeldung.spring.data.couchbase.model.Campus;
-import org.baeldung.spring.data.couchbase2b.MultiBucketLiveTest;
-import org.baeldung.spring.data.couchbase2b.repos.CampusRepository;
+import com.baeldung.spring.data.couchbase.model.Campus;
+import com.baeldung.spring.data.couchbase2b.MultiBucketLiveTest;
+import com.baeldung.spring.data.couchbase2b.repos.CampusRepository;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.geo.Distance;
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/service/PersonServiceImplLiveTest.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/service/PersonServiceImplLiveTest.java
similarity index 95%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/service/PersonServiceImplLiveTest.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/service/PersonServiceImplLiveTest.java
index 9543d8fe12..3f98c1950a 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/service/PersonServiceImplLiveTest.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/service/PersonServiceImplLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase2b.service;
+package com.baeldung.spring.data.couchbase2b.service;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -7,9 +7,9 @@ import static org.junit.Assert.assertTrue;
import java.util.List;
-import org.baeldung.spring.data.couchbase.model.Person;
-import org.baeldung.spring.data.couchbase2b.MultiBucketCouchbaseConfig;
-import org.baeldung.spring.data.couchbase2b.MultiBucketLiveTest;
+import com.baeldung.spring.data.couchbase.model.Person;
+import com.baeldung.spring.data.couchbase2b.MultiBucketLiveTest;
+import com.baeldung.spring.data.couchbase2b.MultiBucketCouchbaseConfig;
import org.joda.time.DateTime;
import org.junit.BeforeClass;
import org.junit.Test;
diff --git a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/service/StudentServiceImplLiveTest.java b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/service/StudentServiceImplLiveTest.java
similarity index 96%
rename from persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/service/StudentServiceImplLiveTest.java
rename to persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/service/StudentServiceImplLiveTest.java
index 52b9113e8f..004258a37e 100644
--- a/persistence-modules/spring-data-couchbase-2/src/test/java/org/baeldung/spring/data/couchbase2b/service/StudentServiceImplLiveTest.java
+++ b/persistence-modules/spring-data-couchbase-2/src/test/java/com/baeldung/spring/data/couchbase2b/service/StudentServiceImplLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.couchbase2b.service;
+package com.baeldung.spring.data.couchbase2b.service;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -9,9 +9,9 @@ import java.util.List;
import javax.validation.ConstraintViolationException;
-import org.baeldung.spring.data.couchbase.model.Student;
-import org.baeldung.spring.data.couchbase2b.MultiBucketCouchbaseConfig;
-import org.baeldung.spring.data.couchbase2b.MultiBucketLiveTest;
+import com.baeldung.spring.data.couchbase.model.Student;
+import com.baeldung.spring.data.couchbase2b.MultiBucketCouchbaseConfig;
+import com.baeldung.spring.data.couchbase2b.MultiBucketLiveTest;
import org.joda.time.DateTime;
import org.junit.BeforeClass;
import org.junit.Test;
diff --git a/persistence-modules/spring-data-dynamodb/pom.xml b/persistence-modules/spring-data-dynamodb/pom.xml
index 871f99125a..fceceb40ba 100644
--- a/persistence-modules/spring-data-dynamodb/pom.xml
+++ b/persistence-modules/spring-data-dynamodb/pom.xml
@@ -138,19 +138,7 @@
- spring-data-dynamodb
-
-
- src/main/resources
- true
-
-
-
-
- org.apache.maven.plugins
- maven-war-plugin
-
org.apache.maven.plugins
maven-dependency-plugin
diff --git a/persistence-modules/spring-data-eclipselink/README.md b/persistence-modules/spring-data-eclipselink/README.md
index 3bad63d7ef..2056031c45 100644
--- a/persistence-modules/spring-data-eclipselink/README.md
+++ b/persistence-modules/spring-data-eclipselink/README.md
@@ -4,5 +4,5 @@ This module contains articles about Spring Data with EclipseLink.
### Relevant articles
-- [A Guide to EclipseLink with Spring](http://www.baeldung.com/spring-eclipselink)
+- [A Guide to EclipseLink with Spring](https://www.baeldung.com/spring-eclipselink)
- [Pessimistic Locking in JPA](https://www.baeldung.com/jpa-pessimistic-locking)
diff --git a/persistence-modules/spring-data-eclipselink/pom.xml b/persistence-modules/spring-data-eclipselink/pom.xml
index bb596d4a8a..4ae43de07a 100644
--- a/persistence-modules/spring-data-eclipselink/pom.xml
+++ b/persistence-modules/spring-data-eclipselink/pom.xml
@@ -7,9 +7,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/spring-data-eclipselink/src/test/java/org/baeldung/SpringContextTest.java b/persistence-modules/spring-data-eclipselink/src/test/java/com/baeldung/SpringContextTest.java
similarity index 95%
rename from persistence-modules/spring-data-eclipselink/src/test/java/org/baeldung/SpringContextTest.java
rename to persistence-modules/spring-data-eclipselink/src/test/java/com/baeldung/SpringContextTest.java
index 4c69245f65..842c61ffbd 100644
--- a/persistence-modules/spring-data-eclipselink/src/test/java/org/baeldung/SpringContextTest.java
+++ b/persistence-modules/spring-data-eclipselink/src/test/java/com/baeldung/SpringContextTest.java
@@ -1,4 +1,4 @@
-package org.baeldung;
+package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/persistence-modules/spring-data-elasticsearch/README.md b/persistence-modules/spring-data-elasticsearch/README.md
index 840db617f6..22126c2f00 100644
--- a/persistence-modules/spring-data-elasticsearch/README.md
+++ b/persistence-modules/spring-data-elasticsearch/README.md
@@ -1,11 +1,11 @@
## Spring Data Elasticsearch
### Relevant Articles:
-- [Introduction to Spring Data Elasticsearch](http://www.baeldung.com/spring-data-elasticsearch-tutorial)
-- [Elasticsearch Queries with Spring Data](http://www.baeldung.com/spring-data-elasticsearch-queries)
-- [Guide to Elasticsearch in Java](http://www.baeldung.com/elasticsearch-java)
-- [Geospatial Support in ElasticSearch](http://www.baeldung.com/elasticsearch-geo-spatial)
-- [A Simple Tagging Implementation with Elasticsearch](http://www.baeldung.com/elasticsearch-tagging)
+- [Introduction to Spring Data Elasticsearch](https://www.baeldung.com/spring-data-elasticsearch-tutorial)
+- [Elasticsearch Queries with Spring Data](https://www.baeldung.com/spring-data-elasticsearch-queries)
+- [Guide to Elasticsearch in Java](https://www.baeldung.com/elasticsearch-java)
+- [Geospatial Support in ElasticSearch](https://www.baeldung.com/elasticsearch-geo-spatial)
+- [A Simple Tagging Implementation with Elasticsearch](https://www.baeldung.com/elasticsearch-tagging)
### Build the Project with Tests Running
```
diff --git a/persistence-modules/spring-data-elasticsearch/pom.xml b/persistence-modules/spring-data-elasticsearch/pom.xml
index ccd2f94e59..3446528323 100644
--- a/persistence-modules/spring-data-elasticsearch/pom.xml
+++ b/persistence-modules/spring-data-elasticsearch/pom.xml
@@ -2,7 +2,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-data-elasticsearch
- 0.0.1-SNAPSHOT
spring-data-elasticsearch
jar
@@ -89,8 +88,6 @@
- 1.8
- 1.8
3.0.8.RELEASE
4.5.2
5.6.0
diff --git a/persistence-modules/spring-data-elasticsearch/src/test/java/org/baeldung/SpringContextManualTest.java b/persistence-modules/spring-data-elasticsearch/src/test/java/com/baeldung/SpringContextManualTest.java
similarity index 96%
rename from persistence-modules/spring-data-elasticsearch/src/test/java/org/baeldung/SpringContextManualTest.java
rename to persistence-modules/spring-data-elasticsearch/src/test/java/com/baeldung/SpringContextManualTest.java
index c6f095eae9..c69deeb77c 100644
--- a/persistence-modules/spring-data-elasticsearch/src/test/java/org/baeldung/SpringContextManualTest.java
+++ b/persistence-modules/spring-data-elasticsearch/src/test/java/com/baeldung/SpringContextManualTest.java
@@ -1,4 +1,4 @@
-package org.baeldung;
+package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/persistence-modules/spring-data-gemfire/README.md b/persistence-modules/spring-data-gemfire/README.md
index 78199e90d0..4eb28c1678 100644
--- a/persistence-modules/spring-data-gemfire/README.md
+++ b/persistence-modules/spring-data-gemfire/README.md
@@ -1,3 +1,3 @@
### Relevant articles
-- [A Guide to GemFire with Spring Data](http://www.baeldung.com/spring-data-gemfire)
+- [A Guide to GemFire with Spring Data](https://www.baeldung.com/spring-data-gemfire)
diff --git a/persistence-modules/spring-data-gemfire/pom.xml b/persistence-modules/spring-data-gemfire/pom.xml
index 6bd689192c..a0cc4d5360 100644
--- a/persistence-modules/spring-data-gemfire/pom.xml
+++ b/persistence-modules/spring-data-gemfire/pom.xml
@@ -8,9 +8,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/spring-data-gemfire/src/test/java/org/baeldung/SpringContextTest.java b/persistence-modules/spring-data-gemfire/src/test/java/com/baeldung/SpringContextTest.java
similarity index 96%
rename from persistence-modules/spring-data-gemfire/src/test/java/org/baeldung/SpringContextTest.java
rename to persistence-modules/spring-data-gemfire/src/test/java/com/baeldung/SpringContextTest.java
index 3772e22137..53ab8800d9 100644
--- a/persistence-modules/spring-data-gemfire/src/test/java/org/baeldung/SpringContextTest.java
+++ b/persistence-modules/spring-data-gemfire/src/test/java/com/baeldung/SpringContextTest.java
@@ -1,4 +1,4 @@
-package org.baeldung;
+package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/persistence-modules/spring-data-geode/pom.xml b/persistence-modules/spring-data-geode/pom.xml
index 2a9cbe35e9..557d09376a 100644
--- a/persistence-modules/spring-data-geode/pom.xml
+++ b/persistence-modules/spring-data-geode/pom.xml
@@ -9,16 +9,15 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
org.springframework.boot
spring-boot-starter
- 2.1.9.RELEASE
+ ${spring.boot.starter.version}
org.springframework.boot
@@ -89,6 +88,7 @@
UTF-8
com.baeldung.springdatageode.app.ClientCacheApp
1.1.1.RELEASE
+ 2.1.9.RELEASE
\ No newline at end of file
diff --git a/persistence-modules/spring-data-jpa-3/pom.xml b/persistence-modules/spring-data-jpa-3/pom.xml
index 8a949b3008..d02d089ba3 100644
--- a/persistence-modules/spring-data-jpa-3/pom.xml
+++ b/persistence-modules/spring-data-jpa-3/pom.xml
@@ -52,34 +52,6 @@
runtime
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- junit
- junit
-
-
-
-
- org.junit.jupiter
- junit-jupiter-api
- test
-
-
- org.junit.jupiter
- junit-jupiter-engine
- test
-
-
- org.junit.platform
- junit-platform-launcher
- test
-
-
org.testcontainers
@@ -94,9 +66,6 @@
1.4.1
21.0
1.12.2
- 42.2.8
- 1.12.2
- 1.4.200
diff --git a/persistence-modules/spring-data-jpa-3/src/main/java/com/baeldung/multipledb/dao/product/ProductRepository.java b/persistence-modules/spring-data-jpa-3/src/main/java/com/baeldung/multipledb/dao/product/ProductRepository.java
index 022099eed0..6ce9bcad45 100644
--- a/persistence-modules/spring-data-jpa-3/src/main/java/com/baeldung/multipledb/dao/product/ProductRepository.java
+++ b/persistence-modules/spring-data-jpa-3/src/main/java/com/baeldung/multipledb/dao/product/ProductRepository.java
@@ -5,9 +5,9 @@ import java.util.List;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.PagingAndSortingRepository;
-import com.baeldung.multipledb.model.product.ProductMultipleDB;
+import com.baeldung.multipledb.model.product.Product;
-public interface ProductRepository extends PagingAndSortingRepository {
+public interface ProductRepository extends PagingAndSortingRepository {
- List findAllByPrice(double price, Pageable pageable);
+ List findAllByPrice(double price, Pageable pageable);
}
diff --git a/persistence-modules/spring-data-jpa-3/src/main/java/com/baeldung/multipledb/model/product/ProductMultipleDB.java b/persistence-modules/spring-data-jpa-3/src/main/java/com/baeldung/multipledb/model/product/Product.java
similarity index 80%
rename from persistence-modules/spring-data-jpa-3/src/main/java/com/baeldung/multipledb/model/product/ProductMultipleDB.java
rename to persistence-modules/spring-data-jpa-3/src/main/java/com/baeldung/multipledb/model/product/Product.java
index 8bdff340ac..eaf471043c 100644
--- a/persistence-modules/spring-data-jpa-3/src/main/java/com/baeldung/multipledb/model/product/ProductMultipleDB.java
+++ b/persistence-modules/spring-data-jpa-3/src/main/java/com/baeldung/multipledb/model/product/Product.java
@@ -6,7 +6,7 @@ import javax.persistence.Table;
@Entity
@Table(schema = "products")
-public class ProductMultipleDB {
+public class Product {
@Id
private int id;
@@ -15,19 +15,19 @@ public class ProductMultipleDB {
private double price;
- public ProductMultipleDB() {
+ public Product() {
super();
}
- private ProductMultipleDB(int id, String name, double price) {
+ private Product(int id, String name, double price) {
super();
this.id = id;
this.name = name;
this.price = price;
}
- public static ProductMultipleDB from(int id, String name, double price) {
- return new ProductMultipleDB(id, name, price);
+ public static Product from(int id, String name, double price) {
+ return new Product(id, name, price);
}
public int getId() {
diff --git a/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java b/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java
index 17ee6a94ba..b2581b8034 100644
--- a/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java
+++ b/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java
@@ -266,7 +266,7 @@ public class UserRepositoryCommon {
userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS));
userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS));
- List usersSortByName = userRepository.findAll(new Sort(Sort.Direction.ASC, "name"));
+ List usersSortByName = userRepository.findAll(Sort.by(Sort.Direction.ASC, "name"));
assertThat(usersSortByName.get(0)
.getName()).isEqualTo(USER_NAME_ADAM);
@@ -278,7 +278,7 @@ public class UserRepositoryCommon {
userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS));
userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS));
- userRepository.findAll(new Sort(Sort.Direction.ASC, "name"));
+ userRepository.findAll(Sort.by(Sort.Direction.ASC, "name"));
List usersSortByNameLength = userRepository.findAll(Sort.by("LENGTH(name)"));
diff --git a/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/multipledb/ProductRepositoryIntegrationTest.java b/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/multipledb/ProductRepositoryIntegrationTest.java
index cdbb307d7f..831790af95 100644
--- a/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/multipledb/ProductRepositoryIntegrationTest.java
+++ b/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/multipledb/ProductRepositoryIntegrationTest.java
@@ -23,7 +23,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.annotation.Transactional;
import com.baeldung.multipledb.dao.product.ProductRepository;
-import com.baeldung.multipledb.model.product.ProductMultipleDB;
+import com.baeldung.multipledb.model.product.Product;
@RunWith(SpringRunner.class)
@SpringBootTest(classes=MultipleDbApplication.class)
@@ -36,22 +36,22 @@ public class ProductRepositoryIntegrationTest {
@Before
@Transactional("productTransactionManager")
public void setUp() {
- productRepository.save(ProductMultipleDB.from(1001, "Book", 21));
- productRepository.save(ProductMultipleDB.from(1002, "Coffee", 10));
- productRepository.save(ProductMultipleDB.from(1003, "Jeans", 30));
- productRepository.save(ProductMultipleDB.from(1004, "Shirt", 32));
- productRepository.save(ProductMultipleDB.from(1005, "Bacon", 10));
+ productRepository.save(Product.from(1001, "Book", 21));
+ productRepository.save(Product.from(1002, "Coffee", 10));
+ productRepository.save(Product.from(1003, "Jeans", 30));
+ productRepository.save(Product.from(1004, "Shirt", 32));
+ productRepository.save(Product.from(1005, "Bacon", 10));
}
@Test
public void whenRequestingFirstPageOfSizeTwo_ThenReturnFirstPage() {
Pageable pageRequest = PageRequest.of(0, 2);
- Page result = productRepository.findAll(pageRequest);
+ Page result = productRepository.findAll(pageRequest);
assertThat(result.getContent(), hasSize(2));
assertTrue(result.stream()
- .map(ProductMultipleDB::getId)
+ .map(Product::getId)
.allMatch(id -> Arrays.asList(1001, 1002)
.contains(id)));
}
@@ -60,11 +60,11 @@ public class ProductRepositoryIntegrationTest {
public void whenRequestingSecondPageOfSizeTwo_ThenReturnSecondPage() {
Pageable pageRequest = PageRequest.of(1, 2);
- Page result = productRepository.findAll(pageRequest);
+ Page result = productRepository.findAll(pageRequest);
assertThat(result.getContent(), hasSize(2));
assertTrue(result.stream()
- .map(ProductMultipleDB::getId)
+ .map(Product::getId)
.allMatch(id -> Arrays.asList(1003, 1004)
.contains(id)));
}
@@ -73,11 +73,11 @@ public class ProductRepositoryIntegrationTest {
public void whenRequestingLastPage_ThenReturnLastPageWithRemData() {
Pageable pageRequest = PageRequest.of(2, 2);
- Page result = productRepository.findAll(pageRequest);
+ Page result = productRepository.findAll(pageRequest);
assertThat(result.getContent(), hasSize(1));
assertTrue(result.stream()
- .map(ProductMultipleDB::getId)
+ .map(Product::getId)
.allMatch(id -> Arrays.asList(1005)
.contains(id)));
}
@@ -86,12 +86,12 @@ public class ProductRepositoryIntegrationTest {
public void whenSortingByNameAscAndPaging_ThenReturnSortedPagedResult() {
Pageable pageRequest = PageRequest.of(0, 3, Sort.by("name"));
- Page result = productRepository.findAll(pageRequest);
+ Page result = productRepository.findAll(pageRequest);
assertThat(result.getContent(), hasSize(3));
assertThat(result.getContent()
.stream()
- .map(ProductMultipleDB::getId)
+ .map(Product::getId)
.collect(Collectors.toList()), equalTo(Arrays.asList(1005, 1001, 1002)));
}
@@ -101,12 +101,12 @@ public class ProductRepositoryIntegrationTest {
Pageable pageRequest = PageRequest.of(0, 3, Sort.by("price")
.descending());
- Page result = productRepository.findAll(pageRequest);
+ Page result = productRepository.findAll(pageRequest);
assertThat(result.getContent(), hasSize(3));
assertThat(result.getContent()
.stream()
- .map(ProductMultipleDB::getId)
+ .map(Product::getId)
.collect(Collectors.toList()), equalTo(Arrays.asList(1004, 1003, 1001)));
}
@@ -117,12 +117,12 @@ public class ProductRepositoryIntegrationTest {
.descending()
.and(Sort.by("name")));
- Page result = productRepository.findAll(pageRequest);
+ Page result = productRepository.findAll(pageRequest);
assertThat(result.getContent(), hasSize(5));
assertThat(result.getContent()
.stream()
- .map(ProductMultipleDB::getId)
+ .map(Product::getId)
.collect(Collectors.toList()), equalTo(Arrays.asList(1004, 1003, 1001, 1005, 1002)));
}
@@ -131,11 +131,11 @@ public class ProductRepositoryIntegrationTest {
public void whenRequestingFirstPageOfSizeTwoUsingCustomMethod_ThenReturnFirstPage() {
Pageable pageRequest = PageRequest.of(0, 2);
- List result = productRepository.findAllByPrice(10, pageRequest);
+ List result = productRepository.findAllByPrice(10, pageRequest);
assertThat(result, hasSize(2));
assertTrue(result.stream()
- .map(ProductMultipleDB::getId)
+ .map(Product::getId)
.allMatch(id -> Arrays.asList(1002, 1005)
.contains(id)));
}
diff --git a/persistence-modules/spring-data-jpa-4/README.md b/persistence-modules/spring-data-jpa-4/README.md
index 63aec5c46b..42e4619a59 100644
--- a/persistence-modules/spring-data-jpa-4/README.md
+++ b/persistence-modules/spring-data-jpa-4/README.md
@@ -3,6 +3,8 @@
- [LIKE Queries in Spring JPA Repositories](https://www.baeldung.com/spring-jpa-like-queries)
- [A Guide to Spring’s Open Session In View](https://www.baeldung.com/spring-open-session-in-view)
- [Programmatic Transaction Management in Spring](https://www.baeldung.com/spring-programmatic-transaction-management)
+- [JPA Entity Lifecycle Events](https://www.baeldung.com/jpa-entity-lifecycle-events)
+- [Working with Lazy Element Collections in JPA](https://www.baeldung.com/java-jpa-lazy-collections)
### Eclipse Config
After importing the project into Eclipse, you may see the following error:
diff --git a/persistence-modules/spring-data-jpa-4/pom.xml b/persistence-modules/spring-data-jpa-4/pom.xml
index 44b7c3c268..e0b441231e 100644
--- a/persistence-modules/spring-data-jpa-4/pom.xml
+++ b/persistence-modules/spring-data-jpa-4/pom.xml
@@ -27,12 +27,6 @@
com.h2database
h2
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
\ No newline at end of file
diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/ElementCollectionApplication.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/ElementCollectionApplication.java
new file mode 100644
index 0000000000..3f152a6ffc
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/ElementCollectionApplication.java
@@ -0,0 +1,11 @@
+package com.baeldung.elementcollection;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class ElementCollectionApplication {
+ public static void main(String[] args) {
+ SpringApplication.run(ElementCollectionApplication.class, args);
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/model/Employee.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/model/Employee.java
new file mode 100644
index 0000000000..8b98164d63
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/model/Employee.java
@@ -0,0 +1,68 @@
+package com.baeldung.elementcollection.model;
+
+import javax.persistence.*;
+import java.util.List;
+import java.util.Objects;
+
+@Entity
+public class Employee {
+ @Id
+ private int id;
+ private String name;
+ @ElementCollection
+ @CollectionTable(name = "employee_phone", joinColumns = @JoinColumn(name = "employee_id"))
+ private List phones;
+
+ public Employee() {
+ }
+
+ public Employee(int id) {
+ this.id = id;
+ }
+
+ public Employee(int id, String name) {
+ this.id = id;
+ this.name = name;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public List getPhones() {
+ return phones;
+ }
+
+ public void setPhones(List phones) {
+ this.phones = phones;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof Employee)) {
+ return false;
+ }
+ Employee user = (Employee) o;
+ return getId() == user.getId();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(getId());
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/model/Phone.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/model/Phone.java
new file mode 100644
index 0000000000..d73d30c47a
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/model/Phone.java
@@ -0,0 +1,62 @@
+package com.baeldung.elementcollection.model;
+
+import javax.persistence.Embeddable;
+import java.util.Objects;
+
+@Embeddable
+public class Phone {
+ private String type;
+ private String areaCode;
+ private String number;
+
+ public Phone() {
+ }
+
+ public Phone(String type, String areaCode, String number) {
+ this.type = type;
+ this.areaCode = areaCode;
+ this.number = number;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getAreaCode() {
+ return areaCode;
+ }
+
+ public void setAreaCode(String areaCode) {
+ this.areaCode = areaCode;
+ }
+
+ public String getNumber() {
+ return number;
+ }
+
+ public void setNumber(String number) {
+ this.number = number;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof Phone)) {
+ return false;
+ }
+ Phone phone = (Phone) o;
+ return getType().equals(phone.getType()) && getAreaCode().equals(phone.getAreaCode())
+ && getNumber().equals(phone.getNumber());
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(getType(), getAreaCode(), getNumber());
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/repository/EmployeeRepository.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/repository/EmployeeRepository.java
new file mode 100644
index 0000000000..49180c35eb
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/repository/EmployeeRepository.java
@@ -0,0 +1,46 @@
+package com.baeldung.elementcollection.repository;
+
+import com.baeldung.elementcollection.model.Employee;
+import org.springframework.stereotype.Repository;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.persistence.EntityGraph;
+import javax.persistence.EntityManager;
+import javax.persistence.PersistenceContext;
+import java.util.HashMap;
+import java.util.Map;
+
+@Repository
+public class EmployeeRepository {
+
+ @PersistenceContext
+ private EntityManager em;
+
+ @Transactional
+ public void save(Employee employee) {
+ em.persist(employee);
+ }
+
+ @Transactional
+ public void remove(int id) {
+ Employee employee = findById(id);
+ em.remove(employee);
+ }
+
+ public Employee findById(int id) {
+ return em.find(Employee.class, id);
+ }
+
+ public Employee findByJPQL(int id) {
+ return em.createQuery("SELECT u FROM Employee AS u JOIN FETCH u.phones WHERE u.id=:id", Employee.class)
+ .setParameter("id", id).getSingleResult();
+ }
+
+ public Employee findByEntityGraph(int id) {
+ EntityGraph entityGraph = em.createEntityGraph(Employee.class);
+ entityGraph.addAttributeNodes("name", "phones");
+ Map properties = new HashMap<>();
+ properties.put("javax.persistence.fetchgraph", entityGraph);
+ return em.find(Employee.class, id, properties);
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/SpringBootLifecycleEventApplication.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/SpringBootLifecycleEventApplication.java
new file mode 100644
index 0000000000..fbc861c5fe
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/SpringBootLifecycleEventApplication.java
@@ -0,0 +1,11 @@
+package com.baeldung.lifecycleevents;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class SpringBootLifecycleEventApplication {
+ public static void main(String[] args) {
+ SpringApplication.run(SpringBootLifecycleEventApplication.class, args);
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/model/AuditTrailListener.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/model/AuditTrailListener.java
new file mode 100644
index 0000000000..26ebff42e4
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/model/AuditTrailListener.java
@@ -0,0 +1,39 @@
+package com.baeldung.lifecycleevents.model;
+
+import javax.persistence.PostLoad;
+import javax.persistence.PostPersist;
+import javax.persistence.PostRemove;
+import javax.persistence.PostUpdate;
+import javax.persistence.PrePersist;
+import javax.persistence.PreRemove;
+import javax.persistence.PreUpdate;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class AuditTrailListener {
+ private static Log log = LogFactory.getLog(AuditTrailListener.class);
+
+ @PrePersist
+ @PreUpdate
+ @PreRemove
+ private void beforeAnyUpdate(User user) {
+ if (user.getId() == 0) {
+ log.info("[USER AUDIT] About to add a user");
+ } else {
+ log.info("[USER AUDIT] About to update/delete user: " + user.getId());
+ }
+ }
+
+ @PostPersist
+ @PostUpdate
+ @PostRemove
+ private void afterAnyUpdate(User user) {
+ log.info("[USER AUDIT] add/update/delete complete for user: " + user.getId());
+ }
+
+ @PostLoad
+ private void afterLoad(User user) {
+ log.info("[USER AUDIT] user loaded from database: " + user.getId());
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/model/User.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/model/User.java
new file mode 100644
index 0000000000..a080cb3bf2
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/model/User.java
@@ -0,0 +1,104 @@
+package com.baeldung.lifecycleevents.model;
+
+import javax.persistence.Entity;
+import javax.persistence.EntityListeners;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.PostLoad;
+import javax.persistence.PostPersist;
+import javax.persistence.PostRemove;
+import javax.persistence.PostUpdate;
+import javax.persistence.PrePersist;
+import javax.persistence.PreRemove;
+import javax.persistence.PreUpdate;
+import javax.persistence.Transient;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+@Entity
+@EntityListeners(AuditTrailListener.class)
+public class User {
+ private static Log log = LogFactory.getLog(User.class);
+
+ @Id
+ @GeneratedValue
+ private int id;
+
+ private String userName;
+ private String firstName;
+ private String lastName;
+ @Transient
+ private String fullName;
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public String getFullName() {
+ return fullName;
+ }
+
+ @PrePersist
+ public void logNewUserAttempt() {
+ log.info("Attempting to add new user with username: " + userName);
+ }
+
+ @PostPersist
+ public void logNewUserAdded() {
+ log.info("Added user '" + userName + "' with ID: " + id);
+ }
+
+ @PreRemove
+ public void logUserRemovalAttempt() {
+ log.info("Attempting to delete user: " + userName);
+ }
+
+ @PostRemove
+ public void logUserRemoval() {
+ log.info("Deleted user: " + userName);
+ }
+
+ @PreUpdate
+ public void logUserUpdateAttempt() {
+ log.info("Attempting to update user: " + userName);
+ }
+
+ @PostUpdate
+ public void logUserUpdate() {
+ log.info("Updated user: " + userName);
+ }
+
+ @PostLoad
+ public void logUserLoad() {
+ fullName = firstName + " " + lastName;
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/repository/UserRepository.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/repository/UserRepository.java
new file mode 100644
index 0000000000..af14117ebb
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/repository/UserRepository.java
@@ -0,0 +1,9 @@
+package com.baeldung.lifecycleevents.repository;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import com.baeldung.lifecycleevents.model.User;
+
+public interface UserRepository extends JpaRepository {
+ public User findByUserName(String userName);
+}
diff --git a/persistence-modules/spring-data-jpa-4/src/test/java/com/baeldung/elementcollection/ElementCollectionIntegrationTest.java b/persistence-modules/spring-data-jpa-4/src/test/java/com/baeldung/elementcollection/ElementCollectionIntegrationTest.java
new file mode 100644
index 0000000000..306798aa68
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-4/src/test/java/com/baeldung/elementcollection/ElementCollectionIntegrationTest.java
@@ -0,0 +1,64 @@
+package com.baeldung.elementcollection;
+
+import com.baeldung.elementcollection.model.Employee;
+import com.baeldung.elementcollection.model.Phone;
+import com.baeldung.elementcollection.repository.EmployeeRepository;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = ElementCollectionApplication.class)
+public class ElementCollectionIntegrationTest {
+
+ @Autowired
+ private EmployeeRepository employeeRepository;
+
+ @Before
+ public void init() {
+ Employee employee = new Employee(1, "Fred");
+ employee.setPhones(
+ Arrays.asList(new Phone("work", "+55", "99999-9999"), new Phone("home", "+55", "98888-8888")));
+ employeeRepository.save(employee);
+ }
+
+ @After
+ public void clean() {
+ employeeRepository.remove(1);
+ }
+
+ @Test(expected = org.hibernate.LazyInitializationException.class)
+ public void whenAccessLazyCollection_thenThrowLazyInitializationException() {
+ Employee employee = employeeRepository.findById(1);
+ assertThat(employee.getPhones().size(), is(2));
+ }
+
+ @Test
+ public void whenUseJPAQL_thenFetchResult() {
+ Employee employee = employeeRepository.findByJPQL(1);
+ assertThat(employee.getPhones().size(), is(2));
+ }
+
+ @Test
+ public void whenUseEntityGraph_thenFetchResult() {
+ Employee employee = employeeRepository.findByEntityGraph(1);
+ assertThat(employee.getPhones().size(), is(2));
+ }
+
+ @Test
+ @Transactional
+ public void whenUseTransaction_thenFetchResult() {
+ Employee employee = employeeRepository.findById(1);
+ assertThat(employee.getPhones().size(), is(2));
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-4/src/test/java/lifecycleevents/UserRepositoryIntegrationTest.java b/persistence-modules/spring-data-jpa-4/src/test/java/lifecycleevents/UserRepositoryIntegrationTest.java
new file mode 100644
index 0000000000..078f437474
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-4/src/test/java/lifecycleevents/UserRepositoryIntegrationTest.java
@@ -0,0 +1,80 @@
+package lifecycleevents;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import com.baeldung.lifecycleevents.SpringBootLifecycleEventApplication;
+import com.baeldung.lifecycleevents.model.User;
+import com.baeldung.lifecycleevents.repository.UserRepository;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = SpringBootLifecycleEventApplication.class)
+public class UserRepositoryIntegrationTest {
+
+ @Autowired
+ private UserRepository userRepository;
+
+ @Before
+ public void setup() {
+ User user = new User();
+ user.setFirstName("Jane");
+ user.setLastName("Smith");
+ user.setUserName("jsmith123");
+ userRepository.save(user);
+ }
+
+ @After
+ public void cleanup() {
+ userRepository.deleteAll();
+ }
+
+ @Test
+ public void whenNewUserProvided_userIsAdded() {
+ User user = new User();
+ user.setFirstName("John");
+ user.setLastName("Doe");
+ user.setUserName("jdoe123");
+ user = userRepository.save(user);
+ assertTrue(user.getId() > 0);
+ }
+
+ @Test
+ public void whenUserNameProvided_userIsLoaded() {
+ User user = userRepository.findByUserName("jsmith123");
+ assertNotNull(user);
+ assertEquals("jsmith123", user.getUserName());
+ }
+
+ @Test
+ public void whenExistingUserProvided_userIsUpdated() {
+ User user = userRepository.findByUserName("jsmith123");
+ user.setFirstName("Joe");
+ user = userRepository.save(user);
+ assertEquals("Joe", user.getFirstName());
+ }
+
+ @Test
+ public void whenExistingUserDeleted_userIsDeleted() {
+ User user = userRepository.findByUserName("jsmith123");
+ userRepository.delete(user);
+ user = userRepository.findByUserName("jsmith123");
+ assertNull(user);
+ }
+
+ @Test
+ public void whenExistingUserLoaded_fullNameIsAvailable() {
+ String expectedFullName = "Jane Smith";
+ User user = userRepository.findByUserName("jsmith123");
+ assertEquals(expectedFullName, user.getFullName());
+ }
+}
diff --git a/persistence-modules/spring-data-jpa/pom.xml b/persistence-modules/spring-data-jpa/pom.xml
index 27b8ce5eaf..ddd7e17dcd 100644
--- a/persistence-modules/spring-data-jpa/pom.xml
+++ b/persistence-modules/spring-data-jpa/pom.xml
@@ -1,7 +1,6 @@
-
+
4.0.0
spring-data-jpa
spring-data-jpa
@@ -43,7 +42,6 @@
org.postgresql
postgresql
- ${postgresql.version}
@@ -67,26 +65,6 @@
guava
${guava.version}
-
-
-
- org.junit.jupiter
- junit-jupiter-api
- test
-
-
- org.junit.jupiter
- junit-jupiter-engine
- test
-
-
-
-
- org.junit.platform
- junit-platform-launcher
- ${junit-platform.version}
- test
-
diff --git a/persistence-modules/spring-data-jpa/src/test/java/org/baeldung/SpringContextTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/SpringContextTest.java
similarity index 94%
rename from persistence-modules/spring-data-jpa/src/test/java/org/baeldung/SpringContextTest.java
rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/SpringContextTest.java
index db7b156415..eaccf4acba 100644
--- a/persistence-modules/spring-data-jpa/src/test/java/org/baeldung/SpringContextTest.java
+++ b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/SpringContextTest.java
@@ -1,4 +1,4 @@
-package org.baeldung;
+package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/persistence-modules/spring-data-jpa/src/test/java/org/baeldung/SpringJpaContextIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/SpringJpaContextIntegrationTest.java
similarity index 97%
rename from persistence-modules/spring-data-jpa/src/test/java/org/baeldung/SpringJpaContextIntegrationTest.java
rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/SpringJpaContextIntegrationTest.java
index 4a36407884..f3697bf39f 100644
--- a/persistence-modules/spring-data-jpa/src/test/java/org/baeldung/SpringJpaContextIntegrationTest.java
+++ b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/SpringJpaContextIntegrationTest.java
@@ -1,4 +1,4 @@
-package org.baeldung;
+package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java
index 17ee6a94ba..b2581b8034 100644
--- a/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java
+++ b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java
@@ -266,7 +266,7 @@ public class UserRepositoryCommon {
userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS));
userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS));
- List usersSortByName = userRepository.findAll(new Sort(Sort.Direction.ASC, "name"));
+ List usersSortByName = userRepository.findAll(Sort.by(Sort.Direction.ASC, "name"));
assertThat(usersSortByName.get(0)
.getName()).isEqualTo(USER_NAME_ADAM);
@@ -278,7 +278,7 @@ public class UserRepositoryCommon {
userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS));
userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS));
- userRepository.findAll(new Sort(Sort.Direction.ASC, "name"));
+ userRepository.findAll(Sort.by(Sort.Direction.ASC, "name"));
List usersSortByNameLength = userRepository.findAll(Sort.by("LENGTH(name)"));
diff --git a/persistence-modules/spring-data-keyvalue/README.md b/persistence-modules/spring-data-keyvalue/README.md
index 9f53a11b2c..93cde8ce93 100644
--- a/persistence-modules/spring-data-keyvalue/README.md
+++ b/persistence-modules/spring-data-keyvalue/README.md
@@ -3,4 +3,4 @@
This module contains articles about Spring Data Key-Value
### Relevant Articles:
-- [A Guide to Spring Data Key Value](http://www.baeldung.com/spring-data-key-value)
+- [A Guide to Spring Data Key Value](https://www.baeldung.com/spring-data-key-value)
diff --git a/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java b/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java
index 3eb1d0f66a..fe3c332f33 100644
--- a/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java
+++ b/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java
@@ -49,7 +49,7 @@ public class EmployeeServicesWithKeyValueTemplate implements EmployeeService {
@Override
public Iterable getSortedListOfEmployeesBySalary() {
KeyValueQuery query = new KeyValueQuery();
- query.setSort(new Sort(Sort.Direction.DESC, "salary"));
+ query.setSort(Sort.by(Sort.Direction.DESC, "salary"));
return keyValueTemplate.find(query, Employee.class);
}
diff --git a/persistence-modules/spring-data-keyvalue/src/test/java/org/baeldung/SpringContextTest.java b/persistence-modules/spring-data-keyvalue/src/test/java/com/baeldung/SpringContextTest.java
similarity index 95%
rename from persistence-modules/spring-data-keyvalue/src/test/java/org/baeldung/SpringContextTest.java
rename to persistence-modules/spring-data-keyvalue/src/test/java/com/baeldung/SpringContextTest.java
index e6cc5c15af..aca177d1a7 100644
--- a/persistence-modules/spring-data-keyvalue/src/test/java/org/baeldung/SpringContextTest.java
+++ b/persistence-modules/spring-data-keyvalue/src/test/java/com/baeldung/SpringContextTest.java
@@ -1,4 +1,4 @@
-package org.baeldung;
+package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/persistence-modules/spring-data-neo4j/README.md b/persistence-modules/spring-data-neo4j/README.md
index 03c9ed333d..dc54de0e31 100644
--- a/persistence-modules/spring-data-neo4j/README.md
+++ b/persistence-modules/spring-data-neo4j/README.md
@@ -1,8 +1,8 @@
## Spring Data Neo4j
### Relevant Articles:
-- [Introduction to Spring Data Neo4j](http://www.baeldung.com/spring-data-neo4j-intro)
-- [A Guide to Neo4J with Java](http://www.baeldung.com/java-neo4j)
+- [Introduction to Spring Data Neo4j](https://www.baeldung.com/spring-data-neo4j-intro)
+- [A Guide to Neo4J with Java](https://www.baeldung.com/java-neo4j)
### Build the Project with Tests Running
```
diff --git a/persistence-modules/spring-data-neo4j/pom.xml b/persistence-modules/spring-data-neo4j/pom.xml
index 625e2c5fc1..d827c32a3c 100644
--- a/persistence-modules/spring-data-neo4j/pom.xml
+++ b/persistence-modules/spring-data-neo4j/pom.xml
@@ -8,9 +8,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
diff --git a/persistence-modules/spring-data-neo4j/src/test/java/org/baeldung/SpringContextTest.java b/persistence-modules/spring-data-neo4j/src/test/java/com/baeldung/SpringContextTest.java
similarity index 96%
rename from persistence-modules/spring-data-neo4j/src/test/java/org/baeldung/SpringContextTest.java
rename to persistence-modules/spring-data-neo4j/src/test/java/com/baeldung/SpringContextTest.java
index 5bf54fc0bd..7029905c49 100644
--- a/persistence-modules/spring-data-neo4j/src/test/java/org/baeldung/SpringContextTest.java
+++ b/persistence-modules/spring-data-neo4j/src/test/java/com/baeldung/SpringContextTest.java
@@ -1,4 +1,4 @@
-package org.baeldung;
+package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/persistence-modules/spring-data-redis/README.md b/persistence-modules/spring-data-redis/README.md
index a20f5052f0..e4a528ae91 100644
--- a/persistence-modules/spring-data-redis/README.md
+++ b/persistence-modules/spring-data-redis/README.md
@@ -1,8 +1,8 @@
## Spring Data Redis
### Relevant Articles:
-- [Introduction to Spring Data Redis](http://www.baeldung.com/spring-data-redis-tutorial)
-- [PubSub Messaging with Spring Data Redis](http://www.baeldung.com/spring-data-redis-pub-sub)
+- [Introduction to Spring Data Redis](https://www.baeldung.com/spring-data-redis-tutorial)
+- [PubSub Messaging with Spring Data Redis](https://www.baeldung.com/spring-data-redis-pub-sub)
- [An Introduction to Spring Data Redis Reactive](https://www.baeldung.com/spring-data-redis-reactive)
### Build the Project with Tests Running
diff --git a/persistence-modules/spring-data-redis/pom.xml b/persistence-modules/spring-data-redis/pom.xml
index a304108fee..d2bf074d03 100644
--- a/persistence-modules/spring-data-redis/pom.xml
+++ b/persistence-modules/spring-data-redis/pom.xml
@@ -4,7 +4,7 @@
4.0.0
spring-data-redis
1.0
- spring-data-redis
+ spring-data-redis
jar
@@ -62,7 +62,6 @@
redis.clients
jedis
- ${jedis.version}
jar
@@ -97,10 +96,9 @@
3.2.4
- 2.9.0
0.10.0
- 2.0.3.RELEASE
0.6
+ 2.1.9.RELEASE
diff --git a/persistence-modules/spring-data-redis/src/test/java/org/baeldung/SpringContextTest.java b/persistence-modules/spring-data-redis/src/test/java/com/baeldung/SpringContextTest.java
similarity index 95%
rename from persistence-modules/spring-data-redis/src/test/java/org/baeldung/SpringContextTest.java
rename to persistence-modules/spring-data-redis/src/test/java/com/baeldung/SpringContextTest.java
index 6652345595..4df0cbd0ad 100644
--- a/persistence-modules/spring-data-redis/src/test/java/org/baeldung/SpringContextTest.java
+++ b/persistence-modules/spring-data-redis/src/test/java/com/baeldung/SpringContextTest.java
@@ -1,4 +1,4 @@
-package org.baeldung;
+package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/persistence-modules/spring-data-solr/README.md b/persistence-modules/spring-data-solr/README.md
index c282fd2ce7..3d58d2d44c 100644
--- a/persistence-modules/spring-data-solr/README.md
+++ b/persistence-modules/spring-data-solr/README.md
@@ -3,4 +3,4 @@
This module contains articles about Spring Data with Solr.
### Relevant Articles:
-- [Introduction to Spring Data Solr](http://www.baeldung.com/spring-data-solr)
+- [Introduction to Spring Data Solr](https://www.baeldung.com/spring-data-solr)
diff --git a/persistence-modules/spring-data-solr/pom.xml b/persistence-modules/spring-data-solr/pom.xml
index 1a17a2e321..9d96c75082 100644
--- a/persistence-modules/spring-data-solr/pom.xml
+++ b/persistence-modules/spring-data-solr/pom.xml
@@ -3,7 +3,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-data-solr
- 0.0.1-SNAPSHOT
spring-data-solr
jar
diff --git a/persistence-modules/spring-data-solr/src/test/java/org/baeldung/SpringContextTest.java b/persistence-modules/spring-data-solr/src/test/java/com/baeldung/SpringContextTest.java
similarity index 95%
rename from persistence-modules/spring-data-solr/src/test/java/org/baeldung/SpringContextTest.java
rename to persistence-modules/spring-data-solr/src/test/java/com/baeldung/SpringContextTest.java
index 09bf0255a0..f445a550a3 100644
--- a/persistence-modules/spring-data-solr/src/test/java/org/baeldung/SpringContextTest.java
+++ b/persistence-modules/spring-data-solr/src/test/java/com/baeldung/SpringContextTest.java
@@ -1,4 +1,4 @@
-package org.baeldung;
+package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/persistence-modules/spring-hibernate-3/README.md b/persistence-modules/spring-hibernate-3/README.md
index 898c6522a9..610d586f85 100644
--- a/persistence-modules/spring-hibernate-3/README.md
+++ b/persistence-modules/spring-hibernate-3/README.md
@@ -4,8 +4,8 @@ This module contains articles about Spring with Hibernate 3
### Relevant Articles:
-- [Hibernate 3 with Spring](http://www.baeldung.com/hibernate3-spring)
-- [HibernateException: No Hibernate Session Bound to Thread in Hibernate 3](http://www.baeldung.com/no-hibernate-session-bound-to-thread-exception)
+- [Hibernate 3 with Spring](https://www.baeldung.com/hibernate3-spring)
+- [HibernateException: No Hibernate Session Bound to Thread in Hibernate 3](https://www.baeldung.com/no-hibernate-session-bound-to-thread-exception)
### Quick Start
diff --git a/persistence-modules/spring-hibernate-3/pom.xml b/persistence-modules/spring-hibernate-3/pom.xml
index e677776a95..b28895f86d 100644
--- a/persistence-modules/spring-hibernate-3/pom.xml
+++ b/persistence-modules/spring-hibernate-3/pom.xml
@@ -8,9 +8,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
@@ -73,16 +72,6 @@
-
- spring-hibernate-3
-
-
- src/main/resources
- true
-
-
-
-
4.3.4.RELEASE
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/AbstractHibernateDao.java b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/AbstractHibernateDao.java
similarity index 97%
rename from persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/AbstractHibernateDao.java
rename to persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/AbstractHibernateDao.java
index 0f8b132891..701c6c43c7 100644
--- a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/AbstractHibernateDao.java
+++ b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/AbstractHibernateDao.java
@@ -1,4 +1,4 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.persistence.dao;
import java.io.Serializable;
import java.util.List;
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/EventDao.java b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/EventDao.java
similarity index 70%
rename from persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/EventDao.java
rename to persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/EventDao.java
index 74da643f35..e6519d54c8 100644
--- a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/EventDao.java
+++ b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/EventDao.java
@@ -1,18 +1,18 @@
-package org.baeldung.persistence.dao;
-
-
-import org.baeldung.persistence.model.Event;
-import org.springframework.stereotype.Repository;
-
-@Repository
-public class EventDao extends AbstractHibernateDao implements IEventDao {
-
- public EventDao() {
- super();
-
- setClazz(Event.class);
- }
-
- // API
-
-}
+package com.baeldung.persistence.dao;
+
+
+import com.baeldung.persistence.model.Event;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public class EventDao extends AbstractHibernateDao implements IEventDao {
+
+ public EventDao() {
+ super();
+
+ setClazz(Event.class);
+ }
+
+ // API
+
+}
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/FooDao.java b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/FooDao.java
similarity index 73%
rename from persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/FooDao.java
rename to persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/FooDao.java
index 23de04169e..afcd958bc2 100644
--- a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/FooDao.java
+++ b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/FooDao.java
@@ -1,6 +1,6 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.persistence.dao;
-import org.baeldung.persistence.model.Foo;
+import com.baeldung.persistence.model.Foo;
import org.springframework.stereotype.Repository;
@Repository
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/IEventDao.java b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/IEventDao.java
new file mode 100644
index 0000000000..da2be1ce1e
--- /dev/null
+++ b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/IEventDao.java
@@ -0,0 +1,8 @@
+package com.baeldung.persistence.dao;
+
+import com.baeldung.persistence.model.Event;
+
+
+public interface IEventDao extends IOperations {
+ //
+}
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/IFooDao.java b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/IFooDao.java
new file mode 100644
index 0000000000..f79883980a
--- /dev/null
+++ b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/IFooDao.java
@@ -0,0 +1,7 @@
+package com.baeldung.persistence.dao;
+
+import com.baeldung.persistence.model.Foo;
+
+public interface IFooDao extends IOperations {
+ //
+}
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/IOperations.java b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/IOperations.java
similarity index 89%
rename from persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/IOperations.java
rename to persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/IOperations.java
index 8c5a5e1aed..66f8008f27 100644
--- a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/IOperations.java
+++ b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/dao/IOperations.java
@@ -1,4 +1,4 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.persistence.dao;
import java.io.Serializable;
import java.util.List;
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/model/Event.java b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/model/Event.java
similarity index 89%
rename from persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/model/Event.java
rename to persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/model/Event.java
index 1d659ed75c..37a9758cd5 100644
--- a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/model/Event.java
+++ b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/model/Event.java
@@ -1,45 +1,45 @@
-package org.baeldung.persistence.model;
-
-import java.io.Serializable;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "EVENTS")
-public class Event implements Serializable {
-
- @Id
- @GeneratedValue
- private Long id;
-
- private String description;
-
- public Event() {
- }
-
-
- public Event(String description) {
- this.description = description;
- }
-
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
+package com.baeldung.persistence.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "EVENTS")
+public class Event implements Serializable {
+
+ @Id
+ @GeneratedValue
+ private Long id;
+
+ private String description;
+
+ public Event() {
+ }
+
+
+ public Event(String description) {
+ this.description = description;
+ }
+
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
}
\ No newline at end of file
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/model/Foo.java b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/model/Foo.java
similarity index 97%
rename from persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/model/Foo.java
rename to persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/model/Foo.java
index 8e1dee33e8..9af3d07bed 100644
--- a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/model/Foo.java
+++ b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/model/Foo.java
@@ -1,4 +1,4 @@
-package org.baeldung.persistence.model;
+package com.baeldung.persistence.model;
import java.io.Serializable;
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/service/EventService.java b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/service/EventService.java
similarity index 72%
rename from persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/service/EventService.java
rename to persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/service/EventService.java
index 6171751cc5..bf9afed38b 100644
--- a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/service/EventService.java
+++ b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/service/EventService.java
@@ -1,27 +1,27 @@
-package org.baeldung.persistence.service;
-
-
-import org.baeldung.persistence.dao.IEventDao;
-import org.baeldung.persistence.model.Event;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service
-@Transactional
-public class EventService {
-
- @Autowired
- private IEventDao dao;
-
- public EventService() {
- super();
- }
-
- // API
-
- public void create(final Event entity) {
- dao.create(entity);
- }
-
-}
+package com.baeldung.persistence.service;
+
+
+import com.baeldung.persistence.model.Event;
+import com.baeldung.persistence.dao.IEventDao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+@Transactional
+public class EventService {
+
+ @Autowired
+ private IEventDao dao;
+
+ public EventService() {
+ super();
+ }
+
+ // API
+
+ public void create(final Event entity) {
+ dao.create(entity);
+ }
+
+}
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/service/FooService.java b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/service/FooService.java
similarity index 75%
rename from persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/service/FooService.java
rename to persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/service/FooService.java
index b07698c438..ad88062216 100644
--- a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/service/FooService.java
+++ b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/persistence/service/FooService.java
@@ -1,7 +1,7 @@
-package org.baeldung.persistence.service;
+package com.baeldung.persistence.service;
-import org.baeldung.persistence.dao.IFooDao;
-import org.baeldung.persistence.model.Foo;
+import com.baeldung.persistence.dao.IFooDao;
+import com.baeldung.persistence.model.Foo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/spring/PersistenceConfig.java b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/spring/PersistenceConfig.java
similarity index 94%
rename from persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/spring/PersistenceConfig.java
rename to persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/spring/PersistenceConfig.java
index 03b9bfac33..29472174b2 100644
--- a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/spring/PersistenceConfig.java
+++ b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/spring/PersistenceConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring;
+package com.baeldung.spring;
import java.util.Properties;
@@ -22,7 +22,7 @@ import com.google.common.base.Preconditions;
@Configuration
@EnableTransactionManagement
@PropertySource({ "classpath:persistence-h2.properties" })
-@ComponentScan({ "org.baeldung.persistence.dao", "org.baeldung.persistence.service" })
+@ComponentScan({ "com.baeldung.persistence.dao", "com.baeldung.persistence.service" })
public class PersistenceConfig {
@Autowired
@@ -36,7 +36,7 @@ public class PersistenceConfig {
public AnnotationSessionFactoryBean sessionFactory() {
final AnnotationSessionFactoryBean sessionFactory = new AnnotationSessionFactoryBean();
sessionFactory.setDataSource(dataSource());
- sessionFactory.setPackagesToScan(new String[] { "org.baeldung.persistence.model" });
+ sessionFactory.setPackagesToScan(new String[] { "com.baeldung.persistence.model" });
sessionFactory.setHibernateProperties(hibernateProperties());
return sessionFactory;
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/spring/PersistenceConfigHibernate3.java b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/spring/PersistenceConfigHibernate3.java
similarity index 97%
rename from persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/spring/PersistenceConfigHibernate3.java
rename to persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/spring/PersistenceConfigHibernate3.java
index f38da21dc0..08ae9a76df 100644
--- a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/spring/PersistenceConfigHibernate3.java
+++ b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/spring/PersistenceConfigHibernate3.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring;
+package com.baeldung.spring;
import java.util.Properties;
@@ -24,7 +24,7 @@ import com.google.common.base.Preconditions;
@Configuration
@EnableTransactionManagement
@PropertySource({ "classpath:persistence-h2.properties" })
-@ComponentScan({ "org.baeldung.persistence.dao", "org.baeldung.persistence.service" })
+@ComponentScan({ "com.baeldung.persistence.dao", "com.baeldung.persistence.service" })
public class PersistenceConfigHibernate3 {
@Autowired
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/spring/PersistenceXmlConfig.java b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/spring/PersistenceXmlConfig.java
similarity index 82%
rename from persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/spring/PersistenceXmlConfig.java
rename to persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/spring/PersistenceXmlConfig.java
index 5831d2745c..798fb740a7 100644
--- a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/spring/PersistenceXmlConfig.java
+++ b/persistence-modules/spring-hibernate-3/src/main/java/com/baeldung/spring/PersistenceXmlConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring;
+package com.baeldung.spring;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;
@@ -6,7 +6,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
// @Configuration
@EnableTransactionManagement
-@ComponentScan({ "org.baeldung.persistence.dao", "org.baeldung.persistence.service" })
+@ComponentScan({ "com.baeldung.persistence.dao", "com.baeldung.persistence.service" })
@ImportResource({ "classpath:persistenceConfig.xml" })
public class PersistenceXmlConfig {
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/IEventDao.java b/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/IEventDao.java
deleted file mode 100644
index f7be705905..0000000000
--- a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/IEventDao.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.baeldung.persistence.dao;
-
-import org.baeldung.persistence.model.Event;
-
-
-
-public interface IEventDao extends IOperations {
- //
-}
diff --git a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/IFooDao.java b/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/IFooDao.java
deleted file mode 100644
index 6a3bd95d71..0000000000
--- a/persistence-modules/spring-hibernate-3/src/main/java/org/baeldung/persistence/dao/IFooDao.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.baeldung.persistence.dao;
-
-import org.baeldung.persistence.model.Foo;
-
-public interface IFooDao extends IOperations {
- //
-}
diff --git a/persistence-modules/spring-hibernate-3/src/main/resources/exceptionDemo.cfg.xml b/persistence-modules/spring-hibernate-3/src/main/resources/exceptionDemo.cfg.xml
index 8a710cc559..896c080983 100644
--- a/persistence-modules/spring-hibernate-3/src/main/resources/exceptionDemo.cfg.xml
+++ b/persistence-modules/spring-hibernate-3/src/main/resources/exceptionDemo.cfg.xml
@@ -4,6 +4,6 @@
"http://hibernate.org/dtd/hibernate-configuration-3.0.dtd">
-
+
diff --git a/persistence-modules/spring-hibernate-3/src/main/resources/exceptionDemoPersistenceConfig.xml b/persistence-modules/spring-hibernate-3/src/main/resources/exceptionDemoPersistenceConfig.xml
index 263e902e7c..5f9e8c0107 100644
--- a/persistence-modules/spring-hibernate-3/src/main/resources/exceptionDemoPersistenceConfig.xml
+++ b/persistence-modules/spring-hibernate-3/src/main/resources/exceptionDemoPersistenceConfig.xml
@@ -16,7 +16,7 @@
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
-
+
diff --git a/persistence-modules/spring-hibernate-3/src/main/resources/persistenceConfig.xml b/persistence-modules/spring-hibernate-3/src/main/resources/persistenceConfig.xml
index f39817383b..03d4d022e6 100644
--- a/persistence-modules/spring-hibernate-3/src/main/resources/persistenceConfig.xml
+++ b/persistence-modules/spring-hibernate-3/src/main/resources/persistenceConfig.xml
@@ -9,7 +9,7 @@
-
+
${hibernate.hbm2ddl.auto}
diff --git a/persistence-modules/spring-hibernate-3/src/main/webapp/WEB-INF/web.xml b/persistence-modules/spring-hibernate-3/src/main/webapp/WEB-INF/web.xml
index ad56bf28c7..69ce04fe06 100644
--- a/persistence-modules/spring-hibernate-3/src/main/webapp/WEB-INF/web.xml
+++ b/persistence-modules/spring-hibernate-3/src/main/webapp/WEB-INF/web.xml
@@ -11,7 +11,7 @@
contextConfigLocation
- org.baeldung.spring
+ com.baeldung.spring
org.springframework.web.context.ContextLoaderListener
diff --git a/persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/SpringContextTest.java b/persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/SpringContextTest.java
similarity index 88%
rename from persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/SpringContextTest.java
rename to persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/SpringContextTest.java
index 956d5279a3..8b352b490d 100644
--- a/persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/SpringContextTest.java
+++ b/persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/SpringContextTest.java
@@ -1,6 +1,6 @@
-package org.baeldung;
+package com.baeldung;
-import org.baeldung.spring.PersistenceConfig;
+import com.baeldung.spring.PersistenceConfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
diff --git a/persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/FooServicePersistenceIntegrationTest.java b/persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/FooServicePersistenceIntegrationTest.java
similarity index 91%
rename from persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/FooServicePersistenceIntegrationTest.java
rename to persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/FooServicePersistenceIntegrationTest.java
index b6e4a5592f..7874f7c679 100644
--- a/persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/FooServicePersistenceIntegrationTest.java
+++ b/persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/FooServicePersistenceIntegrationTest.java
@@ -1,10 +1,9 @@
-package org.baeldung.persistence.service;
+package com.baeldung.persistence.service;
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
-import org.baeldung.persistence.model.Foo;
-import org.baeldung.persistence.service.FooService;
-import org.baeldung.spring.PersistenceConfig;
+import com.baeldung.spring.PersistenceConfig;
+import com.baeldung.persistence.model.Foo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen1MainIntegrationTest.java b/persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/HibernateExceptionScen1MainIntegrationTest.java
similarity index 90%
rename from persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen1MainIntegrationTest.java
rename to persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/HibernateExceptionScen1MainIntegrationTest.java
index 08032660c0..99dc7b42be 100644
--- a/persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen1MainIntegrationTest.java
+++ b/persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/HibernateExceptionScen1MainIntegrationTest.java
@@ -1,7 +1,7 @@
-package org.baeldung.persistence.service;
+package com.baeldung.persistence.service;
-import org.baeldung.persistence.model.Event;
-import org.baeldung.spring.PersistenceConfigHibernate3;
+import com.baeldung.persistence.model.Event;
+import com.baeldung.spring.PersistenceConfigHibernate3;
import org.hamcrest.core.IsInstanceOf;
import org.hibernate.HibernateException;
import org.junit.Ignore;
diff --git a/persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen2MainIntegrationTest.java b/persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/HibernateExceptionScen2MainIntegrationTest.java
similarity index 91%
rename from persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen2MainIntegrationTest.java
rename to persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/HibernateExceptionScen2MainIntegrationTest.java
index 44cc6ca010..d3e475a244 100644
--- a/persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen2MainIntegrationTest.java
+++ b/persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/HibernateExceptionScen2MainIntegrationTest.java
@@ -1,7 +1,7 @@
-package org.baeldung.persistence.service;
+package com.baeldung.persistence.service;
-import org.baeldung.persistence.model.Event;
-import org.baeldung.spring.PersistenceConfig;
+import com.baeldung.persistence.model.Event;
+import com.baeldung.spring.PersistenceConfig;
import org.hamcrest.core.IsInstanceOf;
import org.hibernate.HibernateException;
import org.junit.Ignore;
diff --git a/persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/NoHibernateSessBoundUsingAnnoSessionBeanMainIntegrationTest.java b/persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/NoHibernateSessBoundUsingAnnoSessionBeanMainIntegrationTest.java
similarity index 88%
rename from persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/NoHibernateSessBoundUsingAnnoSessionBeanMainIntegrationTest.java
rename to persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/NoHibernateSessBoundUsingAnnoSessionBeanMainIntegrationTest.java
index 2b29dcb7a9..d1c5cc04e6 100644
--- a/persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/NoHibernateSessBoundUsingAnnoSessionBeanMainIntegrationTest.java
+++ b/persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/NoHibernateSessBoundUsingAnnoSessionBeanMainIntegrationTest.java
@@ -1,42 +1,42 @@
-package org.baeldung.persistence.service;
-
-import org.baeldung.persistence.model.Event;
-import org.baeldung.spring.PersistenceXmlConfig;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.orm.hibernate3.HibernateSystemException;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.support.AnnotationConfigContextLoader;
-
-
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(classes = { PersistenceXmlConfig.class }, loader = AnnotationConfigContextLoader.class)
-public class NoHibernateSessBoundUsingAnnoSessionBeanMainIntegrationTest {
-
- @Autowired
- EventService service;
-
- @Rule
- public ExpectedException expectedEx = ExpectedException.none();
-
- @Test
- public final void whenEntityIsCreated_thenNoExceptions() {
- service.create(new Event("from Annotation Session Bean Factory"));
- }
-
- @Test
- @Ignore
- public final void whenNoTransBoundToSession_thenException() {
- expectedEx.expect(HibernateSystemException.class);
- expectedEx.expectMessage("No Hibernate Session bound to thread, "
- + "and configuration does not allow creation of "
- + "non-transactional one here");
- service.create(new Event("from Annotation Session Bean Factory"));
- }
-
-}
+package com.baeldung.persistence.service;
+
+import com.baeldung.persistence.model.Event;
+import com.baeldung.spring.PersistenceXmlConfig;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.orm.hibernate3.HibernateSystemException;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.support.AnnotationConfigContextLoader;
+
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(classes = { PersistenceXmlConfig.class }, loader = AnnotationConfigContextLoader.class)
+public class NoHibernateSessBoundUsingAnnoSessionBeanMainIntegrationTest {
+
+ @Autowired
+ EventService service;
+
+ @Rule
+ public ExpectedException expectedEx = ExpectedException.none();
+
+ @Test
+ public final void whenEntityIsCreated_thenNoExceptions() {
+ service.create(new Event("from Annotation Session Bean Factory"));
+ }
+
+ @Test
+ @Ignore
+ public final void whenNoTransBoundToSession_thenException() {
+ expectedEx.expect(HibernateSystemException.class);
+ expectedEx.expectMessage("No Hibernate Session bound to thread, "
+ + "and configuration does not allow creation of "
+ + "non-transactional one here");
+ service.create(new Event("from Annotation Session Bean Factory"));
+ }
+
+}
diff --git a/persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/NoHibernateSessBoundUsingLocalSessionBeanMainIntegrationTest.java b/persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/NoHibernateSessBoundUsingLocalSessionBeanMainIntegrationTest.java
similarity index 86%
rename from persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/NoHibernateSessBoundUsingLocalSessionBeanMainIntegrationTest.java
rename to persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/NoHibernateSessBoundUsingLocalSessionBeanMainIntegrationTest.java
index 1bc6c07b18..1df6aa172c 100644
--- a/persistence-modules/spring-hibernate-3/src/test/java/org/baeldung/persistence/service/NoHibernateSessBoundUsingLocalSessionBeanMainIntegrationTest.java
+++ b/persistence-modules/spring-hibernate-3/src/test/java/com/baeldung/persistence/service/NoHibernateSessBoundUsingLocalSessionBeanMainIntegrationTest.java
@@ -1,39 +1,38 @@
-package org.baeldung.persistence.service;
-
-import org.baeldung.persistence.model.Event;
-import org.hibernate.HibernateException;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.orm.hibernate3.HibernateSystemException;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(locations = { "classpath:exceptionDemoPersistenceConfig.xml" })
-public class NoHibernateSessBoundUsingLocalSessionBeanMainIntegrationTest {
-
- @Autowired
- EventService service;
-
- @Rule
- public ExpectedException expectedEx = ExpectedException.none();
-
- @Test
- public final void whenEntityIsCreated_thenNoExceptions() {
- service.create(new Event("from local session bean factory"));
- }
-
- @Test
- @Ignore
- public final void whenNoTransBoundToSession_thenException() {
- expectedEx.expect(HibernateException.class);
- expectedEx.expectMessage("No Hibernate Session bound to thread, "
- + "and configuration does not allow creation "
- + "of non-transactional one here");
- service.create(new Event("from local session bean factory"));
- }
-}
+package com.baeldung.persistence.service;
+
+import com.baeldung.persistence.model.Event;
+import org.hibernate.HibernateException;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = { "classpath:exceptionDemoPersistenceConfig.xml" })
+public class NoHibernateSessBoundUsingLocalSessionBeanMainIntegrationTest {
+
+ @Autowired
+ EventService service;
+
+ @Rule
+ public ExpectedException expectedEx = ExpectedException.none();
+
+ @Test
+ public final void whenEntityIsCreated_thenNoExceptions() {
+ service.create(new Event("from local session bean factory"));
+ }
+
+ @Test
+ @Ignore
+ public final void whenNoTransBoundToSession_thenException() {
+ expectedEx.expect(HibernateException.class);
+ expectedEx.expectMessage("No Hibernate Session bound to thread, "
+ + "and configuration does not allow creation "
+ + "of non-transactional one here");
+ service.create(new Event("from local session bean factory"));
+ }
+}
diff --git a/persistence-modules/spring-hibernate-5/README.md b/persistence-modules/spring-hibernate-5/README.md
index a74600a47f..c3c8fa7b9f 100644
--- a/persistence-modules/spring-hibernate-5/README.md
+++ b/persistence-modules/spring-hibernate-5/README.md
@@ -4,11 +4,11 @@ This module contains articles about Hibernate 5 with Spring.
### Relevant articles
-- [Hibernate Many to Many Annotation Tutorial](http://www.baeldung.com/hibernate-many-to-many)
-- [Programmatic Transactions in the Spring TestContext Framework](http://www.baeldung.com/spring-test-programmatic-transactions)
-- [JPA Criteria Queries](http://www.baeldung.com/hibernate-criteria-queries)
-- [Introduction to Hibernate Search](http://www.baeldung.com/hibernate-search)
+- [Hibernate Many to Many Annotation Tutorial](https://www.baeldung.com/hibernate-many-to-many)
+- [Programmatic Transactions in the Spring TestContext Framework](https://www.baeldung.com/spring-test-programmatic-transactions)
+- [JPA Criteria Queries](https://www.baeldung.com/hibernate-criteria-queries)
+- [Introduction to Hibernate Search](https://www.baeldung.com/hibernate-search)
- [@DynamicUpdate with Spring Data JPA](https://www.baeldung.com/spring-data-jpa-dynamicupdate)
-- [Hibernate Second-Level Cache](http://www.baeldung.com/hibernate-second-level-cache)
-- [Deleting Objects with Hibernate](http://www.baeldung.com/delete-with-hibernate)
-- [Spring, Hibernate and a JNDI Datasource](http://www.baeldung.com/spring-persistence-jpa-jndi-datasource)
+- [Hibernate Second-Level Cache](https://www.baeldung.com/hibernate-second-level-cache)
+- [Deleting Objects with Hibernate](https://www.baeldung.com/delete-with-hibernate)
+- [Spring, Hibernate and a JNDI Datasource](https://www.baeldung.com/spring-persistence-jpa-jndi-datasource)
diff --git a/persistence-modules/spring-hibernate-5/pom.xml b/persistence-modules/spring-hibernate-5/pom.xml
index 546dcb1ce0..8a8b6c15e3 100644
--- a/persistence-modules/spring-hibernate-5/pom.xml
+++ b/persistence-modules/spring-hibernate-5/pom.xml
@@ -8,9 +8,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
@@ -125,16 +124,6 @@
-
- spring-hibernate-5
-
-
- src/main/resources
- true
-
-
-
-
5.0.2.RELEASE
diff --git a/persistence-modules/spring-hibernate-5/src/test/java/org/baeldung/SpringContextTest.java b/persistence-modules/spring-hibernate-5/src/test/java/com/baeldung/SpringContextTest.java
similarity index 96%
rename from persistence-modules/spring-hibernate-5/src/test/java/org/baeldung/SpringContextTest.java
rename to persistence-modules/spring-hibernate-5/src/test/java/com/baeldung/SpringContextTest.java
index 6815ebf304..e19965773e 100644
--- a/persistence-modules/spring-hibernate-5/src/test/java/org/baeldung/SpringContextTest.java
+++ b/persistence-modules/spring-hibernate-5/src/test/java/com/baeldung/SpringContextTest.java
@@ -1,4 +1,4 @@
-package org.baeldung;
+package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/persistence-modules/spring-hibernate4/README.md b/persistence-modules/spring-hibernate4/README.md
index c9e2b5abfc..cfa13ca3b0 100644
--- a/persistence-modules/spring-hibernate4/README.md
+++ b/persistence-modules/spring-hibernate4/README.md
@@ -3,13 +3,13 @@
This module contains articles about Spring with Hibernate 4
### Relevant Articles:
-- [Guide to Hibernate 4 with Spring](http://www.baeldung.com/hibernate-4-spring)
-- [Hibernate Pagination](http://www.baeldung.com/hibernate-pagination)
-- [Sorting with Hibernate](http://www.baeldung.com/hibernate-sort)
-- [Stored Procedures with Hibernate](http://www.baeldung.com/stored-procedures-with-hibernate-tutorial)
-- [Hibernate: save, persist, update, merge, saveOrUpdate](http://www.baeldung.com/hibernate-save-persist-update-merge-saveorupdate)
-- [Eager/Lazy Loading In Hibernate](http://www.baeldung.com/hibernate-lazy-eager-loading)
-- [The DAO with Spring and Hibernate](http://www.baeldung.com/persistence-layer-with-spring-and-hibernate)
+- [Guide to Hibernate 4 with Spring](https://www.baeldung.com/hibernate-4-spring)
+- [Hibernate Pagination](https://www.baeldung.com/hibernate-pagination)
+- [Sorting with Hibernate](https://www.baeldung.com/hibernate-sort)
+- [Stored Procedures with Hibernate](https://www.baeldung.com/stored-procedures-with-hibernate-tutorial)
+- [Hibernate: save, persist, update, merge, saveOrUpdate](https://www.baeldung.com/hibernate-save-persist-update-merge-saveorupdate)
+- [Eager/Lazy Loading In Hibernate](https://www.baeldung.com/hibernate-lazy-eager-loading)
+- [The DAO with Spring and Hibernate](https://www.baeldung.com/persistence-layer-with-spring-and-hibernate)
- [Auditing with JPA, Hibernate, and Spring Data JPA](https://www.baeldung.com/database-auditing-jpa)
### Quick Start
diff --git a/persistence-modules/spring-hibernate4/pom.xml b/persistence-modules/spring-hibernate4/pom.xml
index 41c7fdb098..5e931d5cff 100644
--- a/persistence-modules/spring-hibernate4/pom.xml
+++ b/persistence-modules/spring-hibernate4/pom.xml
@@ -136,16 +136,6 @@
-
- spring-hibernate4
-
-
- src/main/resources
- true
-
-
-
-
4.3.4.RELEASE
@@ -166,15 +156,6 @@
19.0
-
- 4.4.1
- 4.5
-
- 2.9.0
-
-
- 2.7
-
diff --git a/persistence-modules/spring-hibernate4/src/test/java/org/baeldung/SpringContextTest.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/SpringContextTest.java
similarity index 96%
rename from persistence-modules/spring-hibernate4/src/test/java/org/baeldung/SpringContextTest.java
rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/SpringContextTest.java
index 6815ebf304..e19965773e 100644
--- a/persistence-modules/spring-hibernate4/src/test/java/org/baeldung/SpringContextTest.java
+++ b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/SpringContextTest.java
@@ -1,4 +1,4 @@
-package org.baeldung;
+package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/persistence-modules/spring-jpa/README.md b/persistence-modules/spring-jpa/README.md
index 489d990fc3..27a2fe8368 100644
--- a/persistence-modules/spring-jpa/README.md
+++ b/persistence-modules/spring-jpa/README.md
@@ -4,13 +4,13 @@
### Relevant Articles:
-- [The DAO with JPA and Spring](http://www.baeldung.com/spring-dao-jpa)
-- [JPA Pagination](http://www.baeldung.com/jpa-pagination)
-- [Sorting with JPA](http://www.baeldung.com/jpa-sort)
-- [Self-Contained Testing Using an In-Memory Database](http://www.baeldung.com/spring-jpa-test-in-memory-database)
-- [A Guide to Spring AbstractRoutingDatasource](http://www.baeldung.com/spring-abstract-routing-data-source)
-- [Obtaining Auto-generated Keys in Spring JDBC](http://www.baeldung.com/spring-jdbc-autogenerated-keys)
-- [Transactions with Spring 4 and JPA](http://www.baeldung.com/transaction-configuration-with-jpa-and-spring)
+- [The DAO with JPA and Spring](https://www.baeldung.com/spring-dao-jpa)
+- [JPA Pagination](https://www.baeldung.com/jpa-pagination)
+- [Sorting with JPA](https://www.baeldung.com/jpa-sort)
+- [Self-Contained Testing Using an In-Memory Database](https://www.baeldung.com/spring-jpa-test-in-memory-database)
+- [A Guide to Spring AbstractRoutingDatasource](https://www.baeldung.com/spring-abstract-routing-data-source)
+- [Obtaining Auto-generated Keys in Spring JDBC](https://www.baeldung.com/spring-jdbc-autogenerated-keys)
+- [Transactions with Spring 4 and JPA](https://www.baeldung.com/transaction-configuration-with-jpa-and-spring)
- [Use Criteria Queries in a Spring Data Application](https://www.baeldung.com/spring-data-criteria-queries)
- [Many-To-Many Relationship in JPA](https://www.baeldung.com/jpa-many-to-many)
- [Spring Persistence (Hibernate and JPA) with a JNDI datasource](https://www.baeldung.com/spring-persistence-hibernate-and-jpa-with-a-jndi-datasource/)
diff --git a/persistence-modules/spring-jpa/pom.xml b/persistence-modules/spring-jpa/pom.xml
index 4972a20cf6..ef05269c92 100644
--- a/persistence-modules/spring-jpa/pom.xml
+++ b/persistence-modules/spring-jpa/pom.xml
@@ -9,9 +9,8 @@
com.baeldung
- parent-modules
+ persistence-modules
1.0.0-SNAPSHOT
- ../../
@@ -129,27 +128,6 @@
-
- spring-jpa
-
-
- src/main/resources
- true
-
-
-
-
- org.apache.maven.plugins
- maven-war-plugin
- ${maven-war-plugin.version}
-
- src/main/webapp
- false
-
-
-
-
-
5.1.5.RELEASE
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/annotations/MyUtilityRepository.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/annotations/MyUtilityRepository.java
similarity index 90%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/annotations/MyUtilityRepository.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/annotations/MyUtilityRepository.java
index 5fe54b80d9..a23e9d9fe4 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/annotations/MyUtilityRepository.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/annotations/MyUtilityRepository.java
@@ -1,4 +1,4 @@
-package org.baeldung.annotations;
+package com.baeldung.annotations;
import java.io.Serializable;
import java.util.Optional;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/annotations/Person.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/annotations/Person.java
similarity index 93%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/annotations/Person.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/annotations/Person.java
index 309a4f43e1..b881535e05 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/annotations/Person.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/annotations/Person.java
@@ -1,4 +1,4 @@
-package org.baeldung.annotations;
+package com.baeldung.annotations;
import java.util.Date;
@@ -8,7 +8,7 @@ import javax.persistence.NamedStoredProcedureQuery;
import javax.persistence.ParameterMode;
import javax.persistence.StoredProcedureParameter;
-import org.baeldung.persistence.multiple.model.user.User;
+import com.baeldung.persistence.multiple.model.user.User;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/annotations/PersonRepository.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/annotations/PersonRepository.java
similarity index 96%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/annotations/PersonRepository.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/annotations/PersonRepository.java
index 58558860ff..77b7067f11 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/annotations/PersonRepository.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/annotations/PersonRepository.java
@@ -1,4 +1,4 @@
-package org.baeldung.annotations;
+package com.baeldung.annotations;
import javax.persistence.LockModeType;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/config/PersistenceJPAConfig.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/config/PersistenceJPAConfig.java
similarity index 94%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/config/PersistenceJPAConfig.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/config/PersistenceJPAConfig.java
index ec0d4bca3c..4eda4d9274 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/config/PersistenceJPAConfig.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/config/PersistenceJPAConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.config;
+package com.baeldung.config;
import java.util.Properties;
@@ -25,8 +25,8 @@ import com.google.common.base.Preconditions;
@Configuration
@EnableTransactionManagement
@PropertySource({ "classpath:persistence-h2.properties" })
-@ComponentScan({ "org.baeldung.persistence" })
-@EnableJpaRepositories(basePackages = "org.baeldung.persistence.dao")
+@ComponentScan({ "com.baeldung.persistence" })
+@EnableJpaRepositories(basePackages = "com.baeldung.persistence.dao")
public class PersistenceJPAConfig {
@Autowired
@@ -42,7 +42,7 @@ public class PersistenceJPAConfig {
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource());
- em.setPackagesToScan(new String[] { "org.baeldung.persistence.model" });
+ em.setPackagesToScan(new String[] { "com.baeldung.persistence.model" });
final HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
em.setJpaVendorAdapter(vendorAdapter);
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/config/PersistenceJPAConfigXml.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/config/PersistenceJPAConfigXml.java
similarity index 84%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/config/PersistenceJPAConfigXml.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/config/PersistenceJPAConfigXml.java
index 3df36e62ee..95224a4662 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/config/PersistenceJPAConfigXml.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/config/PersistenceJPAConfigXml.java
@@ -1,4 +1,4 @@
-package org.baeldung.config;
+package com.baeldung.config;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;
@@ -6,7 +6,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
// @Configuration
@EnableTransactionManagement
-@ComponentScan({ "org.baeldung.persistence" })
+@ComponentScan({ "com.baeldung.persistence" })
@ImportResource({ "classpath:jpaConfig.xml" })
public class PersistenceJPAConfigXml {
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/config/SpringWebConfig.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/config/SpringWebConfig.java
similarity index 92%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/config/SpringWebConfig.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/config/SpringWebConfig.java
index 6afb271b10..475970d1f0 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/config/SpringWebConfig.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/config/SpringWebConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.config;
+package com.baeldung.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@@ -10,7 +10,7 @@ import org.springframework.web.servlet.view.JstlView;
@EnableWebMvc
@Configuration
-@ComponentScan({ "org.baeldung.web" })
+@ComponentScan({ "com.baeldung.web" })
public class SpringWebConfig extends WebMvcConfigurerAdapter {
@Bean
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/config/StudentJpaConfig.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/config/StudentJpaConfig.java
similarity index 94%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/config/StudentJpaConfig.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/config/StudentJpaConfig.java
index 17047cbab2..08f37ea806 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/config/StudentJpaConfig.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/config/StudentJpaConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.config;
+package com.baeldung.config;
import java.util.Properties;
@@ -18,7 +18,7 @@ import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@Configuration
-@EnableJpaRepositories(basePackages = "org.baeldung.inmemory.persistence.dao")
+@EnableJpaRepositories(basePackages = "com.baeldung.inmemory.persistence.dao")
@PropertySource("persistence-student.properties")
@EnableTransactionManagement
public class StudentJpaConfig {
@@ -41,7 +41,7 @@ public class StudentJpaConfig {
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource());
- em.setPackagesToScan(new String[] { "org.baeldung.inmemory.persistence.model" });
+ em.setPackagesToScan(new String[] { "com.baeldung.inmemory.persistence.model" });
em.setJpaVendorAdapter(new HibernateJpaVendorAdapter());
em.setJpaProperties(additionalProperties());
return em;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/config/WebInitializer.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/config/WebInitializer.java
similarity index 95%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/config/WebInitializer.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/config/WebInitializer.java
index cf6e69eb39..be81cca76b 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/config/WebInitializer.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/config/WebInitializer.java
@@ -1,4 +1,4 @@
-package org.baeldung.config;
+package com.baeldung.config;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientDao.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientDao.java
similarity index 95%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientDao.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientDao.java
index 9e19cf4ed9..e8117ba4fa 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientDao.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientDao.java
@@ -1,4 +1,4 @@
-package org.baeldung.dsrouting;
+package com.baeldung.dsrouting;
import javax.sql.DataSource;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientDataSourceRouter.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientDataSourceRouter.java
similarity index 91%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientDataSourceRouter.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientDataSourceRouter.java
index 997e461cde..a9f5d83b55 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientDataSourceRouter.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientDataSourceRouter.java
@@ -1,4 +1,4 @@
-package org.baeldung.dsrouting;
+package com.baeldung.dsrouting;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientDatabase.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientDatabase.java
similarity index 64%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientDatabase.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientDatabase.java
index 619b8707d8..d8d178a4d5 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientDatabase.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientDatabase.java
@@ -1,4 +1,4 @@
-package org.baeldung.dsrouting;
+package com.baeldung.dsrouting;
public enum ClientDatabase {
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientDatabaseContextHolder.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientDatabaseContextHolder.java
similarity index 95%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientDatabaseContextHolder.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientDatabaseContextHolder.java
index c08559e877..ae5d16cad2 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientDatabaseContextHolder.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientDatabaseContextHolder.java
@@ -1,4 +1,4 @@
-package org.baeldung.dsrouting;
+package com.baeldung.dsrouting;
import org.springframework.util.Assert;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientService.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientService.java
similarity index 94%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientService.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientService.java
index 4b63c6333c..59b3d1660a 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/dsrouting/ClientService.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/dsrouting/ClientService.java
@@ -1,4 +1,4 @@
-package org.baeldung.dsrouting;
+package com.baeldung.dsrouting;
/**
* Service layer code for datasource routing example. Here, the service methods are responsible
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/dao/ManyStudentRepository.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/dao/ManyStudentRepository.java
similarity index 68%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/dao/ManyStudentRepository.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/dao/ManyStudentRepository.java
index a03b2950a0..a2aa0c5780 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/dao/ManyStudentRepository.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/dao/ManyStudentRepository.java
@@ -1,6 +1,6 @@
-package org.baeldung.inmemory.persistence.dao;
+package com.baeldung.inmemory.persistence.dao;
-import org.baeldung.inmemory.persistence.model.ManyStudent;
+import com.baeldung.inmemory.persistence.model.ManyStudent;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/dao/ManyTagRepository.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/dao/ManyTagRepository.java
similarity index 57%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/dao/ManyTagRepository.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/dao/ManyTagRepository.java
index b7d991de32..63337f3cb9 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/dao/ManyTagRepository.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/dao/ManyTagRepository.java
@@ -1,6 +1,6 @@
-package org.baeldung.inmemory.persistence.dao;
+package com.baeldung.inmemory.persistence.dao;
-import org.baeldung.inmemory.persistence.model.ManyTag;
+import com.baeldung.inmemory.persistence.model.ManyTag;
import org.springframework.data.jpa.repository.JpaRepository;
public interface ManyTagRepository extends JpaRepository {
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/dao/StudentRepository.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/dao/StudentRepository.java
similarity index 90%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/dao/StudentRepository.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/dao/StudentRepository.java
index ffe1a68558..8ac91fbf0c 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/dao/StudentRepository.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/dao/StudentRepository.java
@@ -1,6 +1,6 @@
-package org.baeldung.inmemory.persistence.dao;
+package com.baeldung.inmemory.persistence.dao;
-import org.baeldung.inmemory.persistence.model.Student;
+import com.baeldung.inmemory.persistence.model.Student;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/KVTag.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/KVTag.java
similarity index 91%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/KVTag.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/KVTag.java
index 1522744116..1fc186f4ce 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/KVTag.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/KVTag.java
@@ -1,4 +1,4 @@
-package org.baeldung.inmemory.persistence.model;
+package com.baeldung.inmemory.persistence.model;
import javax.persistence.Embeddable;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/LocationTag.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/LocationTag.java
similarity index 92%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/LocationTag.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/LocationTag.java
index 3acdbbe6fe..b12ad9fbd1 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/LocationTag.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/LocationTag.java
@@ -1,4 +1,4 @@
-package org.baeldung.inmemory.persistence.model;
+package com.baeldung.inmemory.persistence.model;
import javax.persistence.Embeddable;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/ManyStudent.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/ManyStudent.java
similarity index 94%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/ManyStudent.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/ManyStudent.java
index 8343edc9cd..190740d582 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/ManyStudent.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/ManyStudent.java
@@ -1,4 +1,4 @@
-package org.baeldung.inmemory.persistence.model;
+package com.baeldung.inmemory.persistence.model;
import javax.persistence.*;
import java.util.HashSet;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/ManyTag.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/ManyTag.java
similarity index 93%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/ManyTag.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/ManyTag.java
index e820506544..5af898f7df 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/ManyTag.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/ManyTag.java
@@ -1,4 +1,4 @@
-package org.baeldung.inmemory.persistence.model;
+package com.baeldung.inmemory.persistence.model;
import javax.persistence.*;
import java.util.HashSet;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/SkillTag.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/SkillTag.java
similarity index 90%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/SkillTag.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/SkillTag.java
index 490ee0a18e..738b5d0b36 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/SkillTag.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/SkillTag.java
@@ -1,4 +1,4 @@
-package org.baeldung.inmemory.persistence.model;
+package com.baeldung.inmemory.persistence.model;
import javax.persistence.Embeddable;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/Student.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/Student.java
similarity index 96%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/Student.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/Student.java
index 07aa3ef9ef..f0e824e165 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/inmemory/persistence/model/Student.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/inmemory/persistence/model/Student.java
@@ -1,4 +1,4 @@
-package org.baeldung.inmemory.persistence.model;
+package com.baeldung.inmemory.persistence.model;
import java.util.ArrayList;
import java.util.List;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/AbstractJpaDAO.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/AbstractJpaDAO.java
similarity index 96%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/AbstractJpaDAO.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/AbstractJpaDAO.java
index 13007d9fcc..b4827cc7e1 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/AbstractJpaDAO.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/AbstractJpaDAO.java
@@ -1,4 +1,4 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.persistence.dao;
import java.io.Serializable;
import java.util.List;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookRepository.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookRepository.java
similarity index 76%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookRepository.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookRepository.java
index 114cf48c7c..48620f4ff1 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookRepository.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookRepository.java
@@ -1,6 +1,6 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.persistence.dao;
-import org.baeldung.persistence.model.Book;
+import com.baeldung.persistence.model.Book;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookRepositoryCustom.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookRepositoryCustom.java
similarity index 65%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookRepositoryCustom.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookRepositoryCustom.java
index b939907572..1b46d0ecc3 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookRepositoryCustom.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookRepositoryCustom.java
@@ -1,8 +1,8 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.persistence.dao;
import java.util.List;
-import org.baeldung.persistence.model.Book;
+import com.baeldung.persistence.model.Book;
public interface BookRepositoryCustom {
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookRepositoryImpl.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookRepositoryImpl.java
similarity index 93%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookRepositoryImpl.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookRepositoryImpl.java
index 6e9aa998d7..241a4c05aa 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookRepositoryImpl.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookRepositoryImpl.java
@@ -1,4 +1,4 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.persistence.dao;
import java.util.ArrayList;
import java.util.List;
@@ -10,7 +10,7 @@ import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
-import org.baeldung.persistence.model.Book;
+import com.baeldung.persistence.model.Book;
import org.springframework.stereotype.Repository;
@Repository
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookService.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookService.java
similarity index 71%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookService.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookService.java
index 88b769e9bf..f02f9daa11 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookService.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookService.java
@@ -1,12 +1,12 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.persistence.dao;
-import static org.baeldung.persistence.dao.BookSpecifications.hasAuthor;
-import static org.baeldung.persistence.dao.BookSpecifications.titleContains;
+import static com.baeldung.persistence.dao.BookSpecifications.hasAuthor;
+import static com.baeldung.persistence.dao.BookSpecifications.titleContains;
import static org.springframework.data.jpa.domain.Specifications.where;
import java.util.List;
-import org.baeldung.persistence.model.Book;
+import com.baeldung.persistence.model.Book;
import org.springframework.stereotype.Service;
@Service
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookSpecifications.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookSpecifications.java
similarity index 82%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookSpecifications.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookSpecifications.java
index ed9540060d..16646a5b4b 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/BookSpecifications.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/BookSpecifications.java
@@ -1,6 +1,6 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.persistence.dao;
-import org.baeldung.persistence.model.Book;
+import com.baeldung.persistence.model.Book;
import org.springframework.data.jpa.domain.Specification;
public class BookSpecifications {
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/FooDao.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/FooDao.java
similarity index 73%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/FooDao.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/FooDao.java
index 77978c5cf2..a4ed7d97b4 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/FooDao.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/FooDao.java
@@ -1,6 +1,6 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.persistence.dao;
-import org.baeldung.persistence.model.Foo;
+import com.baeldung.persistence.model.Foo;
import org.springframework.stereotype.Repository;
@Repository
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/IFooDao.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/IFooDao.java
similarity index 74%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/IFooDao.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/IFooDao.java
index f5799522e2..8a4877aa79 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/dao/IFooDao.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/dao/IFooDao.java
@@ -1,8 +1,8 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.persistence.dao;
import java.util.List;
-import org.baeldung.persistence.model.Foo;
+import com.baeldung.persistence.model.Foo;
public interface IFooDao {
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/model/Bar.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/model/Bar.java
similarity index 98%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/model/Bar.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/model/Bar.java
index b602e57562..5a88ecc6cf 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/model/Bar.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/model/Bar.java
@@ -1,4 +1,4 @@
-package org.baeldung.persistence.model;
+package com.baeldung.persistence.model;
import java.io.Serializable;
import java.util.List;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/model/Book.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/model/Book.java
similarity index 92%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/model/Book.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/model/Book.java
index 754bd179d1..507043dd56 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/model/Book.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/model/Book.java
@@ -1,4 +1,4 @@
-package org.baeldung.persistence.model;
+package com.baeldung.persistence.model;
import javax.persistence.Entity;
import javax.persistence.Id;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/model/Foo.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/model/Foo.java
similarity index 98%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/model/Foo.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/model/Foo.java
index 5294860311..7897bba4e4 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/model/Foo.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/model/Foo.java
@@ -1,4 +1,4 @@
-package org.baeldung.persistence.model;
+package com.baeldung.persistence.model;
import org.hibernate.annotations.CacheConcurrencyStrategy;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/multiple/model/user/Possession.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/multiple/model/user/Possession.java
similarity index 96%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/multiple/model/user/Possession.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/multiple/model/user/Possession.java
index 7aff5f51d0..6ad6b8e603 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/multiple/model/user/Possession.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/multiple/model/user/Possession.java
@@ -1,4 +1,4 @@
-package org.baeldung.persistence.multiple.model.user;
+package com.baeldung.persistence.multiple.model.user;
import javax.persistence.*;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/multiple/model/user/User.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/multiple/model/user/User.java
similarity index 96%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/multiple/model/user/User.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/multiple/model/user/User.java
index 6fb9de4a47..3ebb1e0156 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/multiple/model/user/User.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/multiple/model/user/User.java
@@ -1,4 +1,4 @@
-package org.baeldung.persistence.multiple.model.user;
+package com.baeldung.persistence.multiple.model.user;
import javax.persistence.*;
import java.util.List;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/service/FooService.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/service/FooService.java
similarity index 81%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/service/FooService.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/service/FooService.java
index 6d1bb0adbe..ace36dd03b 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/persistence/service/FooService.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/persistence/service/FooService.java
@@ -1,9 +1,9 @@
-package org.baeldung.persistence.service;
+package com.baeldung.persistence.service;
import java.util.List;
-import org.baeldung.persistence.dao.IFooDao;
-import org.baeldung.persistence.model.Foo;
+import com.baeldung.persistence.dao.IFooDao;
+import com.baeldung.persistence.model.Foo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/sqlfiles/Country.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/sqlfiles/Country.java
similarity index 95%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/sqlfiles/Country.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/sqlfiles/Country.java
index 922f55cbf6..f2be33adfd 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/sqlfiles/Country.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/sqlfiles/Country.java
@@ -1,4 +1,4 @@
-package org.baeldung.sqlfiles;
+package com.baeldung.sqlfiles;
import static javax.persistence.GenerationType.IDENTITY;
diff --git a/persistence-modules/spring-jpa/src/main/java/org/baeldung/web/MainController.java b/persistence-modules/spring-jpa/src/main/java/com/baeldung/web/MainController.java
similarity index 85%
rename from persistence-modules/spring-jpa/src/main/java/org/baeldung/web/MainController.java
rename to persistence-modules/spring-jpa/src/main/java/com/baeldung/web/MainController.java
index 6900482de8..c0d4743ae7 100644
--- a/persistence-modules/spring-jpa/src/main/java/org/baeldung/web/MainController.java
+++ b/persistence-modules/spring-jpa/src/main/java/com/baeldung/web/MainController.java
@@ -1,6 +1,6 @@
-package org.baeldung.web;
+package com.baeldung.web;
-import org.baeldung.persistence.service.FooService;
+import com.baeldung.persistence.service.FooService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
diff --git a/persistence-modules/spring-jpa/src/main/resources/persistence.xml b/persistence-modules/spring-jpa/src/main/resources/persistence.xml
index 6304fa0a65..57687c306d 100644
--- a/persistence-modules/spring-jpa/src/main/resources/persistence.xml
+++ b/persistence-modules/spring-jpa/src/main/resources/persistence.xml
@@ -11,7 +11,7 @@
-
+
+
+
+
+
+
+ ${application.home:-.}/logs/application.log
+
+ %date [%level] from %logger in %thread - %message%n%xException
+
+
+
+
+
+ %coloredLevel %logger{15} - %message%n%xException{10}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/play-framework/async-http/conf/routes b/play-framework/async-http/conf/routes
new file mode 100644
index 0000000000..4f5162a8e7
--- /dev/null
+++ b/play-framework/async-http/conf/routes
@@ -0,0 +1,10 @@
+# Routes
+# This file defines all application routes (Higher priority routes first)
+# ~~~~
+
+# An example controller showing a sample home page
+GET / controllers.HomeController.index(request: Request)
+POST / controllers.HomeController.index(request: Request)
+
+# Map static resources from the /public folder to the /assets URL path
+GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset)
diff --git a/play-framework/async-http/project/build.properties b/play-framework/async-http/project/build.properties
new file mode 100644
index 0000000000..6adcdc753f
--- /dev/null
+++ b/play-framework/async-http/project/build.properties
@@ -0,0 +1 @@
+sbt.version=1.3.3
diff --git a/play-framework/async-http/project/plugins.sbt b/play-framework/async-http/project/plugins.sbt
new file mode 100644
index 0000000000..1c8c62a0d5
--- /dev/null
+++ b/play-framework/async-http/project/plugins.sbt
@@ -0,0 +1,7 @@
+// The Play plugin
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.3")
+
+// Defines scaffolding (found under .g8 folder)
+// http://www.foundweekends.org/giter8/scaffolding.html
+// sbt "g8Scaffold form"
+addSbtPlugin("org.foundweekends.giter8" % "sbt-giter8-scaffold" % "0.11.0")
diff --git a/play-framework/async-http/public/images/favicon.png b/play-framework/async-http/public/images/favicon.png
new file mode 100644
index 0000000000..c7d92d2ae4
Binary files /dev/null and b/play-framework/async-http/public/images/favicon.png differ
diff --git a/spring-boot-angular/src/main/js/application/src/app/app.component.css b/play-framework/async-http/public/javascripts/main.js
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/app.component.css
rename to play-framework/async-http/public/javascripts/main.js
diff --git a/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.css b/play-framework/async-http/public/stylesheets/main.css
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.css
rename to play-framework/async-http/public/stylesheets/main.css
diff --git a/play-framework/async-http/test/controllers/HomeControllerTest.java b/play-framework/async-http/test/controllers/HomeControllerTest.java
new file mode 100644
index 0000000000..a232dbfde0
--- /dev/null
+++ b/play-framework/async-http/test/controllers/HomeControllerTest.java
@@ -0,0 +1,232 @@
+package controllers;
+
+import static java.time.temporal.ChronoUnit.SECONDS;
+import static org.junit.Assert.assertEquals;
+import static play.mvc.Http.Status.SERVICE_UNAVAILABLE;
+
+import akka.Done;
+import akka.actor.ActorSystem;
+import akka.stream.ActorMaterializer;
+import akka.stream.javadsl.Sink;
+import akka.util.ByteString;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.time.Duration;
+import java.util.OptionalInt;
+import java.util.concurrent.CompletionStage;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.IntStream;
+import org.apache.http.HttpStatus;
+import org.junit.Before;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import play.Application;
+import play.inject.guice.GuiceApplicationBuilder;
+import play.libs.concurrent.Futures;
+import play.libs.ws.WSClient;
+import play.libs.ws.WSResponse;
+import play.libs.ws.ahc.AhcCurlRequestLogger;
+import play.mvc.Result;
+import play.mvc.Results;
+import play.test.WithServer;
+
+public class HomeControllerTest extends WithServer {
+
+ private final Logger log = LoggerFactory.getLogger(HomeControllerTest.class);
+ private String url;
+ private int port;
+
+ @Override
+ protected Application provideApplication() {
+ return new GuiceApplicationBuilder().build();
+ }
+
+ @Before
+ public void setup() {
+ OptionalInt optHttpsPort = testServer.getRunningHttpsPort();
+ if (optHttpsPort.isPresent()) {
+ port = optHttpsPort.getAsInt();
+ url = "https://localhost:" + port;
+ } else {
+ port = testServer.getRunningHttpPort()
+ .getAsInt();
+ url = "http://localhost:" + port;
+ }
+ }
+
+ @Test
+ public void givenASingleGetRequestWhenResponseThenBlockWithCompletableAndLog()
+ throws Exception {
+ WSClient ws = play.test.WSTestClient.newClient(port);
+ WSResponse wsResponse = ws.url(url)
+ .setRequestFilter(new AhcCurlRequestLogger())
+ .addHeader("key", "value")
+ .addQueryParameter("num", "" + 1)
+ .get()
+ .toCompletableFuture()
+ .get();
+
+ log.debug("Thread#" + Thread.currentThread()
+ .getId() + " Request complete: Response code = "
+ + wsResponse.getStatus()
+ + " | Response: " + wsResponse.getBody() + " | Current Time:"
+ + System.currentTimeMillis());
+ assert (HttpStatus.SC_OK == wsResponse.getStatus());
+ }
+
+ @Test
+ public void givenASingleGetRequestWhenResponseThenLog() throws Exception {
+ CountDownLatch latch = new CountDownLatch(1);
+ WSClient ws = play.test.WSTestClient.newClient(port);
+ ws.url(url)
+ .setRequestFilter(new AhcCurlRequestLogger())
+ .addHeader("key", "value")
+ .addQueryParameter("num", "" + 1)
+ .get()
+ .thenAccept(r -> {
+ log.debug("Thread#" + Thread.currentThread()
+ .getId() + " Request complete: Response code = "
+ + r.getStatus()
+ + " | Response: " + r.getBody() + " | Current Time:" + System.currentTimeMillis());
+ latch.countDown();
+ });
+
+ log.debug(
+ "Waiting for requests to be completed. Current Time: " + System.currentTimeMillis());
+ latch.await(5, TimeUnit.SECONDS );
+ assertEquals(0, latch.getCount());
+ log.debug("All requests have been completed. Exiting test.");
+ }
+
+ @Test
+ public void givenASinglePostRequestWhenResponseThenLog() throws Exception {
+ CountDownLatch latch = new CountDownLatch(1);
+ WSClient ws = play.test.WSTestClient.newClient(port);
+ ws.url(url)
+ .setContentType("application/x-www-form-urlencoded")
+ .post("key1=value1&key2=value2")
+ .thenAccept(r -> {
+ log.debug("Thread#" + Thread.currentThread()
+ .getId() + " Request complete: Response code = "
+ + r.getStatus()
+ + " | Response: " + r.getBody() + " | Current Time:" + System.currentTimeMillis());
+ latch.countDown();
+ });
+
+ log.debug(
+ "Waiting for requests to be completed. Current Time: " + System.currentTimeMillis());
+ latch.await(5, TimeUnit.SECONDS );
+ assertEquals(0, latch.getCount());
+ log.debug("All requests have been completed. Exiting test.");
+ }
+
+ @Test
+ public void givenMultipleRequestsWhenResponseThenLog() throws Exception {
+ CountDownLatch latch = new CountDownLatch(100);
+ WSClient ws = play.test.WSTestClient.newClient(port);
+ IntStream.range(0, 100)
+ .parallel()
+ .forEach(num ->
+ ws.url(url)
+ .setRequestFilter(new AhcCurlRequestLogger())
+ .addHeader("key", "value")
+ .addQueryParameter("num", "" + num)
+ .get()
+ .thenAccept(r -> {
+ log.debug(
+ "Thread#" + num + " Request complete: Response code = " + r.getStatus()
+ + " | Response: " + r.getBody() + " | Current Time:"
+ + System.currentTimeMillis());
+ latch.countDown();
+ })
+ );
+
+ log.debug(
+ "Waiting for requests to be completed. Current Time: " + System.currentTimeMillis());
+ latch.await(5, TimeUnit.SECONDS );
+ assertEquals(0, latch.getCount());
+ log.debug("All requests have been completed. Exiting test.");
+ }
+
+ @Test
+ public void givenLongResponseWhenTimeoutThenHandle() throws Exception {
+ CountDownLatch latch = new CountDownLatch(1);
+ WSClient ws = play.test.WSTestClient.newClient(port);
+ Futures futures = app.injector()
+ .instanceOf(Futures.class);
+ CompletionStage f = futures.timeout(
+ ws.url(url)
+ .setRequestTimeout(Duration.of(1, SECONDS))
+ .get()
+ .thenApply(result -> {
+ try {
+ Thread.sleep(2000L);
+ return Results.ok();
+ } catch (InterruptedException e) {
+ return Results.status(
+ SERVICE_UNAVAILABLE);
+ }
+ }), 1L, TimeUnit.SECONDS
+ );
+ CompletionStage res = f.handleAsync((result, e) -> {
+ if (e != null) {
+ log.error("Exception thrown", e);
+ latch.countDown();
+ return e.getCause();
+ } else {
+ return result;
+ }
+ });
+ res.thenAccept(result -> assertEquals(TimeoutException.class, result));
+
+ log.debug(
+ "Waiting for requests to be completed. Current Time: " + System.currentTimeMillis());
+ latch.await(5, TimeUnit.SECONDS );
+ assertEquals(0, latch.getCount());
+ log.debug("All requests have been completed. Exiting test.");
+ }
+
+ @Test
+ public void givenMultigigabyteResponseConsumeWithStreams() throws Exception {
+ CountDownLatch latch = new CountDownLatch(1);
+ final ActorSystem system = ActorSystem.create();
+ final ActorMaterializer materializer = ActorMaterializer.create(system);
+ final Path path = Files.createTempFile("tmp_", ".out");
+
+ WSClient ws = play.test.WSTestClient.newClient(port);
+ log.info("Starting test server on url: " + url);
+ ws.url(url)
+ .stream()
+ .thenAccept(
+ response -> {
+ try {
+ OutputStream outputStream = java.nio.file.Files.newOutputStream(path);
+ Sink> outputWriter =
+ Sink.foreach(bytes -> {
+ log.info("Reponse: " + bytes.utf8String());
+ outputStream.write(bytes.toArray());
+ });
+
+ response.getBodyAsSource()
+ .runWith(outputWriter, materializer);
+
+ } catch (IOException e) {
+ log.error("An error happened while opening the output stream", e);
+ }
+ })
+ .whenComplete((value, error) -> latch.countDown());
+
+ log.debug(
+ "Waiting for requests to be completed. Current Time: " + System.currentTimeMillis());
+ latch.await(5, TimeUnit.SECONDS );
+ assertEquals(0, latch.getCount());
+ log.debug("All requests have been completed. Exiting test.");
+ }
+}
diff --git a/podman/README.md b/podman/README.md
new file mode 100644
index 0000000000..3102036f04
--- /dev/null
+++ b/podman/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [An Introduction to Podman](https://www.baeldung.com/podman-intro)
diff --git a/pom.xml b/pom.xml
index 71e5d21b02..bfc2d27e1e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -332,20 +332,23 @@
parent-spring-5
parent-java
parent-kotlin
-
+
+ akka-http
akka-streams
+
algorithms-genetic
algorithms-miscellaneous-1
algorithms-miscellaneous-2
algorithms-miscellaneous-3
algorithms-miscellaneous-4
algorithms-miscellaneous-5
+ algorithms-searching
algorithms-sorting
algorithms-sorting-2
- algorithms-searching
animal-sniffer-mvn-plugin
annotations
antlr
+
apache-avro
apache-bval
apache-curator
@@ -366,12 +369,18 @@
apache-tika
apache-velocity
apache-zookeeper
+
asciidoctor
asm
+
atomix
+
aws
aws-lambda
+ aws-reactive
+
axon
+
azure
bazel
@@ -381,83 +390,18 @@
cas
cdi
checker-plugin
- cloud-foundry-uaa/cf-uaa-oauth2-client
- cloud-foundry-uaa/cf-uaa-oauth2-resource-server
+
+ cloud-foundry-uaa
code-generation
+
core-groovy
core-groovy-2
core-groovy-collections
-
-
-
- core-java-modules/core-java-8
- core-java-modules/core-java-8-2
- core-java-modules/core-java-annotations
- core-java-modules/core-java-streams
- core-java-modules/core-java-streams-2
- core-java-modules/core-java-streams-3
-
- core-java-modules/core-java-function
- core-java-modules/core-java-lang-math
-
-
- core-java-modules/core-java-text
- core-java-modules/core-java-lambdas
-
-
- core-java-modules/core-java-arrays
- core-java-modules/core-java-arrays-2
- core-java-modules/core-java-collections
- core-java-modules/core-java-collections-2
- core-java-modules/core-java-collections-3
- core-java-modules/core-java-collections-list
- core-java-modules/core-java-collections-list-2
- core-java-modules/core-java-collections-list-3
- core-java-modules/core-java-collections-array-list
- core-java-modules/core-java-collections-set
- core-java-modules/core-java-concurrency-basic
- core-java-modules/core-java-concurrency-basic-2
- core-java-modules/core-java-concurrency-collections
- core-java-modules/core-java-io
- core-java-modules/core-java-io-2
- core-java-modules/core-java-io-apis
- core-java-modules/core-java-io-conversions
- core-java-modules/core-java-nio
- core-java-modules/core-java-nio-2
- core-java-modules/core-java-security
- core-java-modules/core-java-exceptions
- core-java-modules/core-java-lang-syntax
- core-java-modules/core-java-lang-syntax-2
- core-java-modules/core-java-lang
- core-java-modules/core-java-lang-2
- core-java-modules/core-java-lang-oop
- core-java-modules/core-java-lang-oop-2
- core-java-modules/core-java-lang-oop-3
- core-java-modules/core-java-lang-oop-4
+
core-java-modules
- core-java-modules/core-java-networking
- core-java-modules/core-java-perf
- core-java-modules/core-java-reflection
- core-java-modules/core-java-sun
- core-java-modules/core-java-string-conversions
- core-java-modules/core-java-string-conversions-2
- core-java-modules/core-java-string-operations
- core-java-modules/core-java-string-operations-2
- core-java-modules/core-java-string-algorithms
- core-java-modules/core-java-string-algorithms-2
- core-java-modules/core-java-string-apis
- core-java-modules/core-java-strings
- core-java-modules/core-java
- core-java-modules/core-java-jar
- core-java-modules/core-java-jvm
core-kotlin-modules
core-scala
+
couchbase
custom-pmd
@@ -468,6 +412,7 @@
disruptor
dozer
drools
+ dropwizard
dubbo
ethereum
@@ -479,15 +424,16 @@
google-cloud
google-web-toolkit
+
graphql/graphql-java
grpc
gson
guava
- guava-io
guava-collections
guava-collections-map
guava-collections-set
+ guava-io
guava-modules
guice
@@ -502,12 +448,17 @@
immutables
jackson-modules
+ jackson-simple
+ java-blockchain
+
java-collections-conversions
java-collections-conversions-2
java-collections-maps
java-collections-maps-2
- java-jdi
+
+ javafx
+ java-jdi
java-lite
java-math
java-math-2
@@ -518,12 +469,10 @@
java-spi
java-vavr-stream
java-websocket
- javafx
javax-servlets
javaxval
jaxb
-
+ jee-7
jee-7-security
jee-kotlin
jersey
@@ -538,6 +487,7 @@
jooby
jsf
json
+ json-2
json-path
jsoup
jta
@@ -545,52 +495,52 @@
kotlin-libraries
kotlin-libraries-2
+ kotlin-quasar
- libraries
libraries-2
libraries-3
+ libraries-apache-commons
+ libraries-apache-commons-collections
+ libraries-apache-commons-io
libraries-data
libraries-data-2
libraries-data-db
libraries-data-io
- libraries-apache-commons
- libraries-apache-commons-collections
- libraries-apache-commons-io
- libraries-primitive
- libraries-testing
- libraries-security
- libraries-server
libraries-http
libraries-io
+ libraries-primitive
+ libraries-security
+ libraries-server
+ libraries-testing
linkrest
logging-modules
lombok
+ lombok-custom
lucene
+ machine-learning
mapstruct
-
- maven-all/maven
- maven-all/maven-custom-plugin/counter-maven-plugin
- maven-all/maven-war-plugin
- maven-all/profiles
- maven-all/versions-maven-plugin
+
+ maven-all
maven-archetype
-
- maven-polyglot/maven-polyglot-json-extension
-
+
+ maven-polyglot
+
mesos-marathon
metrics
-
+ micronaut
microprofile
msf4j
-
+
mustache
mybatis
- ninja
netflix-modules
+ ninja
+ open-liberty
+ oauth2-framework-impl
optaplanner
orika
osgi
@@ -598,11 +548,12 @@
patterns
pdf
performance-tests
+ persistence-modules
protobuffer
- persistence-modules
quarkus
+ quarkus-extension
rabbitmq
@@ -610,32 +561,12 @@
reactor-core
resteasy
restx
-
- rule-engines
rsocket
+ rule-engines
rxjava-core
+ rxjava-libraries
rxjava-observables
rxjava-operators
- rxjava-libraries
- software-security/sql-injection-samples
-
- tensorflow-java
- spf4j
- spring-boot-config-jpa-error
- spring-boot-flowable
- spring-boot-mvc-2
- spring-boot-performance
- spring-boot-properties
- spring-mvc-basics
- spring-security-modules/spring-security-kerberos
- oauth2-framework-impl
-
- spring-boot-nashorn
- java-blockchain
- machine-learning
- webrtc
- wildfly
- quarkus-extension
@@ -671,8 +602,6 @@
- netflix-modules
-
parent-boot-1
parent-boot-2
parent-spring-4
@@ -681,12 +610,14 @@
parent-kotlin
saas
+ software-security/sql-injection-samples
+
spark-java
+ spf4j
spring-4
spring-5
- spring-5-webflux
spring-5-data-reactive
spring-5-mvc
spring-5-reactive
@@ -695,55 +626,22 @@
spring-5-reactive-oauth
spring-5-reactive-security
spring-5-security
- spring-5-security-oauth
spring-5-security-cognito
+ spring-5-security-oauth
+ spring-5-webflux
spring-activiti
spring-akka
spring-amqp
spring-aop
spring-apache-camel
+
spring-batch
spring-bom
-
- spring-boot
- spring-boot-admin
- spring-boot-angular
- spring-boot-autoconfiguration
- spring-boot-bootstrap
- spring-boot-camel
-
- spring-boot-config-jpa-error
- spring-boot-client
-
- spring-boot-crud
- spring-boot-ctx-fluent
- spring-boot-custom-starter
-
- spring-boot-jasypt
- spring-boot-keycloak
- spring-boot-kotlin
- spring-boot-logging-log4j2
- spring-boot-mvc
- spring-boot-mvc-birt
- spring-boot-environment
- spring-boot-deployment
- spring-boot-runtime
- spring-boot-runtime/disabling-console-jul
- spring-boot-runtime/disabling-console-log4j2
- spring-boot-runtime/disabling-console-logback
- spring-boot-artifacts
+ spring-boot-modules
spring-boot-rest
- spring-boot-data
- spring-boot-parent
- spring-boot-property-exp
- spring-boot-security
- spring-boot-springdoc
- spring-boot-testing
- spring-boot-vue
+
spring-caching
- spring-boot-libraries
-
spring-cloud
spring-cloud-bus
@@ -757,9 +655,9 @@
spring-data-rest
spring-data-rest-querydsl
+ spring-di
spring-dispatcher-servlet
spring-drools
- spring-di
spring-ehcache
spring-ejb
@@ -784,60 +682,42 @@
spring-mobile
spring-mockito
- spring-websockets
+
+ spring-mvc-basics
+ spring-mvc-basics-2
+ spring-mvc-basics-3
spring-mvc-basics-4
+
spring-mvc-forms-jsp
spring-mvc-forms-thymeleaf
spring-mvc-java
+ spring-mvc-java-2
spring-mvc-kotlin
- spring-mvc-basics-2
- spring-mvc-basics-3
- spring-mvc-views
+
spring-mvc-velocity
+ spring-mvc-views
spring-mvc-webflow
spring-mvc-xml
spring-protobuf
-
-
spring-quartz
spring-reactive-kotlin
spring-reactor
spring-remoting
- spring-rest-http
spring-rest-angular
spring-rest-compress
- spring-rest-testing
spring-rest-hal-browser
+ spring-rest-http
spring-rest-query-language
spring-rest-shell
spring-rest-simple
spring-resttemplate
+ spring-rest-testing
spring-roo
+
spring-scheduling
- spring-security-modules/spring-security-acl
- spring-security-modules/spring-security-angular/server
- spring-security-modules/spring-security-cache-control
- spring-security-modules/spring-security-core
- spring-security-modules/spring-security-mvc
- spring-security-modules/spring-security-mvc-boot
- spring-security-modules/spring-security-mvc-custom
- spring-security-modules/spring-security-mvc-digest-auth
- spring-security-modules/spring-security-mvc-jsonview
- spring-security-modules/spring-security-mvc-ldap
- spring-security-modules/spring-security-mvc-login
- spring-security-modules/spring-security-mvc-persisted-remember-me
- spring-security-modules/spring-security-mvc-socket
- spring-security-modules/spring-security-oidc
-
- spring-security-modules/spring-security-rest
- spring-security-modules/spring-security-rest-basic-auth
- spring-security-modules/spring-security-rest-custom
- spring-security-modules/spring-security-sso
- spring-security-modules/spring-security-stormpath
- spring-security-modules/spring-security-thymeleaf
- spring-security-modules/spring-security-x509
+ spring-security-modules
spring-session
spring-shell
spring-sleuth
@@ -849,17 +729,20 @@
spring-swagger-codegen
spring-thymeleaf
+ spring-thymeleaf-2
spring-vault
spring-vertx
spring-webflux-amqp
+ spring-websockets
static-analysis
stripe
structurizr
struts-2
+ tensorflow-java
testing-modules
twilio
@@ -872,17 +755,11 @@
video-tutorials
vraptor
+ webrtc
wicket
-
+ wildfly
xml
xstream
-
- tensorflow-java
- spring-boot-flowable
- spring-security-modules/spring-security-kerberos
-
- spring-boot-nashorn
- java-blockchain
@@ -925,23 +802,11 @@
parent-java
parent-kotlin
- core-java-modules/core-java-concurrency-advanced
- core-java-modules/core-java-concurrency-advanced-2
- core-java-modules/core-java-concurrency-advanced-3
- core-kotlin
- core-kotlin-2
-
jenkins/plugins
jhipster
jws
libraries
- persistence-modules/hibernate5
- persistence-modules/hibernate-mapping
- persistence-modules/java-jpa
- persistence-modules/java-jpa-2
- persistence-modules/java-mongodb
- persistence-modules/jnosql
vaadin
vavr
@@ -977,20 +842,23 @@
parent-spring-5
parent-java
parent-kotlin
-
+
+ akka-http
akka-streams
+
algorithms-genetic
algorithms-miscellaneous-1
algorithms-miscellaneous-2
algorithms-miscellaneous-3
algorithms-miscellaneous-4
algorithms-miscellaneous-5
+ algorithms-searching
algorithms-sorting
algorithms-sorting-2
- algorithms-searching
animal-sniffer-mvn-plugin
annotations
antlr
+
apache-avro
apache-bval
apache-curator
@@ -1011,90 +879,39 @@
apache-tika
apache-velocity
apache-zookeeper
+
asciidoctor
asm
+
atomix
+
aws
aws-lambda
+ aws-reactive
+
axon
+
azure
+
bazel
+ blade
bootique
cas
cdi
checker-plugin
- cloud-foundry-uaa/cf-uaa-oauth2-client
- cloud-foundry-uaa/cf-uaa-oauth2-resource-server
+
+ cloud-foundry-uaa
code-generation
+
core-groovy
core-groovy-2
core-groovy-collections
-
-
- core-java-modules/core-java-8
- core-java-modules/core-java-8-2
- core-java-modules/core-java-annotations
- core-java-modules/core-java-streams
- core-java-modules/core-java-streams-2
- core-java-modules/core-java-streams-3
-
- core-java-modules/core-java-function
- core-java-modules/core-java-lang-math
-
-
- core-java-modules/core-java-text
-
-
- core-java-modules/core-java-arrays
- core-java-modules/core-java-arrays-2
- core-java-modules/core-java-collections
- core-java-modules/core-java-collections-2
- core-java-modules/core-java-collections-3
- core-java-modules/core-java-collections-list
- core-java-modules/core-java-collections-list-2
- core-java-modules/core-java-collections-list-3
- core-java-modules/core-java-collections-array-list
- core-java-modules/core-java-collections-set
- core-java-modules/core-java-concurrency-basic
- core-java-modules/core-java-concurrency-basic-2
- core-java-modules/core-java-concurrency-collections
- core-java-modules/core-java-io
- core-java-modules/core-java-io-2
- core-java-modules/core-java-io-apis
- core-java-modules/core-java-io-conversions
- core-java-modules/core-java-nio
- core-java-modules/core-java-nio-2
- core-java-modules/core-java-security
- core-java-modules/core-java-exceptions
- core-java-modules/core-java-lang-syntax
- core-java-modules/core-java-lang-syntax-2
- core-java-modules/core-java-lang
- core-java-modules/core-java-lang-2
- core-java-modules/core-java-lang-oop
- core-java-modules/core-java-lang-oop-2
- core-java-modules/core-java-lang-oop-3
- core-java-modules/core-java-lang-oop-4
+
core-java-modules
- core-java-modules/core-java-networking
- core-java-modules/core-java-perf
- core-java-modules/core-java-sun
- core-java-modules/core-java-string-conversions
- core-java-modules/core-java-string-conversions-2
- core-java-modules/core-java-string-operations
- core-java-modules/core-java-string-operations-2
- core-java-modules/core-java-string-algorithms
- core-java-modules/core-java-string-algorithms-2
- core-java-modules/core-java-string-apis
- core-java-modules/core-java-strings
core-kotlin-modules
core-scala
+
couchbase
custom-pmd
@@ -1105,6 +922,7 @@
disruptor
dozer
drools
+ dropwizard
dubbo
ethereum
@@ -1116,15 +934,16 @@
google-cloud
google-web-toolkit
+
graphql/graphql-java
grpc
gson
guava
- guava-io
guava-collections
guava-collections-map
guava-collections-set
+ guava-io
guava-modules
guice
@@ -1139,15 +958,20 @@
immutables
jackson-modules
+ jackson-simple
+ java-blockchain
+
java-collections-conversions
java-collections-conversions-2
java-collections-maps
java-collections-maps-2
+
+
+ javafx
java-jdi
- java-ee-8-security-api
java-lite
java-math
- java-math-2
+ java-math-2
java-numbers
java-numbers-2
java-numbers-3
@@ -1155,12 +979,10 @@
java-spi
java-vavr-stream
java-websocket
- javafx
javax-servlets
javaxval
jaxb
-
+ jee-7
jee-7-security
jee-kotlin
jersey
@@ -1181,50 +1003,53 @@
kotlin-libraries
+ kotlin-libraries-2
+ kotlin-quasar
- libraries
+ libraries-2
libraries-3
+ libraries-apache-commons
+ libraries-apache-commons-collections
+ libraries-apache-commons-io
libraries-data
libraries-data-2
libraries-data-db
libraries-data-io
- libraries-apache-commons
- libraries-apache-commons-collections
- libraries-apache-commons-io
- libraries-testing
+ libraries-http
+ libraries-io
+ libraries-primitive
libraries-security
libraries-server
- libraries-http
+ libraries-testing
linkrest
logging-modules
lombok
+ lombok-custom
lucene
+ machine-learning
mapstruct
-
- maven-all/maven
- maven-all/maven-custom-plugin/counter-maven-plugin
- maven-all/maven-war-plugin
- maven-all/profiles
- maven-all/versions-maven-plugin
-
+
+ maven-all
maven-archetype
-
- maven-polyglot/maven-polyglot-json-extension
-
+
+ maven-polyglot
+
mesos-marathon
metrics
-
+ micronaut
microprofile
msf4j
-
+
mustache
mybatis
- ninja
netflix-modules
+ ninja
+ open-liberty
+ oauth2-framework-impl
optaplanner
orika
osgi
@@ -1232,10 +1057,12 @@
patterns
pdf
performance-tests
+ persistence-modules
protobuffer
- persistence-modules
+ quarkus
+ quarkus-extension
rabbitmq
@@ -1243,20 +1070,12 @@
reactor-core
resteasy
restx
-
- rule-engines
rsocket
+ rule-engines
rxjava-core
+ rxjava-libraries
rxjava-observables
rxjava-operators
- rxjava-libraries
- oauth2-framework-impl
- spf4j
- spring-boot-performance
- spring-boot-properties
- spring-mvc-basics
-
-
@@ -1292,7 +1111,10 @@
parent-kotlin
saas
+ software-security/sql-injection-samples
+
spark-java
+ spf4j
spring-4
@@ -1305,48 +1127,23 @@
spring-5-reactive-oauth
spring-5-reactive-security
spring-5-security
- spring-5-security-oauth
spring-5-security-cognito
+ spring-5-security-oauth
+ spring-5-webflux
+
spring-activiti
spring-akka
spring-amqp
spring-aop
spring-apache-camel
+
spring-batch
spring-bom
-
- spring-boot
- spring-boot-admin
- spring-boot-angular
- spring-boot-autoconfiguration
- spring-boot-bootstrap
- spring-boot-camel
-
- spring-boot-client
- spring-boot-crud
- spring-boot-ctx-fluent
- spring-boot-custom-starter
-
- spring-boot-jasypt
- spring-boot-keycloak
- spring-boot-logging-log4j2
- spring-boot-mvc
- spring-boot-mvc-birt
- spring-boot-environment
- spring-boot-deployment
- spring-boot-runtime
- spring-boot-runtime/disabling-console-jul
- spring-boot-runtime/disabling-console-log4j2
- spring-boot-runtime/disabling-console-logback
- spring-boot-artifacts
+ spring-boot-modules
spring-boot-rest
- spring-boot-data
- spring-boot-parent
- spring-boot-property-exp
- spring-boot-security
- spring-boot-springdoc
- spring-boot-vue
+
spring-caching
+
spring-cloud
spring-cloud-bus
@@ -1359,9 +1156,9 @@
spring-data-rest
spring-data-rest-querydsl
+ spring-di
spring-dispatcher-servlet
spring-drools
- spring-di
spring-ehcache
spring-ejb
@@ -1386,60 +1183,42 @@
spring-mobile
spring-mockito
- spring-websockets
- spring-mvc-forms-jsp
- spring-mvc-forms-thymeleaf
- spring-mvc-java
- spring-mvc-kotlin
+
+ spring-mvc-basics
spring-mvc-basics-2
spring-mvc-basics-3
spring-mvc-basics-4
- spring-mvc-views
+
+ spring-mvc-forms-jsp
+ spring-mvc-forms-thymeleaf
+ spring-mvc-java
+ spring-mvc-java-2
+ spring-mvc-kotlin
+
spring-mvc-velocity
+ spring-mvc-views
spring-mvc-webflow
spring-mvc-xml
spring-protobuf
-
-
spring-quartz
spring-reactive-kotlin
spring-reactor
spring-remoting
- spring-rest-http
spring-rest-angular
spring-rest-compress
- spring-rest-testing
spring-rest-hal-browser
+ spring-rest-http
spring-rest-query-language
spring-rest-shell
spring-rest-simple
spring-resttemplate
+ spring-rest-testing
spring-roo
spring-scheduling
- spring-security-modules/spring-security-acl
- spring-security-modules/spring-security-angular/server
- spring-security-modules/spring-security-cache-control
- spring-security-modules/spring-security-core
- spring-security-modules/spring-security-mvc
- spring-security-modules/spring-security-mvc-boot
- spring-security-modules/spring-security-mvc-custom
- spring-security-modules/spring-security-mvc-digest-auth
- spring-security-modules/spring-security-mvc-ldap
- spring-security-modules/spring-security-mvc-login
- spring-security-modules/spring-security-mvc-persisted-remember-me
- spring-security-modules/spring-security-mvc-socket
- spring-security-modules/spring-security-oidc
-
- spring-security-modules/spring-security-rest
- spring-security-modules/spring-security-rest-basic-auth
- spring-security-modules/spring-security-rest-custom
- spring-security-modules/spring-security-sso
- spring-security-modules/spring-security-stormpath
- spring-security-modules/spring-security-thymeleaf
- spring-security-modules/spring-security-x509
+ spring-security-modules
spring-session
spring-shell
spring-sleuth
@@ -1451,17 +1230,20 @@
spring-swagger-codegen
spring-thymeleaf
+ spring-thymeleaf-2
spring-vault
spring-vertx
spring-webflux-amqp
+ spring-websockets
static-analysis
stripe
structurizr
struts-2
+ tensorflow-java
testing-modules
twilio
@@ -1474,8 +1256,9 @@
video-tutorials
vraptor
+ webrtc
wicket
-
+ wildfly
xml
xstream
@@ -1512,27 +1295,12 @@
parent-java
parent-kotlin
- core-java-modules/core-java
- core-java-modules/core-java-jar
- core-java-modules/core-java-concurrency-advanced
- core-java-modules/core-java-concurrency-advanced-2
- core-java-modules/core-java-concurrency-advanced-3
- core-kotlin
- core-kotlin-2
-
jenkins/plugins
jhipster
jws
libraries
- persistence-modules/hibernate5
- persistence-modules/hibernate-mapping
- persistence-modules/java-jpa
- persistence-modules/java-jpa-2
- persistence-modules/java-mongodb
- persistence-modules/jnosql
-
vaadin
vavr
diff --git a/quarkus-extension/README.md b/quarkus-extension/README.md
new file mode 100644
index 0000000000..782ec75957
--- /dev/null
+++ b/quarkus-extension/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [How to Implement a Quarkus Extension](https://www.baeldung.com/quarkus-extension-java)
diff --git a/quarkus-extension/pom.xml b/quarkus-extension/pom.xml
index 38d7c3d548..394376e59e 100644
--- a/quarkus-extension/pom.xml
+++ b/quarkus-extension/pom.xml
@@ -9,6 +9,12 @@
quarkus-extension
pom
+
+ com.baeldung
+ parent-modules
+ 1.0.0-SNAPSHOT
+
+
quarkus-liquibase
quarkus-app
diff --git a/quarkus-extension/quarkus-app/pom.xml b/quarkus-extension/quarkus-app/pom.xml
index 6e4cce3ae7..6d3f4c7c28 100644
--- a/quarkus-extension/quarkus-app/pom.xml
+++ b/quarkus-extension/quarkus-app/pom.xml
@@ -5,7 +5,12 @@
4.0.0
com.baeldung.quarkus.app
quarkus-app
- 1.0-SNAPSHOT
+
+
+ com.baeldung.quarkus.extension
+ quarkus-extension
+ 1.0-SNAPSHOT
+
@@ -22,13 +27,12 @@
com.baeldung.quarkus.liquibase
- quarkus-liquibase
- 1.0-SNAPSHOT
+ quarkus-liquibase-runtime
+ ${project.version}
io.quarkus
quarkus-jdbc-h2
- ${quarkus.version}
@@ -46,31 +50,11 @@
-
- maven-compiler-plugin
- ${compiler-plugin.version}
-
-
- maven-surefire-plugin
- ${surefire-plugin.version}
-
-
- org.jboss.logmanager.LogManager
-
-
-
- UTF-8
- 2.22.0
- true
1.0.0.Final
- 3.8.1
- 1.8
- UTF-8
- 1.8
diff --git a/quarkus-extension/quarkus-liquibase/deployment/pom.xml b/quarkus-extension/quarkus-liquibase/deployment/pom.xml
index f005ac4e8c..c85d986390 100644
--- a/quarkus-extension/quarkus-liquibase/deployment/pom.xml
+++ b/quarkus-extension/quarkus-liquibase/deployment/pom.xml
@@ -30,7 +30,7 @@
com.baeldung.quarkus.liquibase
- quarkus-liquibase
+ quarkus-liquibase-runtime
${project.version}
@@ -40,7 +40,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.8.1
+ ${compiler.plugin.version}
@@ -54,4 +54,8 @@
+
+ 3.8.1
+
+
\ No newline at end of file
diff --git a/quarkus-extension/quarkus-liquibase/pom.xml b/quarkus-extension/quarkus-liquibase/pom.xml
index e1f3e243ab..9536561701 100644
--- a/quarkus-extension/quarkus-liquibase/pom.xml
+++ b/quarkus-extension/quarkus-liquibase/pom.xml
@@ -5,19 +5,21 @@
4.0.0
com.baeldung.quarkus.liquibase
quarkus-liquibase-parent
- 1.0-SNAPSHOT
quarkus-liquibase-parent
pom
+
+ com.baeldung.quarkus.extension
+ quarkus-extension
+ 1.0-SNAPSHOT
+
+
runtime
deployment
- 1.8
- 1.8
- UTF-8
1.0.0.Final
diff --git a/quarkus-extension/quarkus-liquibase/runtime/pom.xml b/quarkus-extension/quarkus-liquibase/runtime/pom.xml
index a1d705c691..83f7c8d4cc 100644
--- a/quarkus-extension/quarkus-liquibase/runtime/pom.xml
+++ b/quarkus-extension/quarkus-liquibase/runtime/pom.xml
@@ -1,7 +1,6 @@
-
+
4.0.0
quarkus-liquibase-runtime
quarkus-liquibase-runtime
@@ -26,7 +25,7 @@
org.liquibase
liquibase-core
- 3.8.1
+ ${liquibase-core.version}
@@ -42,7 +41,7 @@
extension-descriptor
- ${project.groupId}:${project.artifactId}-deployment:${project.version}
+ ${project.groupId}:quarkus-liquibase-deployment:${project.version}
@@ -51,7 +50,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.8.1
+ ${compiler.plugin.version}
@@ -65,4 +64,10 @@
+
+ 3.8.1
+ 3.8.1
+ 3.8.1
+
+
\ No newline at end of file
diff --git a/quarkus/pom.xml b/quarkus/pom.xml
index de4c2ca9a3..09eb90d110 100644
--- a/quarkus/pom.xml
+++ b/quarkus/pom.xml
@@ -118,9 +118,6 @@
2.22.0
0.15.0
- 1.8
- UTF-8
- 1.8
diff --git a/rabbitmq/pom.xml b/rabbitmq/pom.xml
index b544da4c44..33ccf5402f 100644
--- a/rabbitmq/pom.xml
+++ b/rabbitmq/pom.xml
@@ -5,7 +5,6 @@
rabbitmq
0.1-SNAPSHOT
rabbitmq
- http://maven.apache.org
com.baeldung
diff --git a/ratpack/pom.xml b/ratpack/pom.xml
index a00be905ee..9ad654fa7d 100644
--- a/ratpack/pom.xml
+++ b/ratpack/pom.xml
@@ -6,7 +6,6 @@
1.0-SNAPSHOT
ratpack
jar
- http://maven.apache.org
com.baeldung
@@ -85,18 +84,7 @@
-
- ${project.artifactId}
-
-
- src/main/resources
-
-
-
-
- 1.8
- 1.8
1.5.4
4.5.3
4.4.6
diff --git a/restx/pom.xml b/restx/pom.xml
index 17c25fcdc0..ee25c88047 100644
--- a/restx/pom.xml
+++ b/restx/pom.xml
@@ -148,8 +148,6 @@
- 1.8
- 1.8
0.35-rc4
1.2.3
diff --git a/rsocket/pom.xml b/rsocket/pom.xml
index 70f21064b6..5b407c2bd0 100644
--- a/rsocket/pom.xml
+++ b/rsocket/pom.xml
@@ -24,43 +24,10 @@
rsocket-transport-netty
${rsocket.version}
-
- junit
- junit
- ${junit.version}
- test
-
-
- org.hamcrest
- hamcrest-core
- ${hamcrest.version}
- test
-
-
- ch.qos.logback
- logback-classic
- ${logback.version}
-
-
- ch.qos.logback
- logback-core
- ${logback.version}
-
-
- org.slf4j
- slf4j-api
- ${slf4j-api.version}
-
- 1.8
- 1.8
- 3.0.1
0.11.13
- 1.3
- 1.2.3
- 1.7.25
diff --git a/rule-engines/easy-rules/pom.xml b/rule-engines/easy-rules/pom.xml
index c1ba829045..b9661cd1c3 100644
--- a/rule-engines/easy-rules/pom.xml
+++ b/rule-engines/easy-rules/pom.xml
@@ -9,9 +9,8 @@
com.baeldung
- parent-modules
+ rule-engines
1.0.0-SNAPSHOT
- ../..
diff --git a/rule-engines/openl-tablets/pom.xml b/rule-engines/openl-tablets/pom.xml
index d1c7baabcc..25c4b8365a 100644
--- a/rule-engines/openl-tablets/pom.xml
+++ b/rule-engines/openl-tablets/pom.xml
@@ -9,9 +9,8 @@
com.baeldung
- parent-modules
+ rule-engines
1.0.0-SNAPSHOT
- ../..
diff --git a/rule-engines/pom.xml b/rule-engines/pom.xml
index cc015c600b..d3d3127ce0 100644
--- a/rule-engines/pom.xml
+++ b/rule-engines/pom.xml
@@ -10,7 +10,6 @@
com.baeldung
parent-modules
1.0.0-SNAPSHOT
- ..
diff --git a/rule-engines/rulebook/pom.xml b/rule-engines/rulebook/pom.xml
index b021adea10..95ededa5f9 100644
--- a/rule-engines/rulebook/pom.xml
+++ b/rule-engines/rulebook/pom.xml
@@ -9,9 +9,8 @@
com.baeldung
- parent-modules
+ rule-engines
1.0.0-SNAPSHOT
- ../..
diff --git a/rxjava-core/README.md b/rxjava-core/README.md
index 2773bd9423..95a374668d 100644
--- a/rxjava-core/README.md
+++ b/rxjava-core/README.md
@@ -13,4 +13,5 @@ This module contains articles about RxJava.
- [RxJava Maybe](https://www.baeldung.com/rxjava-maybe)
- [Combining RxJava Completables](https://www.baeldung.com/rxjava-completable)
- [RxJava Hooks](https://www.baeldung.com/rxjava-hooks)
+- [Introduction to rxjava-jdbc](https://www.baeldung.com/rxjava-jdbc)
- More articles: [[next -->]](/rxjava-2)
diff --git a/slack/README.md b/slack/README.md
new file mode 100644
index 0000000000..fb3eff6290
--- /dev/null
+++ b/slack/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [How to Create a Slack Plugin in Java](https://www.baeldung.com/java-slack-plugin)
diff --git a/slack/pom.xml b/slack/pom.xml
new file mode 100644
index 0000000000..ebe5ce2f60
--- /dev/null
+++ b/slack/pom.xml
@@ -0,0 +1,61 @@
+
+
+ 4.0.0
+ com.baeldung.examples
+ slack
+ 1.0
+ slack
+ jar
+
+
+ com.baeldung
+ parent-modules
+ 1.0.0-SNAPSHOT
+
+
+
+
+ com.hubspot.slack
+ slack-base
+ ${slack.version}
+
+
+ com.hubspot.slack
+ slack-java-client
+ ${slack.version}
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven-jar-plugin.version}
+
+
+
+ true
+ com.baeldung.examples.slack.MainClass
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.6.0
+
+ com.baeldung.examples.slack.MainClass
+
+
+
+
+
+
+ 1.4
+ 2.4
+
+
+
diff --git a/slack/src/main/java/com/baeldung/examples/slack/DiskSpaceErrorChecker.java b/slack/src/main/java/com/baeldung/examples/slack/DiskSpaceErrorChecker.java
new file mode 100644
index 0000000000..7a3f5cd607
--- /dev/null
+++ b/slack/src/main/java/com/baeldung/examples/slack/DiskSpaceErrorChecker.java
@@ -0,0 +1,42 @@
+package com.baeldung.examples.slack;
+
+import java.io.IOException;
+import java.nio.file.FileSystems;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DiskSpaceErrorChecker implements ErrorChecker {
+ private static final Logger LOG = LoggerFactory.getLogger(DiskSpaceErrorChecker.class);
+
+ private final ErrorReporter errorReporter;
+
+ private final double limit;
+
+ public DiskSpaceErrorChecker(ErrorReporter errorReporter, double limit) {
+ this.errorReporter = errorReporter;
+ this.limit = limit;
+ }
+
+ @Override
+ public void check() {
+ LOG.info("Checking disk space");
+ FileSystems.getDefault().getFileStores().forEach(fileStore -> {
+ try {
+ long totalSpace = fileStore.getTotalSpace();
+ long usableSpace = fileStore.getUsableSpace();
+ double usablePercentage = ((double) usableSpace) / totalSpace;
+ LOG.debug("File store {} has {} of {} ({}) usable space",
+ fileStore, usableSpace, totalSpace, usablePercentage);
+
+ if (totalSpace > 0 && usablePercentage < limit) {
+ String error = String.format("File store %s only has %d%% usable disk space",
+ fileStore.name(), (int)(usablePercentage * 100));
+ errorReporter.reportProblem(error);
+ }
+ } catch (IOException e) {
+ LOG.error("Error getting disk space for file store {}", fileStore, e);
+ }
+ });
+ }
+}
diff --git a/slack/src/main/java/com/baeldung/examples/slack/ErrorChecker.java b/slack/src/main/java/com/baeldung/examples/slack/ErrorChecker.java
new file mode 100644
index 0000000000..08db9a7817
--- /dev/null
+++ b/slack/src/main/java/com/baeldung/examples/slack/ErrorChecker.java
@@ -0,0 +1,5 @@
+package com.baeldung.examples.slack;
+
+public interface ErrorChecker {
+ void check();
+}
diff --git a/slack/src/main/java/com/baeldung/examples/slack/ErrorReporter.java b/slack/src/main/java/com/baeldung/examples/slack/ErrorReporter.java
new file mode 100644
index 0000000000..ba6165af9b
--- /dev/null
+++ b/slack/src/main/java/com/baeldung/examples/slack/ErrorReporter.java
@@ -0,0 +1,5 @@
+package com.baeldung.examples.slack;
+
+public interface ErrorReporter {
+ void reportProblem(String problem);
+}
diff --git a/slack/src/main/java/com/baeldung/examples/slack/MainClass.java b/slack/src/main/java/com/baeldung/examples/slack/MainClass.java
new file mode 100644
index 0000000000..ac25e97cf6
--- /dev/null
+++ b/slack/src/main/java/com/baeldung/examples/slack/MainClass.java
@@ -0,0 +1,41 @@
+package com.baeldung.examples.slack;
+
+import java.io.IOException;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import com.hubspot.slack.client.SlackClient;
+import com.hubspot.slack.client.SlackClientFactory;
+import com.hubspot.slack.client.SlackClientRuntimeConfig;
+
+public class MainClass {
+ public static final long MINUTES = 1000 * 60;
+
+ public static void main(String[] args) throws IOException {
+ SlackClientRuntimeConfig runtimeConfig = SlackClientRuntimeConfig.builder()
+ .setTokenSupplier(() -> "")
+ .build();
+
+ SlackClient slackClient = SlackClientFactory.defaultFactory().build(runtimeConfig);
+
+ ErrorReporter slackChannelErrorReporter = new SlackChannelErrorReporter(slackClient, "general");
+ ErrorReporter slackUserErrorReporter = new SlackUserErrorReporter(slackClient, "testuser@baeldung.com");
+
+ ErrorChecker diskSpaceErrorChecker10pct = new DiskSpaceErrorChecker(slackChannelErrorReporter, 0.1);
+ ErrorChecker diskSpaceErrorChecker2pct = new DiskSpaceErrorChecker(slackUserErrorReporter, 0.02);
+
+ Timer timer = new Timer();
+ timer.scheduleAtFixedRate(new TimerTask() {
+ @Override
+ public void run() {
+ diskSpaceErrorChecker10pct.check();
+ }
+ }, 0, 5 * MINUTES);
+ timer.scheduleAtFixedRate(new TimerTask() {
+ @Override
+ public void run() {
+ diskSpaceErrorChecker2pct.check();
+ }
+ }, 0, 5 * MINUTES);
+ }
+}
diff --git a/slack/src/main/java/com/baeldung/examples/slack/SlackChannelErrorReporter.java b/slack/src/main/java/com/baeldung/examples/slack/SlackChannelErrorReporter.java
new file mode 100644
index 0000000000..f7abcecc2e
--- /dev/null
+++ b/slack/src/main/java/com/baeldung/examples/slack/SlackChannelErrorReporter.java
@@ -0,0 +1,30 @@
+package com.baeldung.examples.slack;
+
+import com.hubspot.slack.client.SlackClient;
+import com.hubspot.slack.client.methods.params.chat.ChatPostMessageParams;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SlackChannelErrorReporter implements ErrorReporter {
+ private static final Logger LOG = LoggerFactory.getLogger(SlackChannelErrorReporter.class);
+
+ private final SlackClient slackClient;
+
+ private final String channel;
+
+ public SlackChannelErrorReporter(SlackClient slackClient, String channel) {
+ this.slackClient = slackClient;
+ this.channel = channel;
+ }
+
+ @Override
+ public void reportProblem(String problem) {
+ LOG.debug("Sending message to channel {}: {}", channel, problem);
+ slackClient.postMessage(
+ ChatPostMessageParams.builder()
+ .setText(problem)
+ .setChannelId(channel)
+ .build()
+ ).join().unwrapOrElseThrow();
+ }
+}
diff --git a/slack/src/main/java/com/baeldung/examples/slack/SlackUserErrorReporter.java b/slack/src/main/java/com/baeldung/examples/slack/SlackUserErrorReporter.java
new file mode 100644
index 0000000000..8fa4f9016b
--- /dev/null
+++ b/slack/src/main/java/com/baeldung/examples/slack/SlackUserErrorReporter.java
@@ -0,0 +1,52 @@
+package com.baeldung.examples.slack;
+
+import java.util.List;
+
+import com.hubspot.slack.client.SlackClient;
+import com.hubspot.slack.client.methods.params.chat.ChatPostMessageParams;
+import com.hubspot.slack.client.methods.params.conversations.ConversationCreateParams;
+import com.hubspot.slack.client.methods.params.im.ImOpenParams;
+import com.hubspot.slack.client.methods.params.users.UserEmailParams;
+import com.hubspot.slack.client.methods.params.users.UsersInfoParams;
+import com.hubspot.slack.client.models.response.im.ImOpenResponse;
+import com.hubspot.slack.client.models.response.users.UsersInfoResponse;
+import com.hubspot.slack.client.models.users.SlackUser;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SlackUserErrorReporter implements ErrorReporter {
+ private static final Logger LOG = LoggerFactory.getLogger(SlackUserErrorReporter.class);
+
+ private final SlackClient slackClient;
+
+ private final String user;
+
+ public SlackUserErrorReporter(SlackClient slackClient, String user) {
+ this.slackClient = slackClient;
+ this.user = user;
+ }
+
+ @Override
+ public void reportProblem(String problem) {
+ LOG.debug("Sending message to user {}: {}", user, problem);
+ UsersInfoResponse usersInfoResponse = slackClient
+ .lookupUserByEmail(UserEmailParams.builder()
+ .setEmail(user)
+ .build()
+ ).join().unwrapOrElseThrow();
+
+ ImOpenResponse imOpenResponse = slackClient.openIm(ImOpenParams.builder()
+ .setUserId(usersInfoResponse.getUser().getId())
+ .build()
+ ).join().unwrapOrElseThrow();
+
+ imOpenResponse.getChannel().ifPresent(channel -> {
+ slackClient.postMessage(
+ ChatPostMessageParams.builder()
+ .setText(problem)
+ .setChannelId(channel.getId())
+ .build()
+ ).join().unwrapOrElseThrow();
+ });
+ }
+}
diff --git a/spring-security-modules/spring-security-mvc-boot/src/main/resources/logback.xml b/slack/src/main/resources/logback.xml
similarity index 93%
rename from spring-security-modules/spring-security-mvc-boot/src/main/resources/logback.xml
rename to slack/src/main/resources/logback.xml
index 7d900d8ea8..c8c077ba1d 100644
--- a/spring-security-modules/spring-security-mvc-boot/src/main/resources/logback.xml
+++ b/slack/src/main/resources/logback.xml
@@ -7,7 +7,7 @@
-
+
\ No newline at end of file
diff --git a/spf4j/spf4j-aspects-app/pom.xml b/spf4j/spf4j-aspects-app/pom.xml
index 2458e2d8ad..db6a18f26a 100644
--- a/spf4j/spf4j-aspects-app/pom.xml
+++ b/spf4j/spf4j-aspects-app/pom.xml
@@ -39,16 +39,16 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.8.0
+ ${compiler.plugin.version}
- 1.8
- 1.8
+ ${java.version}
+ ${java.version}
org.apache.maven.plugins
maven-dependency-plugin
- 3.1.1
+ ${dependency.plugin.version}
copy-dependencies
@@ -84,6 +84,8 @@
UTF-8
8.6.10
1.7.21
+ 3.8.0
+ 3.1.1
diff --git a/spf4j/spf4j-core-app/pom.xml b/spf4j/spf4j-core-app/pom.xml
index 45300fd4a4..48cbf4a1c9 100644
--- a/spf4j/spf4j-core-app/pom.xml
+++ b/spf4j/spf4j-core-app/pom.xml
@@ -39,16 +39,16 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.8.0
+ ${compiler.plugin.version}
- 1.8
- 1.8
+ ${java.version}
+ ${java.version}
org.apache.maven.plugins
maven-dependency-plugin
- 3.1.1
+ ${dependency.plugin.version}
copy-dependencies
@@ -84,6 +84,8 @@
UTF-8
8.6.10
1.7.21
+ 3.8.0
+ 3.1.1
diff --git a/spring-5-reactive-security/README.md b/spring-5-reactive-security/README.md
index 4ea6fb644f..a0f47a503d 100644
--- a/spring-5-reactive-security/README.md
+++ b/spring-5-reactive-security/README.md
@@ -11,3 +11,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
- [Spring Security 5 for Reactive Applications](https://www.baeldung.com/spring-security-5-reactive)
- [Guide to Spring 5 WebFlux](https://www.baeldung.com/spring-webflux)
- [Introduction to the Functional Web Framework in Spring 5](https://www.baeldung.com/spring-5-functional-web)
+- [Guide to the AuthenticationManagerResolver in Spring Security](https://www.baeldung.com/spring-security-authenticationmanagerresolver)
diff --git a/spring-5-security/README.md b/spring-5-security/README.md
index 4cace0db8d..07f2d48b7f 100644
--- a/spring-5-security/README.md
+++ b/spring-5-security/README.md
@@ -8,4 +8,4 @@ This module contains articles about Spring Security 5
- [A Custom Spring SecurityConfigurer](https://www.baeldung.com/spring-security-custom-configurer)
- [New Password Storage In Spring Security 5](https://www.baeldung.com/spring-security-5-password-storage)
- [Default Password Encoder in Spring Security 5](https://www.baeldung.com/spring-security-5-default-password-encoder)
-
+- [Guide to the AuthenticationManagerResolver in Spring Security](https://www.baeldung.com/spring-security-authenticationmanagerresolver)
diff --git a/spring-5/src/main/java/com/baeldung/restdocs/CRUDController.java b/spring-5/src/main/java/com/baeldung/restdocs/CRUDController.java
index 429d3f433a..b10cfd5f55 100644
--- a/spring-5/src/main/java/com/baeldung/restdocs/CRUDController.java
+++ b/spring-5/src/main/java/com/baeldung/restdocs/CRUDController.java
@@ -1,6 +1,6 @@
package com.baeldung.restdocs;
-import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
+import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo;
import java.util.ArrayList;
import java.util.List;
diff --git a/spring-5/src/main/java/com/baeldung/restdocs/IndexController.java b/spring-5/src/main/java/com/baeldung/restdocs/IndexController.java
index 2c58d5fe6b..b1516f43c5 100644
--- a/spring-5/src/main/java/com/baeldung/restdocs/IndexController.java
+++ b/spring-5/src/main/java/com/baeldung/restdocs/IndexController.java
@@ -1,21 +1,25 @@
package com.baeldung.restdocs;
-import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
-
-import org.springframework.hateoas.ResourceSupport;
+import org.springframework.hateoas.Link;
+import org.springframework.hateoas.RepresentationModel;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo;
+
@RestController
@RequestMapping("/")
public class IndexController {
- @GetMapping
- public ResourceSupport index() {
- ResourceSupport index = new ResourceSupport();
- index.add(linkTo(CRUDController.class).withRel("crud"));
- return index;
+ static class CustomRepresentationModel extends RepresentationModel {
+ public CustomRepresentationModel(Link initialLink) {
+ super(initialLink);
+ }
}
+ @GetMapping
+ public CustomRepresentationModel index() {
+ return new CustomRepresentationModel(linkTo(CRUDController.class).withRel("crud"));
+ }
}
\ No newline at end of file
diff --git a/spring-amqp/README.md b/spring-amqp/README.md
index 0ae4eda12e..6b09aec10a 100644
--- a/spring-amqp/README.md
+++ b/spring-amqp/README.md
@@ -5,4 +5,5 @@ This module contains articles about Spring with the AMQP messaging system
## Relevant articles:
- [Messaging With Spring AMQP](https://www.baeldung.com/spring-amqp)
-- [RabbitMQ Message Dispatching with Spring AMQP](https://www.baeldung.com/rabbitmq-spring-amqp)
\ No newline at end of file
+- [RabbitMQ Message Dispatching with Spring AMQP](https://www.baeldung.com/rabbitmq-spring-amqp)
+- [Error Handling with Spring AMQP](https://www.baeldung.com/spring-amqp-error-handling)
diff --git a/spring-batch/src/main/java/org/baeldung/batch/App.java b/spring-batch/src/main/java/org/baeldung/batch/App.java
index 91b99ba571..764ef72a35 100644
--- a/spring-batch/src/main/java/org/baeldung/batch/App.java
+++ b/spring-batch/src/main/java/org/baeldung/batch/App.java
@@ -18,6 +18,8 @@ public class App {
final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
context.register(SpringConfig.class);
context.register(SpringBatchConfig.class);
+ context.register(SpringBatchRetryConfig.class);
+
context.refresh();
// Spring xml config
@@ -26,6 +28,8 @@ public class App {
runJob(context, "firstBatchJob");
runJob(context, "skippingBatchJob");
runJob(context, "skipPolicyBatchJob");
+ runJob(context, "retryBatchJob");
+
}
private static void runJob(AnnotationConfigApplicationContext context, String batchJobName) {
diff --git a/spring-batch/src/main/java/org/baeldung/batch/SpringBatchRetryConfig.java b/spring-batch/src/main/java/org/baeldung/batch/SpringBatchRetryConfig.java
new file mode 100644
index 0000000000..56088f194b
--- /dev/null
+++ b/spring-batch/src/main/java/org/baeldung/batch/SpringBatchRetryConfig.java
@@ -0,0 +1,117 @@
+package org.baeldung.batch;
+
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.conn.ConnectTimeoutException;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.baeldung.batch.model.Transaction;
+import org.baeldung.batch.service.RecordFieldSetMapper;
+import org.baeldung.batch.service.RetryItemProcessor;
+import org.springframework.batch.core.Job;
+import org.springframework.batch.core.Step;
+import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
+import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
+import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
+import org.springframework.batch.item.ItemProcessor;
+import org.springframework.batch.item.ItemReader;
+import org.springframework.batch.item.ItemWriter;
+import org.springframework.batch.item.file.FlatFileItemReader;
+import org.springframework.batch.item.file.mapping.DefaultLineMapper;
+import org.springframework.batch.item.file.transform.DelimitedLineTokenizer;
+import org.springframework.batch.item.xml.StaxEventItemWriter;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.Resource;
+import org.springframework.dao.DeadlockLoserDataAccessException;
+import org.springframework.oxm.Marshaller;
+import org.springframework.oxm.jaxb.Jaxb2Marshaller;
+
+import java.text.ParseException;
+
+@Configuration
+@EnableBatchProcessing
+public class SpringBatchRetryConfig {
+
+ private static final String[] tokens = { "username", "userid", "transactiondate", "amount" };
+ private static final int TWO_SECONDS = 2000;
+
+ @Autowired
+ private JobBuilderFactory jobBuilderFactory;
+
+ @Autowired
+ private StepBuilderFactory stepBuilderFactory;
+
+ @Value("input/recordRetry.csv")
+ private Resource inputCsv;
+
+ @Value("file:xml/retryOutput.xml")
+ private Resource outputXml;
+
+ public ItemReader itemReader(Resource inputData) throws ParseException {
+ DelimitedLineTokenizer tokenizer = new DelimitedLineTokenizer();
+ tokenizer.setNames(tokens);
+ DefaultLineMapper lineMapper = new DefaultLineMapper<>();
+ lineMapper.setLineTokenizer(tokenizer);
+ lineMapper.setFieldSetMapper(new RecordFieldSetMapper());
+ FlatFileItemReader reader = new FlatFileItemReader<>();
+ reader.setResource(inputData);
+ reader.setLinesToSkip(1);
+ reader.setLineMapper(lineMapper);
+ return reader;
+ }
+
+ @Bean
+ public CloseableHttpClient closeableHttpClient() {
+ final RequestConfig config = RequestConfig.custom()
+ .setConnectTimeout(TWO_SECONDS)
+ .build();
+ return HttpClientBuilder.create().setDefaultRequestConfig(config).build();
+ }
+
+ @Bean
+ public ItemProcessor retryItemProcessor() {
+ return new RetryItemProcessor();
+ }
+
+ @Bean
+ public ItemWriter itemWriter(Marshaller marshaller) {
+ StaxEventItemWriter itemWriter = new StaxEventItemWriter<>();
+ itemWriter.setMarshaller(marshaller);
+ itemWriter.setRootTagName("transactionRecord");
+ itemWriter.setResource(outputXml);
+ return itemWriter;
+ }
+
+ @Bean
+ public Marshaller marshaller() {
+ Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
+ marshaller.setClassesToBeBound(Transaction.class);
+ return marshaller;
+ }
+
+ @Bean
+ public Step retryStep(@Qualifier("retryItemProcessor") ItemProcessor processor,
+ ItemWriter writer) throws ParseException {
+ return stepBuilderFactory.get("retryStep")
+ .chunk(10)
+ .reader(itemReader(inputCsv))
+ .processor(processor)
+ .writer(writer)
+ .faultTolerant()
+ .retryLimit(3)
+ .retry(ConnectTimeoutException.class)
+ .retry(DeadlockLoserDataAccessException.class)
+ .build();
+ }
+
+ @Bean(name = "retryBatchJob")
+ public Job retryJob(@Qualifier("retryStep") Step retryStep) {
+ return jobBuilderFactory
+ .get("retryBatchJob")
+ .start(retryStep)
+ .build();
+ }
+}
diff --git a/spring-batch/src/main/java/org/baeldung/batch/model/Transaction.java b/spring-batch/src/main/java/org/baeldung/batch/model/Transaction.java
index 0ce3a413ab..f34462eadd 100644
--- a/spring-batch/src/main/java/org/baeldung/batch/model/Transaction.java
+++ b/spring-batch/src/main/java/org/baeldung/batch/model/Transaction.java
@@ -9,6 +9,8 @@ import javax.xml.bind.annotation.XmlRootElement;
public class Transaction {
private String username;
private int userId;
+ private int age;
+ private String postCode;
private Date transactionDate;
private double amount;
@@ -46,9 +48,25 @@ public class Transaction {
this.amount = amount;
}
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+
+ public String getPostCode() {
+ return postCode;
+ }
+
+ public void setPostCode(String postCode) {
+ this.postCode = postCode;
+ }
+
@Override
public String toString() {
- return "Transaction [username=" + username + ", userId=" + userId + ", transactionDate=" + transactionDate + ", amount=" + amount + "]";
+ return "Transaction [username=" + username + ", userId=" + userId + ", age=" + age + ", postCode=" + postCode + ", transactionDate=" + transactionDate + ", amount=" + amount + "]";
}
}
diff --git a/spring-batch/src/main/java/org/baeldung/batch/service/RetryItemProcessor.java b/spring-batch/src/main/java/org/baeldung/batch/service/RetryItemProcessor.java
new file mode 100644
index 0000000000..d4e82452a7
--- /dev/null
+++ b/spring-batch/src/main/java/org/baeldung/batch/service/RetryItemProcessor.java
@@ -0,0 +1,42 @@
+package org.baeldung.batch.service;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.util.EntityUtils;
+import org.baeldung.batch.model.Transaction;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.batch.item.ItemProcessor;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.io.IOException;
+
+public class RetryItemProcessor implements ItemProcessor {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(RetryItemProcessor.class);
+
+ @Autowired
+ private CloseableHttpClient closeableHttpClient;
+
+ @Override
+ public Transaction process(Transaction transaction) throws IOException, JSONException {
+ LOGGER.info("Attempting to process user with id={}", transaction.getUserId());
+ HttpResponse response = fetchMoreUserDetails(transaction.getUserId());
+
+ //parse user's age and postCode from response and update transaction
+ String result = EntityUtils.toString(response.getEntity());
+ JSONObject userObject = new JSONObject(result);
+ transaction.setAge(Integer.parseInt(userObject.getString("age")));
+ transaction.setPostCode(userObject.getString("postCode"));
+
+ return transaction;
+ }
+
+ private HttpResponse fetchMoreUserDetails(int id) throws IOException {
+ final HttpGet request = new HttpGet("http://www.baeldung.com:81/user/" + id);
+ return closeableHttpClient.execute(request);
+ }
+}
diff --git a/spring-batch/src/main/resources/input/recordRetry.csv b/spring-batch/src/main/resources/input/recordRetry.csv
new file mode 100644
index 0000000000..1b1e3e1ac9
--- /dev/null
+++ b/spring-batch/src/main/resources/input/recordRetry.csv
@@ -0,0 +1,3 @@
+username, user_id, transaction_date, transaction_amount
+sammy, 1234, 31/10/2015, 10000
+john, 9999, 3/12/2015, 12321
diff --git a/spring-batch/src/main/resources/spring-batch-intro.xml b/spring-batch/src/main/resources/spring-batch-intro.xml
index 0f76dd50ff..908b8aa2e1 100644
--- a/spring-batch/src/main/resources/spring-batch-intro.xml
+++ b/spring-batch/src/main/resources/spring-batch-intro.xml
@@ -54,4 +54,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/spring-batch/src/test/java/org/baeldung/batch/SpringBatchRetryIntegrationTest.java b/spring-batch/src/test/java/org/baeldung/batch/SpringBatchRetryIntegrationTest.java
new file mode 100644
index 0000000000..293c97ac5d
--- /dev/null
+++ b/spring-batch/src/test/java/org/baeldung/batch/SpringBatchRetryIntegrationTest.java
@@ -0,0 +1,90 @@
+package org.baeldung.batch;
+
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.conn.ConnectTimeoutException;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.springframework.batch.core.ExitStatus;
+import org.springframework.batch.core.JobExecution;
+import org.springframework.batch.core.JobInstance;
+import org.springframework.batch.core.JobParameters;
+import org.springframework.batch.core.JobParametersBuilder;
+import org.springframework.batch.test.AssertFile;
+import org.springframework.batch.test.JobLauncherTestUtils;
+import org.springframework.batch.test.context.SpringBatchTest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.when;
+
+@RunWith(SpringRunner.class)
+@SpringBatchTest
+@EnableAutoConfiguration
+@ContextConfiguration(classes = { SpringBatchRetryConfig.class })
+public class SpringBatchRetryIntegrationTest {
+
+ private static final String TEST_OUTPUT = "xml/retryOutput.xml";
+ private static final String EXPECTED_OUTPUT = "src/test/resources/output/batchRetry/retryOutput.xml";
+
+ @Autowired
+ private JobLauncherTestUtils jobLauncherTestUtils;
+
+ @MockBean
+ private CloseableHttpClient closeableHttpClient;
+
+ @Mock
+ private CloseableHttpResponse httpResponse;
+
+ @Test
+ public void whenEndpointAlwaysFail_thenJobFails() throws Exception {
+ when(closeableHttpClient.execute(any()))
+ .thenThrow(new ConnectTimeoutException("Endpoint is down"));
+
+ JobExecution jobExecution = jobLauncherTestUtils.launchJob(defaultJobParameters());
+ JobInstance actualJobInstance = jobExecution.getJobInstance();
+ ExitStatus actualJobExitStatus = jobExecution.getExitStatus();
+
+ assertThat(actualJobInstance.getJobName(), is("retryBatchJob"));
+ assertThat(actualJobExitStatus.getExitCode(), is("FAILED"));
+ assertThat(actualJobExitStatus.getExitDescription(), containsString("org.apache.http.conn.ConnectTimeoutException"));
+ }
+
+ @Test
+ public void whenEndpointFailsTwicePasses3rdTime_thenSuccess() throws Exception {
+ FileSystemResource expectedResult = new FileSystemResource(EXPECTED_OUTPUT);
+ FileSystemResource actualResult = new FileSystemResource(TEST_OUTPUT);
+
+ //fails for first two calls and passes third time onwards
+ when(httpResponse.getEntity())
+ .thenReturn(new StringEntity("{ \"age\":10, \"postCode\":\"430222\" }"));
+ when(closeableHttpClient.execute(any()))
+ .thenThrow(new ConnectTimeoutException("Timeout count 1"))
+ .thenThrow(new ConnectTimeoutException("Timeout count 2"))
+ .thenReturn(httpResponse);
+
+ JobExecution jobExecution = jobLauncherTestUtils.launchJob(defaultJobParameters());
+ JobInstance actualJobInstance = jobExecution.getJobInstance();
+ ExitStatus actualJobExitStatus = jobExecution.getExitStatus();
+
+ assertThat(actualJobInstance.getJobName(), is("retryBatchJob"));
+ assertThat(actualJobExitStatus.getExitCode(), is("COMPLETED"));
+ AssertFile.assertFileEquals(expectedResult, actualResult);
+ }
+
+ private JobParameters defaultJobParameters() {
+ JobParametersBuilder paramsBuilder = new JobParametersBuilder();
+ paramsBuilder.addString("jobID", String.valueOf(System.currentTimeMillis()));
+ return paramsBuilder.toJobParameters();
+ }
+}
diff --git a/spring-batch/src/test/resources/output/batchRetry/retryOutput.xml b/spring-batch/src/test/resources/output/batchRetry/retryOutput.xml
new file mode 100644
index 0000000000..0de35670f4
--- /dev/null
+++ b/spring-batch/src/test/resources/output/batchRetry/retryOutput.xml
@@ -0,0 +1 @@
+10 10000.0 430222 2015-10-31T00:00:00+05:30 1234 sammy 10 12321.0 430222 2015-12-03T00:00:00+05:30 9999 john
diff --git a/spring-batch/xml/retryOutput.xml b/spring-batch/xml/retryOutput.xml
new file mode 100644
index 0000000000..0de35670f4
--- /dev/null
+++ b/spring-batch/xml/retryOutput.xml
@@ -0,0 +1 @@
+10 10000.0 430222 2015-10-31T00:00:00+05:30 1234 sammy 10 12321.0 430222 2015-12-03T00:00:00+05:30 9999 john
diff --git a/spring-boot-bootstrap/src/main/resources/application-mysql.properties b/spring-boot-bootstrap/src/main/resources/application-mysql.properties
deleted file mode 100644
index a1823b5d7f..0000000000
--- a/spring-boot-bootstrap/src/main/resources/application-mysql.properties
+++ /dev/null
@@ -1 +0,0 @@
-spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
\ No newline at end of file
diff --git a/spring-boot-gradle/gradle/wrapper/gradle-wrapper.jar b/spring-boot-gradle/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 1ce6e58f1c..0000000000
Binary files a/spring-boot-gradle/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/spring-boot-gradle/gradlew.bat b/spring-boot-gradle/gradlew.bat
deleted file mode 100644
index e95643d6a2..0000000000
--- a/spring-boot-gradle/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/spring-boot-libraries/.mvn/wrapper/maven-wrapper.jar b/spring-boot-libraries/.mvn/wrapper/maven-wrapper.jar
deleted file mode 100644
index 5fd4d5023f..0000000000
Binary files a/spring-boot-libraries/.mvn/wrapper/maven-wrapper.jar and /dev/null differ
diff --git a/spring-boot-modules/README.md b/spring-boot-modules/README.md
new file mode 100644
index 0000000000..cd916f48a7
--- /dev/null
+++ b/spring-boot-modules/README.md
@@ -0,0 +1,3 @@
+## Spring Boot Modules
+
+This module contains various modules of Spring Boot
diff --git a/spring-boot-modules/pom.xml b/spring-boot-modules/pom.xml
new file mode 100644
index 0000000000..1b11d51366
--- /dev/null
+++ b/spring-boot-modules/pom.xml
@@ -0,0 +1,57 @@
+
+
+ 4.0.0
+ com.baeldung.spring-boot-modules
+ spring-boot-modules
+ spring-boot-modules
+ pom
+
+
+ com.baeldung
+ parent-modules
+ 1.0.0-SNAPSHOT
+
+
+
+ spring-boot
+ spring-boot-admin
+ spring-boot-angular
+ spring-boot-annotations
+ spring-boot-artifacts
+ spring-boot-autoconfiguration
+ spring-boot-bootstrap
+ spring-boot-client
+ spring-boot-config-jpa-error
+ spring-boot-ctx-fluent
+ spring-boot-deployment
+ spring-boot-di
+ spring-boot-camel
+
+ spring-boot-custom-starter
+ spring-boot-crud
+ spring-boot-data
+ spring-boot-environment
+ spring-boot-flowable
+
+ spring-boot-jasypt
+ spring-boot-keycloak
+ spring-boot-libraries
+ spring-boot-logging-log4j2
+ spring-boot-kotlin
+ spring-boot-mvc
+ spring-boot-mvc-2
+ spring-boot-mvc-birt
+ spring-boot-nashorn
+ spring-boot-parent
+ spring-boot-performance
+ spring-boot-properties
+ spring-boot-property-exp
+ spring-boot-runtime
+ spring-boot-security
+ spring-boot-springdoc
+ spring-boot-testing
+ spring-boot-vue
+
+
+
diff --git a/spring-boot-admin/README.md b/spring-boot-modules/spring-boot-admin/README.md
similarity index 100%
rename from spring-boot-admin/README.md
rename to spring-boot-modules/spring-boot-admin/README.md
diff --git a/spring-boot-admin/pom.xml b/spring-boot-modules/spring-boot-admin/pom.xml
similarity index 92%
rename from spring-boot-admin/pom.xml
rename to spring-boot-modules/spring-boot-admin/pom.xml
index 8dbce0fd6c..f7dc98770a 100644
--- a/spring-boot-admin/pom.xml
+++ b/spring-boot-modules/spring-boot-admin/pom.xml
@@ -11,7 +11,7 @@
com.baeldung
parent-boot-2
0.0.1-SNAPSHOT
- ../parent-boot-2
+ ../../parent-boot-2
diff --git a/spring-boot-admin/spring-boot-admin-client/.gitignore b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/.gitignore
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-client/.gitignore
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/.gitignore
diff --git a/spring-boot-admin/spring-boot-admin-client/pom.xml b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/pom.xml
similarity index 95%
rename from spring-boot-admin/spring-boot-admin-client/pom.xml
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/pom.xml
index 47abfdddc2..8bb8c7bac3 100644
--- a/spring-boot-admin/spring-boot-admin-client/pom.xml
+++ b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/pom.xml
@@ -12,7 +12,6 @@
com.baeldung
spring-boot-admin
0.0.1-SNAPSHOT
- ../../spring-boot-admin
@@ -59,7 +58,7 @@
- 2.1.6
+ 2.2.2
2.0.4.RELEASE
diff --git a/spring-boot-admin/spring-boot-admin-client/src/main/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplication.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/main/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplication.java
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-client/src/main/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplication.java
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/main/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplication.java
diff --git a/spring-boot-admin/spring-boot-admin-client/src/main/resources/application.properties b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/main/resources/application.properties
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-client/src/main/resources/application.properties
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/main/resources/application.properties
diff --git a/spring-boot-admin/spring-boot-admin-client/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/main/resources/logback.xml
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-client/src/main/resources/logback.xml
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/main/resources/logback.xml
diff --git a/spring-boot-admin/spring-boot-admin-client/src/test/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplicationIntegrationTest.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/test/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplicationIntegrationTest.java
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-client/src/test/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplicationIntegrationTest.java
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/test/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplicationIntegrationTest.java
diff --git a/spring-boot-admin/spring-boot-admin-client/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/test/java/org/baeldung/SpringContextTest.java
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-client/src/test/java/org/baeldung/SpringContextTest.java
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/test/java/org/baeldung/SpringContextTest.java
diff --git a/spring-boot-admin/spring-boot-admin-server/.gitignore b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/.gitignore
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-server/.gitignore
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/.gitignore
diff --git a/spring-boot-admin/spring-boot-admin-server/pom.xml b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/pom.xml
similarity index 94%
rename from spring-boot-admin/spring-boot-admin-server/pom.xml
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/pom.xml
index d0d2d7a1ef..118b270812 100644
--- a/spring-boot-admin/spring-boot-admin-server/pom.xml
+++ b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/pom.xml
@@ -12,7 +12,6 @@
com.baeldung
spring-boot-admin
0.0.1-SNAPSHOT
- ../../spring-boot-admin
@@ -80,8 +79,8 @@
- 2.1.6
- 2.1.6
+ 2.2.2
+ 2.2.2
1.5.7
2.0.4.RELEASE
diff --git a/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/SpringBootAdminServerApplication.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/SpringBootAdminServerApplication.java
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/SpringBootAdminServerApplication.java
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/SpringBootAdminServerApplication.java
diff --git a/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/HazelcastConfig.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/HazelcastConfig.java
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/HazelcastConfig.java
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/HazelcastConfig.java
diff --git a/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/NotifierConfiguration.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/NotifierConfiguration.java
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/NotifierConfiguration.java
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/NotifierConfiguration.java
diff --git a/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/WebSecurityConfig.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/WebSecurityConfig.java
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/WebSecurityConfig.java
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/WebSecurityConfig.java
diff --git a/spring-boot-admin/spring-boot-admin-server/src/main/resources/application.properties b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/resources/application.properties
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-server/src/main/resources/application.properties
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/resources/application.properties
diff --git a/spring-boot-admin/spring-boot-admin-server/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/resources/logback.xml
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-server/src/main/resources/logback.xml
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/resources/logback.xml
diff --git a/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/HazelcastConfigIntegrationTest.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/HazelcastConfigIntegrationTest.java
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/HazelcastConfigIntegrationTest.java
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/HazelcastConfigIntegrationTest.java
diff --git a/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/NotifierConfigurationIntegrationTest.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/NotifierConfigurationIntegrationTest.java
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/NotifierConfigurationIntegrationTest.java
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/NotifierConfigurationIntegrationTest.java
diff --git a/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/WebSecurityConfigIntegrationTest.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/WebSecurityConfigIntegrationTest.java
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/WebSecurityConfigIntegrationTest.java
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/WebSecurityConfigIntegrationTest.java
diff --git a/spring-boot-admin/spring-boot-admin-server/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/org/baeldung/SpringContextTest.java
similarity index 100%
rename from spring-boot-admin/spring-boot-admin-server/src/test/java/org/baeldung/SpringContextTest.java
rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/org/baeldung/SpringContextTest.java
diff --git a/spring-boot-angular/README.md b/spring-boot-modules/spring-boot-angular/README.md
similarity index 100%
rename from spring-boot-angular/README.md
rename to spring-boot-modules/spring-boot-angular/README.md
diff --git a/spring-boot-angular/pom.xml b/spring-boot-modules/spring-boot-angular/pom.xml
similarity index 96%
rename from spring-boot-angular/pom.xml
rename to spring-boot-modules/spring-boot-angular/pom.xml
index d78761e921..5cfc530100 100644
--- a/spring-boot-angular/pom.xml
+++ b/spring-boot-modules/spring-boot-angular/pom.xml
@@ -12,7 +12,7 @@
com.baeldung
parent-boot-2
0.0.1-SNAPSHOT
- ../parent-boot-2
+ ../../parent-boot-2
diff --git a/spring-boot-angular/src/main/java/com/baeldung/application/Application.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/Application.java
similarity index 97%
rename from spring-boot-angular/src/main/java/com/baeldung/application/Application.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/Application.java
index f1155c3106..0101ea3a3b 100644
--- a/spring-boot-angular/src/main/java/com/baeldung/application/Application.java
+++ b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/Application.java
@@ -1,28 +1,28 @@
-package com.baeldung.application;
-
-import com.baeldung.application.entities.User;
-import com.baeldung.application.repositories.UserRepository;
-import java.util.stream.Stream;
-import org.springframework.boot.CommandLineRunner;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.Bean;
-
-@SpringBootApplication
-public class Application {
-
- public static void main(String[] args) {
- SpringApplication.run(Application.class, args);
- }
-
- @Bean
- CommandLineRunner init(UserRepository userRepository) {
- return args -> {
- Stream.of("John", "Julie", "Jennifer", "Helen", "Rachel").forEach(name -> {
- User user = new User(name, name.toLowerCase() + "@domain.com");
- userRepository.save(user);
- });
- userRepository.findAll().forEach(System.out::println);
- };
- }
-}
+package com.baeldung.application;
+
+import com.baeldung.application.entities.User;
+import com.baeldung.application.repositories.UserRepository;
+import java.util.stream.Stream;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+
+@SpringBootApplication
+public class Application {
+
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+
+ @Bean
+ CommandLineRunner init(UserRepository userRepository) {
+ return args -> {
+ Stream.of("John", "Julie", "Jennifer", "Helen", "Rachel").forEach(name -> {
+ User user = new User(name, name.toLowerCase() + "@domain.com");
+ userRepository.save(user);
+ });
+ userRepository.findAll().forEach(System.out::println);
+ };
+ }
+}
diff --git a/spring-boot-angular/src/main/java/com/baeldung/application/controllers/UserController.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/controllers/UserController.java
similarity index 96%
rename from spring-boot-angular/src/main/java/com/baeldung/application/controllers/UserController.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/controllers/UserController.java
index 14c90d5b10..a87ac4e8d1 100644
--- a/spring-boot-angular/src/main/java/com/baeldung/application/controllers/UserController.java
+++ b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/controllers/UserController.java
@@ -1,31 +1,31 @@
-package com.baeldung.application.controllers;
-
-import com.baeldung.application.entities.User;
-import com.baeldung.application.repositories.UserRepository;
-import java.util.List;
-import org.springframework.web.bind.annotation.CrossOrigin;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-@CrossOrigin(origins = "http://localhost:4200")
-public class UserController {
-
- private final UserRepository userRepository;
-
- public UserController(UserRepository userRepository) {
- this.userRepository = userRepository;
- }
-
- @GetMapping("/users")
- public List getUsers() {
- return (List) userRepository.findAll();
- }
-
- @PostMapping("/users")
- void addUser(@RequestBody User user) {
- userRepository.save(user);
- }
-}
+package com.baeldung.application.controllers;
+
+import com.baeldung.application.entities.User;
+import com.baeldung.application.repositories.UserRepository;
+import java.util.List;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@CrossOrigin(origins = "http://localhost:4200")
+public class UserController {
+
+ private final UserRepository userRepository;
+
+ public UserController(UserRepository userRepository) {
+ this.userRepository = userRepository;
+ }
+
+ @GetMapping("/users")
+ public List getUsers() {
+ return (List) userRepository.findAll();
+ }
+
+ @PostMapping("/users")
+ void addUser(@RequestBody User user) {
+ userRepository.save(user);
+ }
+}
diff --git a/spring-boot-angular/src/main/java/com/baeldung/application/entities/User.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/entities/User.java
similarity index 95%
rename from spring-boot-angular/src/main/java/com/baeldung/application/entities/User.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/entities/User.java
index 4c346fa5b9..ea23edc7e2 100644
--- a/spring-boot-angular/src/main/java/com/baeldung/application/entities/User.java
+++ b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/entities/User.java
@@ -1,43 +1,43 @@
-package com.baeldung.application.entities;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-
-@Entity
-public class User {
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- private long id;
- private final String name;
- private final String email;
-
- public User() {
- this.name = "";
- this.email = "";
- }
-
- public User(String name, String email) {
- this.name = name;
- this.email = email;
- }
-
- public long getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- public String getEmail() {
- return email;
- }
-
- @Override
- public String toString() {
- return "User{" + "id=" + id + ", name=" + name + ", email=" + email + '}';
- }
-}
+package com.baeldung.application.entities;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+@Entity
+public class User {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.AUTO)
+ private long id;
+ private final String name;
+ private final String email;
+
+ public User() {
+ this.name = "";
+ this.email = "";
+ }
+
+ public User(String name, String email) {
+ this.name = name;
+ this.email = email;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ @Override
+ public String toString() {
+ return "User{" + "id=" + id + ", name=" + name + ", email=" + email + '}';
+ }
+}
diff --git a/spring-boot-angular/src/main/java/com/baeldung/application/repositories/UserRepository.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/repositories/UserRepository.java
similarity index 97%
rename from spring-boot-angular/src/main/java/com/baeldung/application/repositories/UserRepository.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/repositories/UserRepository.java
index 5a81cadcbe..7bd71c2f86 100644
--- a/spring-boot-angular/src/main/java/com/baeldung/application/repositories/UserRepository.java
+++ b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/repositories/UserRepository.java
@@ -1,9 +1,9 @@
-package com.baeldung.application.repositories;
-
-import com.baeldung.application.entities.User;
-import org.springframework.data.repository.CrudRepository;
-import org.springframework.stereotype.Repository;
-import org.springframework.web.bind.annotation.CrossOrigin;
-
-@Repository
-public interface UserRepository extends CrudRepository{}
+package com.baeldung.application.repositories;
+
+import com.baeldung.application.entities.User;
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.stereotype.Repository;
+import org.springframework.web.bind.annotation.CrossOrigin;
+
+@Repository
+public interface UserRepository extends CrudRepository{}
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/EcommerceApplication.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/EcommerceApplication.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/EcommerceApplication.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/EcommerceApplication.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/OrderController.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/OrderController.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/OrderController.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/OrderController.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/ProductController.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/ProductController.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/ProductController.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/ProductController.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/dto/OrderProductDto.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/dto/OrderProductDto.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/dto/OrderProductDto.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/dto/OrderProductDto.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ApiExceptionHandler.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ApiExceptionHandler.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ApiExceptionHandler.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ApiExceptionHandler.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ResourceNotFoundException.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ResourceNotFoundException.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ResourceNotFoundException.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ResourceNotFoundException.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Order.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Order.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Order.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Order.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProduct.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProduct.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProduct.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProduct.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProductPK.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProductPK.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProductPK.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProductPK.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderStatus.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderStatus.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderStatus.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderStatus.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Product.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Product.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Product.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Product.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderProductRepository.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderProductRepository.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderProductRepository.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderProductRepository.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderRepository.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderRepository.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderRepository.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderRepository.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/ProductRepository.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/ProductRepository.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/ProductRepository.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/ProductRepository.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductService.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductService.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductService.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductService.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductServiceImpl.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductServiceImpl.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductServiceImpl.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductServiceImpl.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderService.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderService.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderService.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderService.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderServiceImpl.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderServiceImpl.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderServiceImpl.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderServiceImpl.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductService.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductService.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductService.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductService.java
diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductServiceImpl.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductServiceImpl.java
similarity index 100%
rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductServiceImpl.java
rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductServiceImpl.java
diff --git a/spring-boot-angular/src/main/js/application/.angular-cli.json b/spring-boot-modules/spring-boot-angular/src/main/js/application/.angular-cli.json
similarity index 100%
rename from spring-boot-angular/src/main/js/application/.angular-cli.json
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/.angular-cli.json
diff --git a/spring-boot-angular/src/main/js/application/.editorconfig b/spring-boot-modules/spring-boot-angular/src/main/js/application/.editorconfig
similarity index 100%
rename from spring-boot-angular/src/main/js/application/.editorconfig
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/.editorconfig
diff --git a/spring-boot-angular/src/main/js/application/.gitignore b/spring-boot-modules/spring-boot-angular/src/main/js/application/.gitignore
similarity index 100%
rename from spring-boot-angular/src/main/js/application/.gitignore
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/.gitignore
diff --git a/spring-boot-angular/src/main/js/application/README.md b/spring-boot-modules/spring-boot-angular/src/main/js/application/README.md
similarity index 100%
rename from spring-boot-angular/src/main/js/application/README.md
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/README.md
diff --git a/spring-boot-angular/src/main/js/application/e2e/app.e2e-spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/e2e/app.e2e-spec.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/e2e/app.e2e-spec.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/e2e/app.e2e-spec.ts
diff --git a/spring-boot-angular/src/main/js/application/e2e/app.po.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/e2e/app.po.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/e2e/app.po.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/e2e/app.po.ts
diff --git a/spring-boot-angular/src/main/js/application/e2e/tsconfig.e2e.json b/spring-boot-modules/spring-boot-angular/src/main/js/application/e2e/tsconfig.e2e.json
similarity index 100%
rename from spring-boot-angular/src/main/js/application/e2e/tsconfig.e2e.json
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/e2e/tsconfig.e2e.json
diff --git a/spring-boot-angular/src/main/js/application/karma.conf.js b/spring-boot-modules/spring-boot-angular/src/main/js/application/karma.conf.js
similarity index 100%
rename from spring-boot-angular/src/main/js/application/karma.conf.js
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/karma.conf.js
diff --git a/spring-boot-angular/src/main/js/application/package-lock.json b/spring-boot-modules/spring-boot-angular/src/main/js/application/package-lock.json
similarity index 100%
rename from spring-boot-angular/src/main/js/application/package-lock.json
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/package-lock.json
diff --git a/spring-boot-angular/src/main/js/application/package.json b/spring-boot-modules/spring-boot-angular/src/main/js/application/package.json
similarity index 100%
rename from spring-boot-angular/src/main/js/application/package.json
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/package.json
diff --git a/spring-boot-angular/src/main/js/application/protractor.conf.js b/spring-boot-modules/spring-boot-angular/src/main/js/application/protractor.conf.js
similarity index 100%
rename from spring-boot-angular/src/main/js/application/protractor.conf.js
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/protractor.conf.js
diff --git a/spring-boot-angular/src/main/js/application/src/app/app-routing.module.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app-routing.module.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/app-routing.module.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app-routing.module.ts
diff --git a/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.css b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.css
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.css
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.css
diff --git a/spring-boot-angular/src/main/js/application/src/app/app.component.html b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.html
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/app.component.html
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.html
diff --git a/spring-boot-angular/src/main/js/application/src/app/app.component.spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.spec.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/app.component.spec.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.spec.ts
diff --git a/spring-boot-angular/src/main/js/application/src/app/app.component.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/app.component.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.ts
diff --git a/spring-boot-angular/src/main/js/application/src/app/app.module.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.module.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/app.module.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.module.ts
diff --git a/spring-boot-angular/src/main/js/application/src/app/model/user.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/model/user.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/model/user.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/model/user.ts
diff --git a/spring-boot-angular/src/main/js/application/src/app/service/user.service.spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/service/user.service.spec.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/service/user.service.spec.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/service/user.service.spec.ts
diff --git a/spring-boot-angular/src/main/js/application/src/app/service/user.service.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/service/user.service.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/service/user.service.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/service/user.service.ts
diff --git a/spring-boot-angular/src/main/js/application/src/assets/.gitkeep b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.css
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/assets/.gitkeep
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.css
diff --git a/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.html b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.html
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.html
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.html
diff --git a/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.spec.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.spec.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.spec.ts
diff --git a/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.ts
diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.css b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.css
similarity index 100%
rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.css
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.css
diff --git a/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.html b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.html
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.html
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.html
diff --git a/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.spec.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.spec.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.spec.ts
diff --git a/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.ts
diff --git a/spring-boot-angular/src/main/js/ecommerce/src/assets/.gitkeep b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/assets/.gitkeep
similarity index 100%
rename from spring-boot-angular/src/main/js/ecommerce/src/assets/.gitkeep
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/assets/.gitkeep
diff --git a/spring-boot-angular/src/main/js/application/src/environments/environment.prod.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/environments/environment.prod.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/environments/environment.prod.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/environments/environment.prod.ts
diff --git a/spring-boot-angular/src/main/js/application/src/environments/environment.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/environments/environment.ts
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/environments/environment.ts
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/environments/environment.ts
diff --git a/spring-boot-angular/src/main/js/application/src/favicon.ico b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/favicon.ico
similarity index 100%
rename from spring-boot-angular/src/main/js/application/src/favicon.ico
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/favicon.ico
diff --git a/spring-boot-angular/src/main/js/application/src/index.html b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/index.html
similarity index 98%
rename from spring-boot-angular/src/main/js/application/src/index.html
rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/index.html
index 1ce7ff1ca6..398190f439 100644
--- a/spring-boot-angular/src/main/js/application/src/index.html
+++ b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/index.html
@@ -14,4 +14,4 @@
-