diff --git a/algorithms-searching/README.md b/algorithms-searching/README.md
index 9b85995235..aed3c7d21f 100644
--- a/algorithms-searching/README.md
+++ b/algorithms-searching/README.md
@@ -10,3 +10,4 @@ This module contains articles about searching algorithms.
- [String Search Algorithms for Large Texts](https://www.baeldung.com/java-full-text-search-algorithms)
- [Monte Carlo Tree Search for Tic-Tac-Toe Game](https://www.baeldung.com/java-monte-carlo-tree-search)
- [Range Search Algorithm in Java](https://www.baeldung.com/java-range-search)
+- [Fast Pattern Matching of Strings Using Suffix Tree](https://www.baeldung.com/java-pattern-matching-suffix-tree)
diff --git a/apache-beam/README.md b/apache-beam/README.md
new file mode 100644
index 0000000000..a71e5256a8
--- /dev/null
+++ b/apache-beam/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [Introduction to Apache Beam](https://www.baeldung.com/apache-beam)
diff --git a/core-java-modules/core-java-14/README.md b/core-java-modules/core-java-14/README.md
index 0648d087be..0e8278c4f6 100644
--- a/core-java-modules/core-java-14/README.md
+++ b/core-java-modules/core-java-14/README.md
@@ -5,3 +5,5 @@ This module contains articles about Java 14.
### Relevant articles
- [Guide to the @Serial Annotation in Java 14](https://www.baeldung.com/java-14-serial-annotation)
+- [Java Text Blocks](https://www.baeldung.com/java-text-blocks)
+- [Pattern Matching for instanceof in Java 14](https://www.baeldung.com/java-pattern-matching-instanceof)
diff --git a/core-java-modules/core-java-9-improvements/README.md b/core-java-modules/core-java-9-improvements/README.md
index 5864170e85..c89d0e3c09 100644
--- a/core-java-modules/core-java-9-improvements/README.md
+++ b/core-java-modules/core-java-9-improvements/README.md
@@ -9,8 +9,3 @@ This module contains articles about the improvements to core Java features intro
- [Java 9 Stream API Improvements](https://www.baeldung.com/java-9-stream-api)
- [Java 9 java.util.Objects Additions](https://www.baeldung.com/java-9-objects-new)
- [Java 9 CompletableFuture API Improvements](https://www.baeldung.com/java-9-completablefuture)
-
-#### Relevant articles not in this module:
-
-- [Java 9 Process API Improvements](https://www.baeldung.com/java-9-process-api) (see the [core-java-os](/core-java-os) module)
-
diff --git a/core-java-modules/core-java-arrays-3/README.md b/core-java-modules/core-java-arrays-3/README.md
new file mode 100644
index 0000000000..255d3d097d
--- /dev/null
+++ b/core-java-modules/core-java-arrays-3/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [Arrays.deepEquals](https://www.baeldung.com/java-arrays-deepequals)
diff --git a/core-java-modules/core-java-exceptions-2/README.md b/core-java-modules/core-java-exceptions-2/README.md
index 49ce897e60..1b8457acc4 100644
--- a/core-java-modules/core-java-exceptions-2/README.md
+++ b/core-java-modules/core-java-exceptions-2/README.md
@@ -7,3 +7,5 @@ This module contains articles about core java exceptions
- [Is It a Bad Practice to Catch Throwable?](https://www.baeldung.com/java-catch-throwable-bad-practice)
- [Wrapping vs Rethrowing Exceptions in Java](https://www.baeldung.com/java-wrapping-vs-rethrowing-exceptions)
- [java.net.UnknownHostException: Invalid Hostname for Server](https://www.baeldung.com/java-unknownhostexception)
+- [How to Handle Java SocketException](https://www.baeldung.com/java-socketexception)
+- [Java Suppressed Exceptions](https://www.baeldung.com/java-suppressed-exceptions)
diff --git a/core-java-modules/core-java-io-2/pom.xml b/core-java-modules/core-java-io-2/pom.xml
index ee7d82b610..ec27c76435 100644
--- a/core-java-modules/core-java-io-2/pom.xml
+++ b/core-java-modules/core-java-io-2/pom.xml
@@ -47,6 +47,14 @@
${assertj.version}
test
+
+
+ com.github.tomakehurst
+ wiremock
+ 2.26.3
+ test
+
+
diff --git a/core-java-modules/core-java-io-2/src/test/java/com/baeldung/blockingnonblocking/BlockingClientUnitTest.java b/core-java-modules/core-java-io-2/src/test/java/com/baeldung/blockingnonblocking/BlockingClientUnitTest.java
new file mode 100644
index 0000000000..cd3d688763
--- /dev/null
+++ b/core-java-modules/core-java-io-2/src/test/java/com/baeldung/blockingnonblocking/BlockingClientUnitTest.java
@@ -0,0 +1,52 @@
+package com.baeldung.blockingnonblocking;
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import java.io.*;
+import java.net.Socket;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*;
+import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
+import static org.junit.Assert.assertTrue;
+
+public class BlockingClientUnitTest {
+ private static final String REQUESTED_RESOURCE = "/test.json";
+
+ @Rule public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicPort());
+
+ @Before
+ public void setup() {
+ stubFor(get(urlEqualTo(REQUESTED_RESOURCE)).willReturn(aResponse()
+ .withStatus(200)
+ .withBody("{ \"response\" : \"It worked!\" }\r\n\r\n")));
+ }
+
+ @Test
+ public void givenJavaIOSocket_whenReadingAndWritingWithStreams_thenSuccess() throws IOException {
+ // given an IO socket and somewhere to store our result
+ Socket socket = new Socket("localhost", wireMockRule.port());
+ StringBuilder ourStore = new StringBuilder();
+
+ // when we write and read (using try-with-resources so our resources are auto-closed)
+ try (InputStream serverInput = socket.getInputStream();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(serverInput));
+ OutputStream clientOutput = socket.getOutputStream();
+ PrintWriter writer = new PrintWriter(new OutputStreamWriter(clientOutput))) {
+ writer.print("GET " + REQUESTED_RESOURCE + " HTTP/1.0\r\n\r\n");
+ writer.flush(); // important - without this the request is never sent, and the test will hang on readLine()
+
+ for (String line; (line = reader.readLine()) != null; ) {
+ ourStore.append(line);
+ ourStore.append(System.lineSeparator());
+ }
+ }
+
+ // then we read and saved our data
+ assertTrue(ourStore
+ .toString()
+ .contains("It worked!"));
+ }
+}
\ No newline at end of file
diff --git a/core-java-modules/core-java-io-2/src/test/java/com/baeldung/blockingnonblocking/NonBlockingClientUnitTest.java b/core-java-modules/core-java-io-2/src/test/java/com/baeldung/blockingnonblocking/NonBlockingClientUnitTest.java
new file mode 100644
index 0000000000..3e606476e6
--- /dev/null
+++ b/core-java-modules/core-java-io-2/src/test/java/com/baeldung/blockingnonblocking/NonBlockingClientUnitTest.java
@@ -0,0 +1,94 @@
+package com.baeldung.blockingnonblocking;
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.channels.SocketChannel;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.StandardCharsets;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.*;
+import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
+import static org.junit.Assert.assertTrue;
+
+public class NonBlockingClientUnitTest {
+ private String REQUESTED_RESOURCE = "/test.json";
+
+ @Rule public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicPort());
+
+ @Before
+ public void setup() {
+ stubFor(get(urlEqualTo(REQUESTED_RESOURCE)).willReturn(aResponse()
+ .withStatus(200)
+ .withBody("{ \"response\" : \"It worked!\" }")));
+ }
+
+ @Test
+ public void givenJavaNIOSocketChannel_whenReadingAndWritingWithBuffers_thenSuccess() throws IOException {
+ // given a NIO SocketChannel and a charset
+ InetSocketAddress address = new InetSocketAddress("localhost", wireMockRule.port());
+ SocketChannel socketChannel = SocketChannel.open(address);
+ Charset charset = StandardCharsets.UTF_8;
+
+ // when we write and read using buffers
+ socketChannel.write(charset.encode(CharBuffer.wrap("GET " + REQUESTED_RESOURCE + " HTTP/1.0\r\n\r\n")));
+
+ ByteBuffer byteBuffer = ByteBuffer.allocate(8192); // or allocateDirect if we need direct memory access
+ CharBuffer charBuffer = CharBuffer.allocate(8192);
+ CharsetDecoder charsetDecoder = charset.newDecoder();
+ StringBuilder ourStore = new StringBuilder();
+ while (socketChannel.read(byteBuffer) != -1 || byteBuffer.position() > 0) {
+ byteBuffer.flip();
+ storeBufferContents(byteBuffer, charBuffer, charsetDecoder, ourStore);
+ byteBuffer.compact();
+ }
+ socketChannel.close();
+
+ // then we read and saved our data
+ assertTrue(ourStore
+ .toString()
+ .contains("It worked!"));
+ }
+
+ @Test
+ public void givenJavaNIOSocketChannel_whenReadingAndWritingWithSmallBuffers_thenSuccess() throws IOException {
+ // given a NIO SocketChannel and a charset
+ InetSocketAddress address = new InetSocketAddress("localhost", wireMockRule.port());
+ SocketChannel socketChannel = SocketChannel.open(address);
+ Charset charset = StandardCharsets.UTF_8;
+
+ // when we write and read using buffers that are too small for our message
+ socketChannel.write(charset.encode(CharBuffer.wrap("GET " + REQUESTED_RESOURCE + " HTTP/1.0\r\n\r\n")));
+
+ ByteBuffer byteBuffer = ByteBuffer.allocate(8); // or allocateDirect if we need direct memory access
+ CharBuffer charBuffer = CharBuffer.allocate(8);
+ CharsetDecoder charsetDecoder = charset.newDecoder();
+ StringBuilder ourStore = new StringBuilder();
+ while (socketChannel.read(byteBuffer) != -1 || byteBuffer.position() > 0) {
+ byteBuffer.flip();
+ storeBufferContents(byteBuffer, charBuffer, charsetDecoder, ourStore);
+ byteBuffer.compact();
+ }
+ socketChannel.close();
+
+ // then we read and saved our data
+ assertTrue(ourStore
+ .toString()
+ .contains("It worked!"));
+ }
+
+ void storeBufferContents(ByteBuffer byteBuffer, CharBuffer charBuffer, CharsetDecoder charsetDecoder, StringBuilder ourStore) {
+ charsetDecoder.decode(byteBuffer, charBuffer, true);
+ charBuffer.flip();
+ ourStore.append(charBuffer);
+ charBuffer.clear();
+ }
+
+}
\ No newline at end of file
diff --git a/core-java-modules/core-java-lang-2/README.md b/core-java-modules/core-java-lang-2/README.md
index a9604d1032..65d40c6a26 100644
--- a/core-java-modules/core-java-lang-2/README.md
+++ b/core-java-modules/core-java-lang-2/README.md
@@ -9,4 +9,5 @@ This module contains articles about core features in the Java language
- [Java Default Parameters Using Method Overloading](https://www.baeldung.com/java-default-parameters-method-overloading)
- [How to Return Multiple Values From a Java Method](https://www.baeldung.com/java-method-return-multiple-values)
- [Guide to the Java finally Keyword](https://www.baeldung.com/java-finally-keyword)
+- [The Java Headless Mode](https://www.baeldung.com/java-headless-mode)
- [[<-- Prev]](/core-java-modules/core-java-lang)
diff --git a/core-java-modules/core-java-nio-2/README.md b/core-java-modules/core-java-nio-2/README.md
index 8b29c97385..ef73159f66 100644
--- a/core-java-modules/core-java-nio-2/README.md
+++ b/core-java-modules/core-java-nio-2/README.md
@@ -8,4 +8,5 @@ This module contains articles about core Java non-blocking input and output (IO)
- [Create a Symbolic Link with Java](https://www.baeldung.com/java-symlink)
- [Introduction to the Java NIO Selector](https://www.baeldung.com/java-nio-selector)
- [Using Java MappedByteBuffer](https://www.baeldung.com/java-mapped-byte-buffer)
-- [[<-- Prev]](/core-java-modules/core-java-nio)
\ No newline at end of file
+- [How to Lock a File in Java](https://www.baeldung.com/java-lock-files)
+- [[<-- Prev]](/core-java-modules/core-java-nio)
diff --git a/core-java-modules/core-java-perf/README.md b/core-java-modules/core-java-perf/README.md
index 4204c2b012..d52fd2d733 100644
--- a/core-java-modules/core-java-perf/README.md
+++ b/core-java-modules/core-java-perf/README.md
@@ -10,3 +10,4 @@ This module contains articles about performance of Java applications
- [Basic Introduction to JMX](http://www.baeldung.com/java-management-extensions)
- [Monitoring Java Applications with Flight Recorder](https://www.baeldung.com/java-flight-recorder-monitoring)
- [Branch Prediction in Java](https://www.baeldung.com/java-branch-prediction)
+- [Capturing a Java Thread Dump](https://www.baeldung.com/java-thread-dump)
diff --git a/core-java-modules/core-java-regex/README.md b/core-java-modules/core-java-regex/README.md
index 7a8f6d9293..21cd7a95a3 100644
--- a/core-java-modules/core-java-regex/README.md
+++ b/core-java-modules/core-java-regex/README.md
@@ -8,3 +8,4 @@
- [Guide to Escaping Characters in Java RegExps](http://www.baeldung.com/java-regexp-escape-char)
- [Pre-compile Regex Patterns Into Pattern Objects](https://www.baeldung.com/java-regex-pre-compile)
- [Difference Between Java Matcher find() and matches()](https://www.baeldung.com/java-matcher-find-vs-matches)
+- [How to Use Regular Expressions to Replace Tokens in Strings](https://www.baeldung.com/java-regex-token-replacement)
diff --git a/core-java-modules/core-java-security-2/README.md b/core-java-modules/core-java-security-2/README.md
new file mode 100644
index 0000000000..c250e24078
--- /dev/null
+++ b/core-java-modules/core-java-security-2/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [Guide To The Java Authentication And Authorization Service (JAAS)](https://www.baeldung.com/java-authentication-authorization-service)
diff --git a/core-java-modules/core-java-string-operations-2/README.md b/core-java-modules/core-java-string-operations-2/README.md
index 8687ac19ba..5e92738f5c 100644
--- a/core-java-modules/core-java-string-operations-2/README.md
+++ b/core-java-modules/core-java-string-operations-2/README.md
@@ -10,4 +10,5 @@ This module contains articles about string operations.
- [Java String equalsIgnoreCase()](https://www.baeldung.com/java-string-equalsignorecase)
- [Case-Insensitive String Matching in Java](https://www.baeldung.com/java-case-insensitive-string-matching)
- [L-Trim and R-Trim in Java](https://www.baeldung.com/l-trim-and-r-trim-in-java)
+- [L-Trim and R-Trim Alternatives in Java](https://www.baeldung.com/java-trim-alternatives)
- More articles: [[<-- prev]](../core-java-string-operations)
diff --git a/custom-pmd/README.md b/custom-pmd/README.md
index 0c42106fe8..d49047f180 100644
--- a/custom-pmd/README.md
+++ b/custom-pmd/README.md
@@ -1,7 +1,3 @@
## Custom PMD Rules
This module contains articles about PMD
-
-### Relevant Articles:
-
-- [Introduction To PMD](https://www.baeldung.com/pmd)
\ No newline at end of file
diff --git a/data-structures/README.md b/data-structures/README.md
index e8fb374f6c..f9ca78679a 100644
--- a/data-structures/README.md
+++ b/data-structures/README.md
@@ -9,3 +9,4 @@ This module contains articles about data structures in Java
- [Circular Linked List Java Implementation](https://www.baeldung.com/java-circular-linked-list)
- [How to Print a Binary Tree Diagram](https://www.baeldung.com/java-print-binary-tree-diagram)
- [Introduction to Big Queue](https://www.baeldung.com/java-big-queue)
+- [Guide to AVL Trees in Java](https://www.baeldung.com/java-avl-trees)
diff --git a/ddd-modules/README.md b/ddd-modules/README.md
index 5616cce48b..ba6b8d5016 100644
--- a/ddd-modules/README.md
+++ b/ddd-modules/README.md
@@ -1 +1,3 @@
-## Relevant Articles
+### Relevant Articles:
+
+- [DDD Bounded Contexts and Java Modules](https://www.baeldung.com/java-modules-ddd-bounded-contexts)
diff --git a/ddd/README.md b/ddd/README.md
index cd7cf90d61..ad84dc40b2 100644
--- a/ddd/README.md
+++ b/ddd/README.md
@@ -6,5 +6,4 @@ This module contains articles about Domain-driven Design (DDD)
- [Persisting DDD Aggregates](https://www.baeldung.com/spring-persisting-ddd-aggregates)
- [Double Dispatch in DDD](https://www.baeldung.com/ddd-double-dispatch)
-- [DDD Aggregates and @DomainEvents](https://www.baeldung.com/spring-data-ddd)
- [Organizing Layers Using Hexagonal Architecture, DDD, and Spring](https://www.baeldung.com/hexagonal-architecture-ddd-spring)
diff --git a/gradle-6/README.md b/gradle-6/README.md
new file mode 100644
index 0000000000..a1ea96ad83
--- /dev/null
+++ b/gradle-6/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [What’s New in Gradle 6.0](https://www.baeldung.com/gradle-6-features)
diff --git a/gradle/gradle-to-maven/README.md b/gradle/gradle-to-maven/README.md
new file mode 100644
index 0000000000..9acbfb1647
--- /dev/null
+++ b/gradle/gradle-to-maven/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [Converting Gradle Build File to Maven POM](https://www.baeldung.com/gradle-build-to-maven-pom)
diff --git a/gson/README.md b/gson/README.md
index df6ba0f516..4255e2ead9 100644
--- a/gson/README.md
+++ b/gson/README.md
@@ -13,4 +13,4 @@ This module contains articles about Gson
- [Convert String to JsonObject with Gson](https://www.baeldung.com/gson-string-to-jsonobject)
- [Mapping Multiple JSON Fields to a Single Java Field](https://www.baeldung.com/json-multiple-fields-single-java-field)
- [Serializing and Deserializing a List with Gson](https://www.baeldung.com/gson-list)
-
+- [Compare Two JSON Objects with Gson](https://www.baeldung.com/gson-compare-json-objects)
diff --git a/image-processing/README.md b/image-processing/README.md
index adb35c2318..50129bb994 100644
--- a/image-processing/README.md
+++ b/image-processing/README.md
@@ -4,3 +4,5 @@ This module contains articles about image processing.
### Relevant Articles:
- [Working with Images in Java](https://www.baeldung.com/java-images)
+- [Intro to OpenCV with Java](https://www.baeldung.com/java-opencv)
+- [Optical Character Recognition with Tesseract](https://www.baeldung.com/java-ocr-tesseract)
diff --git a/java-numbers-3/README.md b/java-numbers-3/README.md
index 08e8dae8ef..835b8b0b54 100644
--- a/java-numbers-3/README.md
+++ b/java-numbers-3/README.md
@@ -2,3 +2,4 @@
- [Generating Random Numbers](https://www.baeldung.com/java-generating-random-numbers)
- [Convert Double to Long in Java](https://www.baeldung.com/java-convert-double-long)
+- [Check for null Before Calling Parse in Double.parseDouble](https://www.baeldung.com/java-check-null-parse-double)
diff --git a/jee-7/src/test/java/com/baeldung/batch/understanding/CustomCheckPointUnitTest.java b/jee-7/src/test/java/com/baeldung/batch/understanding/CustomCheckPointUnitTest.java
index dfea878a75..744bdfc8f5 100644
--- a/jee-7/src/test/java/com/baeldung/batch/understanding/CustomCheckPointUnitTest.java
+++ b/jee-7/src/test/java/com/baeldung/batch/understanding/CustomCheckPointUnitTest.java
@@ -12,7 +12,9 @@ import javax.batch.runtime.StepExecution;
import com.baeldung.batch.understanding.BatchTestHelper;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Disabled;
+@Disabled("Should be fixed in BAEL-3812")
class CustomCheckPointUnitTest {
@Test
public void givenChunk_whenCustomCheckPoint_thenCommitCountIsThree() throws Exception {
diff --git a/jee-7/src/test/java/com/baeldung/batch/understanding/JobSequenceUnitTest.java b/jee-7/src/test/java/com/baeldung/batch/understanding/JobSequenceUnitTest.java
index 7c5e8d0b78..88b981df92 100644
--- a/jee-7/src/test/java/com/baeldung/batch/understanding/JobSequenceUnitTest.java
+++ b/jee-7/src/test/java/com/baeldung/batch/understanding/JobSequenceUnitTest.java
@@ -13,7 +13,9 @@ import javax.batch.runtime.JobExecution;
import javax.batch.runtime.StepExecution;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Disabled;
+@Disabled("Should be fixed in BAEL-3812")
class JobSequenceUnitTest {
@Test
public void givenTwoSteps_thenBatch_CompleteWithSuccess() throws Exception {
diff --git a/jee-7/src/test/java/com/baeldung/batch/understanding/SimpleChunkUnitTest.java b/jee-7/src/test/java/com/baeldung/batch/understanding/SimpleChunkUnitTest.java
index 57c794ba00..5871143fa3 100644
--- a/jee-7/src/test/java/com/baeldung/batch/understanding/SimpleChunkUnitTest.java
+++ b/jee-7/src/test/java/com/baeldung/batch/understanding/SimpleChunkUnitTest.java
@@ -14,7 +14,9 @@ import javax.batch.runtime.Metric;
import javax.batch.runtime.StepExecution;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Disabled;
+@Disabled("Should be fixed in BAEL-3812")
class SimpleChunkUnitTest {
@Test
public void givenChunk_thenBatch_CompletesWithSucess() throws Exception {
diff --git a/jhipster-5/bookstore-monolith/pom.xml b/jhipster-5/bookstore-monolith/pom.xml
index 60fc1acf92..5eaf761921 100644
--- a/jhipster-5/bookstore-monolith/pom.xml
+++ b/jhipster-5/bookstore-monolith/pom.xml
@@ -7,6 +7,12 @@
0.0.1-SNAPSHOT
war
Bookstore
+
+
+ jhipster-5
+ com.baeldung.jhipster
+ 1.0.0-SNAPSHOT
+
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/config/WebConfigurerTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/config/WebConfigurerUnitTest.java
similarity index 97%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/config/WebConfigurerTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/config/WebConfigurerUnitTest.java
index 670042d2df..764d6b3587 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/config/WebConfigurerTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/config/WebConfigurerUnitTest.java
@@ -37,7 +37,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*
* @see WebConfigurer
*/
-public class WebConfigurerTest {
+public class WebConfigurerUnitTest {
private WebConfigurer webConfigurer;
@@ -116,7 +116,7 @@ public class WebConfigurerTest {
props.getCors().setMaxAge(1800L);
props.getCors().setAllowCredentials(true);
- MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController())
+ MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerUnitTestController())
.addFilters(webConfigurer.corsFilter())
.build();
@@ -146,7 +146,7 @@ public class WebConfigurerTest {
props.getCors().setMaxAge(1800L);
props.getCors().setAllowCredentials(true);
- MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController())
+ MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerUnitTestController())
.addFilters(webConfigurer.corsFilter())
.build();
@@ -161,7 +161,7 @@ public class WebConfigurerTest {
public void testCorsFilterDeactivated() throws Exception {
props.getCors().setAllowedOrigins(null);
- MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController())
+ MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerUnitTestController())
.addFilters(webConfigurer.corsFilter())
.build();
@@ -176,7 +176,7 @@ public class WebConfigurerTest {
public void testCorsFilterDeactivated2() throws Exception {
props.getCors().setAllowedOrigins(new ArrayList<>());
- MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController())
+ MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerUnitTestController())
.addFilters(webConfigurer.corsFilter())
.build();
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/config/WebConfigurerTestController.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/config/WebConfigurerUnitTestController.java
similarity index 87%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/config/WebConfigurerTestController.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/config/WebConfigurerUnitTestController.java
index c19b28ea16..ee72e1c80e 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/config/WebConfigurerTestController.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/config/WebConfigurerUnitTestController.java
@@ -4,7 +4,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
-public class WebConfigurerTestController {
+public class WebConfigurerUnitTestController {
@GetMapping("/api/test-cors")
public void testCorsOnApiPath() {
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/repository/CustomAuditEventRepositoryIntTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/repository/CustomAuditEventRepositoryIntegrationTest.java
similarity index 99%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/repository/CustomAuditEventRepositoryIntTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/repository/CustomAuditEventRepositoryIntegrationTest.java
index eaf5c07504..948bf43f87 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/repository/CustomAuditEventRepositoryIntTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/repository/CustomAuditEventRepositoryIntegrationTest.java
@@ -33,7 +33,7 @@ import static com.baeldung.jhipster5.repository.CustomAuditEventRepository.EVENT
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BookstoreApp.class)
@Transactional
-public class CustomAuditEventRepositoryIntTest {
+public class CustomAuditEventRepositoryIntegrationTest {
@Autowired
private PersistenceAuditEventRepository persistenceAuditEventRepository;
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/DomainUserDetailsServiceIntTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/DomainUserDetailsServiceIntegrationTest.java
similarity index 98%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/DomainUserDetailsServiceIntTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/DomainUserDetailsServiceIntegrationTest.java
index f11252de2b..11757f6516 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/DomainUserDetailsServiceIntTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/DomainUserDetailsServiceIntegrationTest.java
@@ -28,7 +28,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BookstoreApp.class)
@Transactional
-public class DomainUserDetailsServiceIntTest {
+public class DomainUserDetailsServiceIntegrationTest {
private static final String USER_ONE_LOGIN = "test-user-one";
private static final String USER_ONE_EMAIL = "test-user-one@localhost";
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/jwt/JWTFilterTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/jwt/JWTFilterUnitTest.java
similarity index 99%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/jwt/JWTFilterTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/jwt/JWTFilterUnitTest.java
index b3de21819b..2be8e6809a 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/jwt/JWTFilterTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/jwt/JWTFilterUnitTest.java
@@ -20,7 +20,7 @@ import java.util.Collections;
import static org.assertj.core.api.Assertions.assertThat;
-public class JWTFilterTest {
+public class JWTFilterUnitTest {
private TokenProvider tokenProvider;
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/jwt/TokenProviderTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/jwt/TokenProviderUnitTest.java
similarity index 99%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/jwt/TokenProviderTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/jwt/TokenProviderUnitTest.java
index 11fcfddbf9..18da2eb875 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/jwt/TokenProviderTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/security/jwt/TokenProviderUnitTest.java
@@ -22,7 +22,7 @@ import io.jsonwebtoken.security.Keys;
import static org.assertj.core.api.Assertions.assertThat;
-public class TokenProviderTest {
+public class TokenProviderUnitTest {
private final long ONE_MINUTE = 60000;
private Key key;
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/MailServiceIntTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/MailServiceIntegrationTest.java
similarity index 99%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/MailServiceIntTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/MailServiceIntegrationTest.java
index 4bde3276f5..72592e1239 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/MailServiceIntTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/MailServiceIntegrationTest.java
@@ -31,7 +31,7 @@ import static org.mockito.Mockito.*;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BookstoreApp.class)
-public class MailServiceIntTest {
+public class MailServiceIntegrationTest {
@Autowired
private JHipsterProperties jHipsterProperties;
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/UserServiceIntTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/UserServiceIntegrationTest.java
similarity index 99%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/UserServiceIntTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/UserServiceIntegrationTest.java
index 81034c2793..ca3608462d 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/UserServiceIntTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/UserServiceIntegrationTest.java
@@ -38,7 +38,7 @@ import static org.mockito.Mockito.when;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BookstoreApp.class)
@Transactional
-public class UserServiceIntTest {
+public class UserServiceIntegrationTest {
@Autowired
private UserRepository userRepository;
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/mapper/UserMapperTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/mapper/UserMapperUnitTest.java
similarity index 99%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/mapper/UserMapperTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/mapper/UserMapperUnitTest.java
index 3d66fa5813..cd6a326c06 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/mapper/UserMapperTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/service/mapper/UserMapperUnitTest.java
@@ -26,7 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BookstoreApp.class)
-public class UserMapperTest {
+public class UserMapperUnitTest {
private static final String DEFAULT_LOGIN = "johndoe";
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/AccountResourceIntTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/AccountResourceIntegrationTest.java
similarity index 99%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/AccountResourceIntTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/AccountResourceIntegrationTest.java
index 6db284a87f..f591b7ecbf 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/AccountResourceIntTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/AccountResourceIntegrationTest.java
@@ -49,7 +49,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BookstoreApp.class)
-public class AccountResourceIntTest {
+public class AccountResourceIntegrationTest {
@Autowired
private UserRepository userRepository;
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/AuditResourceIntTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/AuditResourceIntegrationTest.java
similarity index 99%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/AuditResourceIntTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/AuditResourceIntegrationTest.java
index c3b91ab390..05d8f9d503 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/AuditResourceIntTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/AuditResourceIntegrationTest.java
@@ -35,7 +35,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BookstoreApp.class)
@Transactional
-public class AuditResourceIntTest {
+public class AuditResourceIntegrationTest {
private static final String SAMPLE_PRINCIPAL = "SAMPLE_PRINCIPAL";
private static final String SAMPLE_TYPE = "SAMPLE_TYPE";
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/BookResourceIntTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/BookResourceIntegrationTest.java
similarity index 99%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/BookResourceIntTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/BookResourceIntegrationTest.java
index ef8f27ceea..4f5cb25cdb 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/BookResourceIntTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/BookResourceIntegrationTest.java
@@ -43,7 +43,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BookstoreApp.class)
-public class BookResourceIntTest {
+public class BookResourceIntegrationTest {
private static final String DEFAULT_TITLE = "AAAAAAAAAA";
private static final String UPDATED_TITLE = "BBBBBBBBBB";
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/LogsResourceIntTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/LogsResourceIntegrationTest.java
similarity index 98%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/LogsResourceIntTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/LogsResourceIntegrationTest.java
index 62f7f3f17c..b045f52f87 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/LogsResourceIntTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/LogsResourceIntegrationTest.java
@@ -27,7 +27,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BookstoreApp.class)
-public class LogsResourceIntTest {
+public class LogsResourceIntegrationTest {
private MockMvc restLogsMockMvc;
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/UserJWTControllerIntTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/UserJWTControllerIntegrationTest.java
similarity index 99%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/UserJWTControllerIntTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/UserJWTControllerIntegrationTest.java
index 3886710438..7cfc0e19fc 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/UserJWTControllerIntTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/UserJWTControllerIntegrationTest.java
@@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.not;
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BookstoreApp.class)
-public class UserJWTControllerIntTest {
+public class UserJWTControllerIntegrationTest {
@Autowired
private TokenProvider tokenProvider;
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/UserResourceIntTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/UserResourceIntegrationTest.java
similarity index 99%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/UserResourceIntTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/UserResourceIntegrationTest.java
index d31df3b15c..c0abc042fb 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/UserResourceIntTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/UserResourceIntegrationTest.java
@@ -42,7 +42,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BookstoreApp.class)
-public class UserResourceIntTest {
+public class UserResourceIntegrationTest {
private static final String DEFAULT_LOGIN = "johndoe";
private static final String UPDATED_LOGIN = "jhipster";
diff --git a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/errors/ExceptionTranslatorIntTest.java b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/errors/ExceptionTranslatorIntegrationTest.java
similarity index 99%
rename from jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/errors/ExceptionTranslatorIntTest.java
rename to jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/errors/ExceptionTranslatorIntegrationTest.java
index a94d54063b..e5ef08ee9c 100644
--- a/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/errors/ExceptionTranslatorIntTest.java
+++ b/jhipster-5/bookstore-monolith/src/test/java/com/baeldung/jhipster5/web/rest/errors/ExceptionTranslatorIntegrationTest.java
@@ -25,7 +25,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BookstoreApp.class)
-public class ExceptionTranslatorIntTest {
+public class ExceptionTranslatorIntegrationTest {
@Autowired
private ExceptionTranslatorTestController controller;
diff --git a/json-2/README.md b/json-2/README.md
index b0f49f0e48..c2b6b36a11 100644
--- a/json-2/README.md
+++ b/json-2/README.md
@@ -4,3 +4,4 @@ This module contains articles about JSON.
### Relevant Articles:
- [Introduction to Jsoniter](https://www.baeldung.com/java-jsoniter)
+- [Introduction to Moshi Json](https://www.baeldung.com/java-json-moshi)
diff --git a/json-2/pom.xml b/json-2/pom.xml
index 72b3295b2b..e0295af59b 100644
--- a/json-2/pom.xml
+++ b/json-2/pom.xml
@@ -33,9 +33,26 @@
${assertj-core.version}
test
+
+
+ com.squareup.moshi
+ moshi
+ ${moshi.version}
+
+
+ com.squareup.moshi
+ moshi-adapters
+ ${moshi.version}
+
+
+ org.apache.commons
+ commons-lang3
+ 3.9
+
0.9.23
3.11.1
+ 1.9.2
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/AlternativeAdapterUnitTest.java b/json-2/src/test/java/com/baeldung/moshi/AlternativeAdapterUnitTest.java
similarity index 100%
rename from libraries-3/src/test/java/com/baeldung/moshi/AlternativeAdapterUnitTest.java
rename to json-2/src/test/java/com/baeldung/moshi/AlternativeAdapterUnitTest.java
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/ArrayUnitTest.java b/json-2/src/test/java/com/baeldung/moshi/ArrayUnitTest.java
similarity index 100%
rename from libraries-3/src/test/java/com/baeldung/moshi/ArrayUnitTest.java
rename to json-2/src/test/java/com/baeldung/moshi/ArrayUnitTest.java
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/ComplexAdapterUnitTest.java b/json-2/src/test/java/com/baeldung/moshi/ComplexAdapterUnitTest.java
similarity index 100%
rename from libraries-3/src/test/java/com/baeldung/moshi/ComplexAdapterUnitTest.java
rename to json-2/src/test/java/com/baeldung/moshi/ComplexAdapterUnitTest.java
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/DefaultUnitTest.java b/json-2/src/test/java/com/baeldung/moshi/DefaultUnitTest.java
similarity index 100%
rename from libraries-3/src/test/java/com/baeldung/moshi/DefaultUnitTest.java
rename to json-2/src/test/java/com/baeldung/moshi/DefaultUnitTest.java
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/PrimitiveUnitTest.java b/json-2/src/test/java/com/baeldung/moshi/PrimitiveUnitTest.java
similarity index 100%
rename from libraries-3/src/test/java/com/baeldung/moshi/PrimitiveUnitTest.java
rename to json-2/src/test/java/com/baeldung/moshi/PrimitiveUnitTest.java
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/RenameUnitTest.java b/json-2/src/test/java/com/baeldung/moshi/RenameUnitTest.java
similarity index 100%
rename from libraries-3/src/test/java/com/baeldung/moshi/RenameUnitTest.java
rename to json-2/src/test/java/com/baeldung/moshi/RenameUnitTest.java
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/SimpleAdapterUnitTest.java b/json-2/src/test/java/com/baeldung/moshi/SimpleAdapterUnitTest.java
similarity index 100%
rename from libraries-3/src/test/java/com/baeldung/moshi/SimpleAdapterUnitTest.java
rename to json-2/src/test/java/com/baeldung/moshi/SimpleAdapterUnitTest.java
diff --git a/libraries-3/src/test/java/com/baeldung/moshi/TransientUnitTest.java b/json-2/src/test/java/com/baeldung/moshi/TransientUnitTest.java
similarity index 100%
rename from libraries-3/src/test/java/com/baeldung/moshi/TransientUnitTest.java
rename to json-2/src/test/java/com/baeldung/moshi/TransientUnitTest.java
diff --git a/kotlin-libraries-2/src/test/kotlin/com/baeldung/fuel/FuelHttpUnitTest.kt b/kotlin-libraries-2/src/test/kotlin/com/baeldung/fuel/FuelHttpLiveTest.kt
similarity index 97%
rename from kotlin-libraries-2/src/test/kotlin/com/baeldung/fuel/FuelHttpUnitTest.kt
rename to kotlin-libraries-2/src/test/kotlin/com/baeldung/fuel/FuelHttpLiveTest.kt
index b7993c5f43..69b6ae88c6 100644
--- a/kotlin-libraries-2/src/test/kotlin/com/baeldung/fuel/FuelHttpUnitTest.kt
+++ b/kotlin-libraries-2/src/test/kotlin/com/baeldung/fuel/FuelHttpLiveTest.kt
@@ -12,7 +12,11 @@ import org.junit.jupiter.api.Test
import java.io.File
import java.util.concurrent.CountDownLatch
-internal class FuelHttpUnitTest {
+/**
+ * These live tests make connections to the external systems: http://httpbin.org, https://jsonplaceholder.typicode.com
+ * Make sure these hosts are up and your internet connection is on before running the tests.
+ */
+internal class FuelHttpLiveTest {
@Test
fun whenMakingAsyncHttpGetRequest_thenResponseNotNullAndErrorNullAndStatusCode200() {
diff --git a/libraries-3/README.md b/libraries-3/README.md
index 404045e6b1..0a76c7ff6e 100644
--- a/libraries-3/README.md
+++ b/libraries-3/README.md
@@ -12,3 +12,5 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m
- [Guide to the Cactoos Library](https://www.baeldung.com/java-cactoos)
- [Parsing Command-Line Parameters with Airline](https://www.baeldung.com/java-airline)
- [Introduction to cache2k](https://www.baeldung.com/java-cache2k)
+- [Introduction to the jcabi-aspects AOP Annotations Library](https://www.baeldung.com/java-jcabi-aspects)
+- [Introduction to Takes](https://www.baeldung.com/java-takes)
diff --git a/libraries-3/pom.xml b/libraries-3/pom.xml
index a438d423e2..68b5f2aa21 100644
--- a/libraries-3/pom.xml
+++ b/libraries-3/pom.xml
@@ -73,16 +73,6 @@
${cache2k.version}
pom
-
- com.squareup.moshi
- moshi
- ${moshi.version}
-
-
- com.squareup.moshi
- moshi-adapters
- ${moshi.version}
-
com.jcabi
jcabi-aspects
@@ -201,7 +191,6 @@
0.43
2.7.2
1.2.3.Final
- 1.9.2
0.22.6
1.9.2
0.14.1
diff --git a/libraries-3/src/main/java/com/baeldung/arthas/FibonacciGenerator.java b/libraries-3/src/main/java/com/baeldung/arthas/FibonacciGenerator.java
new file mode 100644
index 0000000000..27cf0dacf6
--- /dev/null
+++ b/libraries-3/src/main/java/com/baeldung/arthas/FibonacciGenerator.java
@@ -0,0 +1,25 @@
+package com.baeldung.arthas;
+
+import java.io.IOException;
+
+import static java.lang.String.format;
+
+public class FibonacciGenerator {
+
+ public static void main(String[] args) throws IOException {
+ System.out.println("Press a key to continue");
+ System.in.read();
+ for (int i = 0; i < 100; i++) {
+ long result = fibonacci(i);
+ System.out.println(format("fib(%d): %d", i, result));
+ }
+ }
+
+ public static long fibonacci(int n) {
+ if (n == 0 || n == 1) {
+ return 1L;
+ } else {
+ return fibonacci(n - 1) + fibonacci(n - 2);
+ }
+ }
+}
diff --git a/libraries-data-io/README.md b/libraries-data-io/README.md
index 550f353c97..3e68334ec9 100644
--- a/libraries-data-io/README.md
+++ b/libraries-data-io/README.md
@@ -9,3 +9,4 @@ This module contains articles about IO data processing libraries.
- [Introduction To OpenCSV](https://www.baeldung.com/opencsv)
- [Interact with Google Sheets from Java](https://www.baeldung.com/google-sheets-java-client)
- [Introduction To Docx4J](https://www.baeldung.com/docx4j)
+- [Breaking YAML Strings Over Multiple Lines](https://www.baeldung.com/yaml-multi-line)
diff --git a/libraries/README.md b/libraries/README.md
index 79ba8fe55d..f439033730 100644
--- a/libraries/README.md
+++ b/libraries/README.md
@@ -45,4 +45,5 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m
- [Implementing a FTP-Client in Java](https://www.baeldung.com/java-ftp-client)
- [Introduction to Functional Java](https://www.baeldung.com/java-functional-library)
- [A Guide to the Reflections Library](https://www.baeldung.com/reflections-library)
+- [Using NullAway to Avoid NullPointerExceptions](https://www.baeldung.com/java-nullaway)
- More articles [[next -->]](/libraries-2)
diff --git a/open-liberty/README.md b/open-liberty/README.md
new file mode 100644
index 0000000000..6a51d2c486
--- /dev/null
+++ b/open-liberty/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [Introduction to Open Liberty](https://www.baeldung.com/java-open-liberty)
diff --git a/parent-kotlin/pom.xml b/parent-kotlin/pom.xml
index e3d67eaaf2..52a753439c 100644
--- a/parent-kotlin/pom.xml
+++ b/parent-kotlin/pom.xml
@@ -31,7 +31,7 @@
spring-milestone
Spring Milestone Repository
- http://repo.spring.io/milestone
+ https://repo.spring.io/milestone
diff --git a/patterns/design-patterns-creational/src/main/java/com/baeldung/constructorsstaticfactorymethods/entities/User.java b/patterns/design-patterns-creational/src/main/java/com/baeldung/constructorsstaticfactorymethods/entities/User.java
index f05a3baaa3..a602d1c55d 100644
--- a/patterns/design-patterns-creational/src/main/java/com/baeldung/constructorsstaticfactorymethods/entities/User.java
+++ b/patterns/design-patterns-creational/src/main/java/com/baeldung/constructorsstaticfactorymethods/entities/User.java
@@ -19,8 +19,8 @@ public class User {
}
public static User createWithLoggedInstantiationTime(String name, String email, String country) {
- setLoggerProperties();
LOGGER.log(Level.INFO, "Creating User instance at : {0}", LocalTime.now());
+
return new User(name, email, country);
}
@@ -53,11 +53,4 @@ public class User {
public String getCountry() {
return country;
}
-
- private static void setLoggerProperties() {
- ConsoleHandler handler = new ConsoleHandler();
- handler.setLevel(Level.INFO);
- handler.setFormatter(new SimpleFormatter());
- LOGGER.addHandler(handler);
- }
}
diff --git a/persistence-modules/java-mongodb/README.md b/persistence-modules/java-mongodb/README.md
index 41d0ad63f8..a8539e644f 100644
--- a/persistence-modules/java-mongodb/README.md
+++ b/persistence-modules/java-mongodb/README.md
@@ -9,3 +9,4 @@ This module contains articles about MongoDB in Java.
- [MongoDB BSON Guide](https://www.baeldung.com/mongodb-bson)
- [Geospatial Support in MongoDB](https://www.baeldung.com/mongodb-geospatial-support)
- [Introduction to Morphia – Java ODM for MongoDB](https://www.baeldung.com/mongodb-morphia)
+- [MongoDB Aggregations Using Java](https://www.baeldung.com/java-mongodb-aggregations)
diff --git a/persistence-modules/spring-boot-persistence-h2/pom.xml b/persistence-modules/spring-boot-persistence-h2/pom.xml
index 5b5e255211..777bc6cb2d 100644
--- a/persistence-modules/spring-boot-persistence-h2/pom.xml
+++ b/persistence-modules/spring-boot-persistence-h2/pom.xml
@@ -29,12 +29,30 @@
com.h2database
h2
+
+ org.projectlombok
+ lombok
+ ${lombok.version}
+ compile
+
+
+ org.hibernate
+ hibernate-core
+ ${hibernate.version}
+
+
+ com.vladmihalcea
+ db-util
+ ${db-util.version}
+
com.baeldung.h2db.demo.server.SpringBootApp
2.0.4.RELEASE
+ 5.3.11.Final
+ 1.0.4
diff --git a/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/LazyLoadNoTransSpringBootApplication.java b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/LazyLoadNoTransSpringBootApplication.java
new file mode 100644
index 0000000000..a52d9fc2f9
--- /dev/null
+++ b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/LazyLoadNoTransSpringBootApplication.java
@@ -0,0 +1,13 @@
+package com.baeldung.h2db.lazy_load_no_trans;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@SpringBootApplication
+@EnableTransactionManagement
+public class LazyLoadNoTransSpringBootApplication {
+ public static void main(String[] args) {
+ SpringApplication.run(LazyLoadNoTransSpringBootApplication.class, args);
+ }
+}
diff --git a/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/config/DatasourceProxyBeanPostProcessor.java b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/config/DatasourceProxyBeanPostProcessor.java
new file mode 100644
index 0000000000..c087427b65
--- /dev/null
+++ b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/config/DatasourceProxyBeanPostProcessor.java
@@ -0,0 +1,67 @@
+package com.baeldung.h2db.lazy_load_no_trans.config;
+
+import net.ttddyy.dsproxy.listener.DataSourceQueryCountListener;
+import net.ttddyy.dsproxy.listener.logging.CommonsQueryLoggingListener;
+import net.ttddyy.dsproxy.listener.logging.DefaultQueryLogEntryCreator;
+import net.ttddyy.dsproxy.listener.logging.SLF4JLogLevel;
+import net.ttddyy.dsproxy.listener.logging.SLF4JQueryLoggingListener;
+import net.ttddyy.dsproxy.support.ProxyDataSource;
+import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder;
+import org.aopalliance.intercept.MethodInterceptor;
+import org.aopalliance.intercept.MethodInvocation;
+import org.springframework.aop.framework.ProxyFactory;
+import org.springframework.beans.factory.config.BeanPostProcessor;
+import org.springframework.stereotype.Component;
+import org.springframework.util.ReflectionUtils;
+
+import javax.sql.DataSource;
+import java.lang.reflect.Method;
+
+@Component
+public class DatasourceProxyBeanPostProcessor implements BeanPostProcessor {
+
+ @Override
+ public Object postProcessAfterInitialization(Object bean, String beanName) {
+ if (bean instanceof DataSource && !(bean instanceof ProxyDataSource)) {
+ // Instead of directly returning a less specific datasource bean
+ // (e.g.: HikariDataSource -> DataSource), return a proxy object.
+ // See following links for why:
+ // https://stackoverflow.com/questions/44237787/how-to-use-user-defined-database-proxy-in-datajpatest
+ // https://gitter.im/spring-projects/spring-boot?at=5983602d2723db8d5e70a904
+ // http://blog.arnoldgalovics.com/2017/06/26/configuring-a-datasource-proxy-in-spring-boot/
+ final ProxyFactory factory = new ProxyFactory(bean);
+ factory.setProxyTargetClass(true);
+ factory.addAdvice(new ProxyDataSourceInterceptor((DataSource) bean));
+ return factory.getProxy();
+ }
+ return bean;
+ }
+
+ @Override
+ public Object postProcessBeforeInitialization(Object bean, String beanName) {
+ return bean;
+ }
+
+ private static class ProxyDataSourceInterceptor implements MethodInterceptor {
+ private final DataSource dataSource;
+
+ public ProxyDataSourceInterceptor(final DataSource dataSource) {
+ this.dataSource = ProxyDataSourceBuilder.create(dataSource)
+ .name("MyDS")
+ .multiline()
+ .logQueryBySlf4j(SLF4JLogLevel.INFO)
+ .listener(new DataSourceQueryCountListener())
+ .build();
+ }
+
+ @Override
+ public Object invoke(final MethodInvocation invocation) throws Throwable {
+ final Method proxyMethod = ReflectionUtils.findMethod(this.dataSource.getClass(),
+ invocation.getMethod().getName());
+ if (proxyMethod != null) {
+ return proxyMethod.invoke(this.dataSource, invocation.getArguments());
+ }
+ return invocation.proceed();
+ }
+ }
+}
diff --git a/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/entity/Document.java b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/entity/Document.java
new file mode 100644
index 0000000000..9d69e7eb58
--- /dev/null
+++ b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/entity/Document.java
@@ -0,0 +1,26 @@
+package com.baeldung.h2db.lazy_load_no_trans.entity;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.hibernate.annotations.Immutable;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+@Entity
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+@Immutable
+public class Document {
+
+ @Id
+ private Long id;
+
+ private String title;
+
+ private Long userId;
+}
diff --git a/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/entity/User.java b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/entity/User.java
new file mode 100644
index 0000000000..ae9cb9e4e8
--- /dev/null
+++ b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/entity/User.java
@@ -0,0 +1,37 @@
+package com.baeldung.h2db.lazy_load_no_trans.entity;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.hibernate.annotations.Fetch;
+import org.hibernate.annotations.FetchMode;
+import org.hibernate.annotations.Immutable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import java.util.ArrayList;
+import java.util.List;
+
+@Entity
+@Getter
+@Setter
+@NoArgsConstructor
+@AllArgsConstructor
+@Immutable
+public class User {
+
+ @Id
+ @GeneratedValue
+ private Long id;
+
+ private String name;
+
+ private String comment;
+
+ @OneToMany(mappedBy = "userId")
+ @Fetch(FetchMode.SUBSELECT)
+ private List docs = new ArrayList<>();
+}
diff --git a/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/repository/UserRepository.java b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/repository/UserRepository.java
new file mode 100644
index 0000000000..bafe484163
--- /dev/null
+++ b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/repository/UserRepository.java
@@ -0,0 +1,9 @@
+package com.baeldung.h2db.lazy_load_no_trans.repository;
+
+import com.baeldung.h2db.lazy_load_no_trans.entity.User;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface UserRepository extends JpaRepository {
+}
\ No newline at end of file
diff --git a/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/service/ServiceLayer.java b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/service/ServiceLayer.java
new file mode 100644
index 0000000000..ff3783fd9d
--- /dev/null
+++ b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/lazy_load_no_trans/service/ServiceLayer.java
@@ -0,0 +1,34 @@
+package com.baeldung.h2db.lazy_load_no_trans.service;
+
+import com.baeldung.h2db.lazy_load_no_trans.entity.User;
+import com.baeldung.h2db.lazy_load_no_trans.repository.UserRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Collection;
+
+@Service
+public class ServiceLayer {
+
+ @Autowired
+ private UserRepository userRepository;
+
+ @Transactional(readOnly = true)
+ public long countAllDocsTransactional() {
+ return countAllDocs();
+ }
+
+ public long countAllDocsNonTransactional() {
+ return countAllDocs();
+ }
+
+ private long countAllDocs() {
+ return userRepository.findAll()
+ .stream()
+ .map(User::getDocs)
+ .mapToLong(Collection::size)
+ .sum();
+ }
+
+}
diff --git a/persistence-modules/spring-boot-persistence-h2/src/main/resources/application-lazy-load-no-trans-off.properties b/persistence-modules/spring-boot-persistence-h2/src/main/resources/application-lazy-load-no-trans-off.properties
new file mode 100644
index 0000000000..b5fb841685
--- /dev/null
+++ b/persistence-modules/spring-boot-persistence-h2/src/main/resources/application-lazy-load-no-trans-off.properties
@@ -0,0 +1,13 @@
+spring.datasource.url=jdbc:h2:mem:mydb
+spring.datasource.driverClassName=org.h2.Driver
+spring.datasource.username=sa
+spring.datasource.password=
+spring.jpa.hibernate.ddl-auto=create-drop
+spring.h2.console.enabled=true
+spring.h2.console.path=/h2-console
+
+logging.level.org.hibernate.SQL=INFO
+logging.level.org.hibernate.type=TRACE
+spring.jpa.properties.hibernate.validator.apply_to_ddl=false
+spring.jpa.properties.hibernate.enable_lazy_load_no_trans=false
+spring.jpa.open-in-view=false
\ No newline at end of file
diff --git a/persistence-modules/spring-boot-persistence-h2/src/main/resources/application-lazy-load-no-trans-on.properties b/persistence-modules/spring-boot-persistence-h2/src/main/resources/application-lazy-load-no-trans-on.properties
new file mode 100644
index 0000000000..04579e1dae
--- /dev/null
+++ b/persistence-modules/spring-boot-persistence-h2/src/main/resources/application-lazy-load-no-trans-on.properties
@@ -0,0 +1,13 @@
+spring.datasource.url=jdbc:h2:mem:mydb
+spring.datasource.driverClassName=org.h2.Driver
+spring.datasource.username=sa
+spring.datasource.password=
+spring.jpa.hibernate.ddl-auto=create-drop
+spring.h2.console.enabled=true
+spring.h2.console.path=/h2-console
+
+logging.level.org.hibernate.SQL=INFO
+logging.level.org.hibernate.type=TRACE
+spring.jpa.properties.hibernate.validator.apply_to_ddl=false
+spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
+spring.jpa.open-in-view=false
\ No newline at end of file
diff --git a/persistence-modules/spring-boot-persistence-h2/src/main/resources/data.sql b/persistence-modules/spring-boot-persistence-h2/src/main/resources/data.sql
index 2d7b446005..b8835e70cb 100644
--- a/persistence-modules/spring-boot-persistence-h2/src/main/resources/data.sql
+++ b/persistence-modules/spring-boot-persistence-h2/src/main/resources/data.sql
@@ -10,4 +10,17 @@ CREATE TABLE billionaires (
INSERT INTO billionaires (first_name, last_name, career) VALUES
('Aliko', 'Dangote', 'Billionaire Industrialist'),
('Bill', 'Gates', 'Billionaire Tech Entrepreneur'),
-('Folrunsho', 'Alakija', 'Billionaire Oil Magnate');
\ No newline at end of file
+('Folrunsho', 'Alakija', 'Billionaire Oil Magnate');
+
+insert into USER values (101, 'user1', 'comment1');
+insert into USER values (102, 'user2', 'comment2');
+insert into USER values (103, 'user3', 'comment3');
+insert into USER values (104, 'user4', 'comment4');
+insert into USER values (105, 'user5', 'comment5');
+
+insert into DOCUMENT values (1, 'doc1', 101);
+insert into DOCUMENT values (2, 'doc2', 101);
+insert into DOCUMENT values (3, 'doc3', 101);
+insert into DOCUMENT values (4, 'doc4', 101);
+insert into DOCUMENT values (5, 'doc5', 102);
+insert into DOCUMENT values (6, 'doc6', 102);
\ No newline at end of file
diff --git a/persistence-modules/spring-boot-persistence-h2/src/test/java/com/baeldung/lazy_load_no_trans/LazyLoadNoTransPropertyOffIntegrationTest.java b/persistence-modules/spring-boot-persistence-h2/src/test/java/com/baeldung/lazy_load_no_trans/LazyLoadNoTransPropertyOffIntegrationTest.java
new file mode 100644
index 0000000000..cb5063d8a4
--- /dev/null
+++ b/persistence-modules/spring-boot-persistence-h2/src/test/java/com/baeldung/lazy_load_no_trans/LazyLoadNoTransPropertyOffIntegrationTest.java
@@ -0,0 +1,41 @@
+package com.baeldung.lazy_load_no_trans;
+
+import com.baeldung.h2db.lazy_load_no_trans.LazyLoadNoTransSpringBootApplication;
+import com.baeldung.h2db.lazy_load_no_trans.service.ServiceLayer;
+import com.vladmihalcea.sql.SQLStatementCountValidator;
+import org.hibernate.LazyInitializationException;
+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.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import static org.junit.Assert.assertEquals;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = LazyLoadNoTransSpringBootApplication.class)
+@ActiveProfiles("lazy-load-no-trans-off")
+public class LazyLoadNoTransPropertyOffIntegrationTest {
+
+ @Autowired
+ private ServiceLayer serviceLayer;
+
+ private static final long EXPECTED_DOCS_COLLECTION_SIZE = 6;
+
+ @Test(expected = LazyInitializationException.class)
+ public void whenCallNonTransactionalMethodWithPropertyOff_thenThrowException() {
+ serviceLayer.countAllDocsNonTransactional();
+ }
+
+ @Test
+ public void whenCallTransactionalMethodWithPropertyOff_thenTestPass() {
+ SQLStatementCountValidator.reset();
+
+ long docsCount = serviceLayer.countAllDocsTransactional();
+
+ assertEquals(EXPECTED_DOCS_COLLECTION_SIZE, docsCount);
+
+ SQLStatementCountValidator.assertSelectCount(2);
+ }
+}
diff --git a/persistence-modules/spring-boot-persistence-h2/src/test/java/com/baeldung/lazy_load_no_trans/LazyLoadNoTransPropertyOnIntegrationTest.java b/persistence-modules/spring-boot-persistence-h2/src/test/java/com/baeldung/lazy_load_no_trans/LazyLoadNoTransPropertyOnIntegrationTest.java
new file mode 100644
index 0000000000..5968fde7b7
--- /dev/null
+++ b/persistence-modules/spring-boot-persistence-h2/src/test/java/com/baeldung/lazy_load_no_trans/LazyLoadNoTransPropertyOnIntegrationTest.java
@@ -0,0 +1,47 @@
+package com.baeldung.lazy_load_no_trans;
+
+import com.baeldung.h2db.lazy_load_no_trans.LazyLoadNoTransSpringBootApplication;
+import com.baeldung.h2db.lazy_load_no_trans.service.ServiceLayer;
+import com.vladmihalcea.sql.SQLStatementCountValidator;
+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.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import static org.junit.Assert.assertEquals;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = LazyLoadNoTransSpringBootApplication.class)
+@ActiveProfiles("lazy-load-no-trans-on")
+public class LazyLoadNoTransPropertyOnIntegrationTest {
+
+ @Autowired
+ private ServiceLayer serviceLayer;
+
+ private static final long EXPECTED_DOCS_COLLECTION_SIZE = 6;
+ private static final long EXPECTED_USERS_COUNT = 5;
+
+ @Test
+ public void whenCallNonTransactionalMethodWithPropertyOn_thenGetNplusOne() {
+ SQLStatementCountValidator.reset();
+
+ long docsCount = serviceLayer.countAllDocsNonTransactional();
+
+ assertEquals(EXPECTED_DOCS_COLLECTION_SIZE, docsCount);
+
+ SQLStatementCountValidator.assertSelectCount(EXPECTED_USERS_COUNT + 1);
+ }
+
+ @Test
+ public void whenCallTransactionalMethodWithPropertyOn_thenTestPass() {
+ SQLStatementCountValidator.reset();
+
+ long docsCount = serviceLayer.countAllDocsTransactional();
+
+ assertEquals(EXPECTED_DOCS_COLLECTION_SIZE, docsCount);
+
+ SQLStatementCountValidator.assertSelectCount(2);
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-4/README.md b/persistence-modules/spring-data-jpa-4/README.md
index 42e4619a59..3884435f75 100644
--- a/persistence-modules/spring-data-jpa-4/README.md
+++ b/persistence-modules/spring-data-jpa-4/README.md
@@ -5,6 +5,7 @@
- [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)
+- [Calling Stored Procedures from Spring Data JPA Repositories](https://www.baeldung.com/spring-data-jpa-stored-procedures)
### Eclipse Config
After importing the project into Eclipse, you may see the following error:
diff --git a/persistence-modules/spring-data-redis/README.md b/persistence-modules/spring-data-redis/README.md
index e4a528ae91..175634376b 100644
--- a/persistence-modules/spring-data-redis/README.md
+++ b/persistence-modules/spring-data-redis/README.md
@@ -4,6 +4,7 @@
- [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)
+- [Delete Everything in Redis](https://www.baeldung.com/redis-delete-data)
### Build the Project with Tests Running
```
diff --git a/play-framework/async-http/README.md b/play-framework/async-http/README.md
new file mode 100644
index 0000000000..c42b86ad4e
--- /dev/null
+++ b/play-framework/async-http/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [Asynchronous HTTP Programming with Play Framework](https://www.baeldung.com/java-play-asynchronous-http-programming)
diff --git a/rxjava-core/README.md b/rxjava-core/README.md
index 95a374668d..2773bd9423 100644
--- a/rxjava-core/README.md
+++ b/rxjava-core/README.md
@@ -13,5 +13,4 @@ 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/spring-5/README.md b/spring-5/README.md
index 857b199562..d50f9c7544 100644
--- a/spring-5/README.md
+++ b/spring-5/README.md
@@ -16,3 +16,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
- [Spring Assert Statements](https://www.baeldung.com/spring-assert)
- [Configuring a Hikari Connection Pool with Spring Boot](https://www.baeldung.com/spring-boot-hikari)
- [Difference between \ vs \](https://www.baeldung.com/spring-contextannotation-contextcomponentscan)
+- [Finding the Spring Version](https://www.baeldung.com/spring-find-version)
diff --git a/spring-amqp/README.md b/spring-amqp/README.md
index 6b09aec10a..7d202f49f8 100644
--- a/spring-amqp/README.md
+++ b/spring-amqp/README.md
@@ -7,3 +7,4 @@ This module contains articles about Spring with the AMQP messaging system
- [Messaging With Spring AMQP](https://www.baeldung.com/spring-amqp)
- [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)
+- [Exponential Backoff With Spring AMQP](https://www.baeldung.com/spring-amqp-exponential-backoff)
diff --git a/spring-batch/README.md b/spring-batch/README.md
index 99ac9826bc..d637de269c 100644
--- a/spring-batch/README.md
+++ b/spring-batch/README.md
@@ -9,3 +9,4 @@ This module contains articles about Spring Batch
- [How to Trigger and Stop a Scheduled Spring Batch Job](https://www.baeldung.com/spring-batch-start-stop-job)
- [Configuring Skip Logic in Spring Batch](https://www.baeldung.com/spring-batch-skip-logic)
- [Testing a Spring Batch Job](https://www.baeldung.com/spring-batch-testing-job)
+- [Configuring Retry Logic in Spring Batch](https://www.baeldung.com/spring-batch-retry-logic)
diff --git a/spring-boot-modules/spring-boot-bootstrap/README.md b/spring-boot-modules/spring-boot-bootstrap/README.md
index 5fb8fd4a84..146cd04551 100644
--- a/spring-boot-modules/spring-boot-bootstrap/README.md
+++ b/spring-boot-modules/spring-boot-bootstrap/README.md
@@ -10,3 +10,4 @@ This module contains articles about bootstrapping Spring Boot applications.
- [Deploy a Spring Boot Application to OpenShift](https://www.baeldung.com/spring-boot-deploy-openshift)
- [Deploy a Spring Boot Application to AWS Beanstalk](https://www.baeldung.com/spring-boot-deploy-aws-beanstalk)
- [Guide to @SpringBootConfiguration in Spring Boot](https://www.baeldung.com/springbootconfiguration-annotation)
+- [Implement Health Checks in OpenShift](https://www.baeldung.com/openshift-health-checks)
diff --git a/spring-boot-modules/spring-boot-mvc-2/README.md b/spring-boot-modules/spring-boot-mvc-2/README.md
index cb0eea4c2a..4200f58024 100644
--- a/spring-boot-modules/spring-boot-mvc-2/README.md
+++ b/spring-boot-modules/spring-boot-mvc-2/README.md
@@ -6,4 +6,5 @@ This module contains articles about Spring Web MVC in Spring Boot projects.
- [Functional Controllers in Spring MVC](https://www.baeldung.com/spring-mvc-functional-controllers)
- [Specify an Array of Strings as Body Parameters in Swagger](https://www.baeldung.com/swagger-body-array-of-strings)
-- More articles: [[prev -->]](/spring-boot-mvc)
+- [Swagger @ApiParam vs @ApiModelProperty](https://www.baeldung.com/swagger-apiparam-vs-apimodelproperty)
+- More articles: [[prev -->]](/spring-boot-modules/spring-boot-mvc)
diff --git a/spring-boot-modules/spring-boot-mvc/README.md b/spring-boot-modules/spring-boot-mvc/README.md
index b4f87d1d40..2e67c42ede 100644
--- a/spring-boot-modules/spring-boot-mvc/README.md
+++ b/spring-boot-modules/spring-boot-mvc/README.md
@@ -10,4 +10,4 @@ This module contains articles about Spring Web MVC in Spring Boot projects.
- [A Controller, Service and DAO Example with Spring Boot and JSF](https://www.baeldung.com/jsf-spring-boot-controller-service-dao)
- [Setting Up Swagger 2 with a Spring REST API](https://www.baeldung.com/swagger-2-documentation-for-spring-rest-api)
- [Using Spring ResponseEntity to Manipulate the HTTP Response](https://www.baeldung.com/spring-response-entity)
-- More articles: [[next -->]](/spring-boot-mvc-2)
+- More articles: [[next -->]](/spring-boot-modules/spring-boot-mvc-2)
diff --git a/spring-boot-modules/spring-boot-properties/README.md b/spring-boot-modules/spring-boot-properties/README.md
index daf7c55ab3..f861a01d10 100644
--- a/spring-boot-modules/spring-boot-properties/README.md
+++ b/spring-boot-modules/spring-boot-properties/README.md
@@ -12,3 +12,5 @@ This module contains articles about Properties in Spring Boot.
- [Spring YAML Configuration](https://www.baeldung.com/spring-yaml)
- [Using Spring @Value with Defaults](https://www.baeldung.com/spring-value-defaults)
- [How to Inject a Property Value Into a Class Not Managed by Spring?](https://www.baeldung.com/inject-properties-value-non-spring-class)
+- [Add Build Properties to a Spring Boot Application](https://www.baeldung.com/spring-boot-build-properties)
+- [IntelliJ – Cannot Resolve Spring Boot Configuration Properties Error](https://www.baeldung.com/intellij-resolve-spring-boot-configuration-properties)
diff --git a/spring-boot-modules/spring-boot-testing/README.md b/spring-boot-modules/spring-boot-testing/README.md
index b033826541..9bbaf337d7 100644
--- a/spring-boot-modules/spring-boot-testing/README.md
+++ b/spring-boot-modules/spring-boot-testing/README.md
@@ -12,4 +12,5 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
- [Exclude Auto-Configuration Classes in Spring Boot Tests](https://www.baeldung.com/spring-boot-exclude-auto-configuration-test)
- [Setting the Log Level in Spring Boot when Testing](https://www.baeldung.com/spring-boot-testing-log-level)
- [Embedded Redis Server with Spring Boot Test](https://www.baeldung.com/spring-embedded-redis)
+- [Testing Spring Boot @ConfigurationProperties](https://www.baeldung.com/spring-boot-testing-configurationproperties)
- [Prevent ApplicationRunner or CommandLineRunner Beans From Executing During Junit Testing]()
diff --git a/spring-cloud/spring-cloud-gateway/README.md b/spring-cloud/spring-cloud-gateway/README.md
index d3323947e8..9c8e0d443a 100644
--- a/spring-cloud/spring-cloud-gateway/README.md
+++ b/spring-cloud/spring-cloud-gateway/README.md
@@ -5,3 +5,4 @@ This module contains articles about Spring Cloud Gateway
### Relevant Articles:
- [Exploring the new Spring Cloud Gateway](http://www.baeldung.com/spring-cloud-gateway)
- [Writing Custom Spring Cloud Gateway Filters](https://www.baeldung.com/spring-cloud-custom-gateway-filters)
+- [Spring Cloud Gateway Routing Predicate Factories](https://www.baeldung.com/spring-cloud-gateway-routing-predicate-factories)
diff --git a/spring-cloud/spring-cloud-zuul/README.md b/spring-cloud/spring-cloud-zuul/README.md
index b8e1773930..acd56a213c 100644
--- a/spring-cloud/spring-cloud-zuul/README.md
+++ b/spring-cloud/spring-cloud-zuul/README.md
@@ -5,3 +5,4 @@ This module contains articles about Spring with Netflix Zuul
### Relevant Articles:
- [Rate Limiting in Spring Cloud Netflix Zuul](https://www.baeldung.com/spring-cloud-zuul-rate-limit)
- [Spring REST with a Zuul Proxy](https://www.baeldung.com/spring-rest-with-zuul-proxy)
+- [Modifying the Response Body in a Zuul Filter](https://www.baeldung.com/zuul-filter-modifying-response-body)
diff --git a/spring-core-3/README.md b/spring-core-3/README.md
index ae2d33c196..b2c4f694a8 100644
--- a/spring-core-3/README.md
+++ b/spring-core-3/README.md
@@ -8,4 +8,6 @@ This module contains articles about core Spring functionality
- [Guide to the Spring BeanFactory](https://www.baeldung.com/spring-beanfactory)
- [How to use the Spring FactoryBean?](https://www.baeldung.com/spring-factorybean)
- [Spring – Injecting Collections](https://www.baeldung.com/spring-injecting-collections)
+- [Design Patterns in the Spring Framework](https://www.baeldung.com/spring-framework-design-patterns)
+- [Injecting a Value in a Static Field in Spring](https://www.baeldung.com/spring-inject-static-field)
- More articles: [[<-- prev]](/spring-core-2)
diff --git a/spring-core-3/static-value-injection/src/main/java/com/baeldung/Application.java b/spring-core-3/src/main/java/com/baeldung/staticvalue/injection/Application.java
similarity index 64%
rename from spring-core-3/static-value-injection/src/main/java/com/baeldung/Application.java
rename to spring-core-3/src/main/java/com/baeldung/staticvalue/injection/Application.java
index c1875216b5..45c47c955f 100644
--- a/spring-core-3/static-value-injection/src/main/java/com/baeldung/Application.java
+++ b/spring-core-3/src/main/java/com/baeldung/staticvalue/injection/Application.java
@@ -1,9 +1,12 @@
-package com.baeldung;
+package com.baeldung.staticvalue.injection;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.PropertySource;
@SpringBootApplication
+@PropertySource("/application.properties")
+
public class Application {
public static void main(String[] args) {
diff --git a/spring-core-3/static-value-injection/src/main/java/com/baeldung/controller/PropertyController.java b/spring-core-3/src/main/java/com/baeldung/staticvalue/injection/PropertyController.java
similarity index 89%
rename from spring-core-3/static-value-injection/src/main/java/com/baeldung/controller/PropertyController.java
rename to spring-core-3/src/main/java/com/baeldung/staticvalue/injection/PropertyController.java
index 03a2518117..f5910ea4f8 100644
--- a/spring-core-3/static-value-injection/src/main/java/com/baeldung/controller/PropertyController.java
+++ b/spring-core-3/src/main/java/com/baeldung/staticvalue/injection/PropertyController.java
@@ -1,7 +1,6 @@
-package com.baeldung.controller;
+package com.baeldung.staticvalue.injection;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
diff --git a/spring-core-3/static-value-injection/src/main/resources/application.properties b/spring-core-3/src/main/resources/application.properties
similarity index 100%
rename from spring-core-3/static-value-injection/src/main/resources/application.properties
rename to spring-core-3/src/main/resources/application.properties
diff --git a/spring-core-3/static-value-injection/README.md b/spring-core-3/static-value-injection/README.md
deleted file mode 100644
index 06dfa29f80..0000000000
--- a/spring-core-3/static-value-injection/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# Inject a value to a static field
-
-## How to run
-```sh
-mvn clean install
-mvn spring-boot:run
-```
-
-## Request
-
-**GET**
-http://localhost:8080/properties
-
-
-## Response
-```json
-[
- "Inject a value to a static field",
- "Inject a value to a static field",
- null
-]
-```
diff --git a/spring-core-3/static-value-injection/pom.xml b/spring-core-3/static-value-injection/pom.xml
deleted file mode 100644
index aa45fde886..0000000000
--- a/spring-core-3/static-value-injection/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
- 4.0.0
-
- org.springframework.boot
- spring-boot-starter-parent
- 2.2.4.RELEASE
-
-
- com.baeldung
- static.value.injection
- 0.0.1-SNAPSHOT
- static.value.injection
- Demo project for Spring Boot
-
-
- 1.8
-
-
-
-
- org.springframework.boot
- spring-boot-starter
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- org.junit.vintage
- junit-vintage-engine
-
-
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
-
diff --git a/spring-core-3/static-value-injection/src/test/java/com/baeldung/ApplicationTests.java b/spring-core-3/static-value-injection/src/test/java/com/baeldung/ApplicationTests.java
deleted file mode 100644
index 4ad83bc539..0000000000
--- a/spring-core-3/static-value-injection/src/test/java/com/baeldung/ApplicationTests.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.baeldung;
-
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-@SpringBootTest
-class ApplicationTests {
-
- @Test
- void contextLoads() {
- }
-
-}
diff --git a/spring-ejb/ejb-beans/README.md b/spring-ejb/ejb-beans/README.md
new file mode 100644
index 0000000000..f1af5a3a87
--- /dev/null
+++ b/spring-ejb/ejb-beans/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [Spring Bean vs. EJB – A Feature Comparison](https://www.baeldung.com/spring-bean-vs-ejb)
diff --git a/spring-mvc-java-2/README.md b/spring-mvc-java-2/README.md
new file mode 100644
index 0000000000..b5d5df3cd4
--- /dev/null
+++ b/spring-mvc-java-2/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [Cache Headers in Spring MVC](https://www.baeldung.com/spring-mvc-cache-headers)
diff --git a/spring-mvc-xml/README.md b/spring-mvc-xml/README.md
index 0adf127aaa..685e7686b1 100644
--- a/spring-mvc-xml/README.md
+++ b/spring-mvc-xml/README.md
@@ -17,6 +17,7 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
- [A Java Web Application Without a web.xml](https://www.baeldung.com/java-web-app-without-web-xml)
- [Validating RequestParams and PathVariables in Spring](https://www.baeldung.com/spring-validate-requestparam-pathvariable)
- [Debugging the Spring MVC 404 “No mapping found for HTTP request” Error](https://www.baeldung.com/spring-mvc-404-error)
+- [Getting Started with CRaSH](https://www.baeldung.com/jvm-crash-shell)
## Spring MVC with XML Configuration Example Project
diff --git a/spring-rest-http/README.md b/spring-rest-http/README.md
index 54b31e80c4..35793cb281 100644
--- a/spring-rest-http/README.md
+++ b/spring-rest-http/README.md
@@ -12,3 +12,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
- [Returning Custom Status Codes from Spring Controllers](https://www.baeldung.com/spring-mvc-controller-custom-http-status-code)
- [Spring RequestMapping](https://www.baeldung.com/spring-requestmapping)
- [Guide to DeferredResult in Spring](https://www.baeldung.com/spring-deferred-result)
+- [Using JSON Patch in Spring REST APIs](https://www.baeldung.com/spring-rest-json-patch)
diff --git a/spring-security-modules/spring-security-mvc-boot-1/pom.xml b/spring-security-modules/spring-security-mvc-boot-1/pom.xml
index 7dfee200d4..7ad18376ec 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/pom.xml
+++ b/spring-security-modules/spring-security-mvc-boot-1/pom.xml
@@ -222,10 +222,10 @@
- org.baeldung.custom.Application
+ com.baeldung.roles.custom.Application
-
+
1.1.2
1.6.1
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/AppConfig.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/AppConfig.java
similarity index 92%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/AppConfig.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/AppConfig.java
index 8719e39a20..ab2cc71fec 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/AppConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/AppConfig.java
@@ -1,4 +1,4 @@
-package com.baeldung;
+package com.baeldung.relationships;
import java.util.Properties;
@@ -19,7 +19,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
@SpringBootApplication
@PropertySource({"classpath:persistence-h2.properties", "classpath:application-defaults.properties"})
-@EnableJpaRepositories(basePackages = { "com.baeldung.data.repositories" })
+@EnableJpaRepositories(basePackages = {"com.baeldung.relationships.repositories"})
@EnableWebMvc
@Import(SpringSecurityConfig.class)
public class AppConfig extends WebMvcConfigurerAdapter {
@@ -41,7 +41,7 @@ public class AppConfig extends WebMvcConfigurerAdapter {
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource());
- em.setPackagesToScan(new String[] { "com.baeldung.models" });
+ em.setPackagesToScan(new String[] { "com.baeldung.relationships.models" });
em.setJpaVendorAdapter(new HibernateJpaVendorAdapter());
em.setJpaProperties(additionalProperties());
return em;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/SpringSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/SpringSecurityConfig.java
similarity index 94%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/SpringSecurityConfig.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/SpringSecurityConfig.java
index ee13678a24..88814038a8 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/SpringSecurityConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/SpringSecurityConfig.java
@@ -1,4 +1,4 @@
-package com.baeldung;
+package com.baeldung.relationships;
import javax.annotation.PostConstruct;
import javax.sql.DataSource;
@@ -18,8 +18,8 @@ import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.data.repository.query.SecurityEvaluationContextExtension;
import org.springframework.web.context.WebApplicationContext;
-import com.baeldung.security.AuthenticationSuccessHandlerImpl;
-import com.baeldung.security.CustomUserDetailsService;
+import com.baeldung.relationships.security.AuthenticationSuccessHandlerImpl;
+import com.baeldung.relationships.security.CustomUserDetailsService;
@Configuration
@EnableWebSecurity
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/models/AppUser.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/models/AppUser.java
similarity index 97%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/models/AppUser.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/models/AppUser.java
index e48233f90a..2efd24e879 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/models/AppUser.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/models/AppUser.java
@@ -1,4 +1,4 @@
-package com.baeldung.models;
+package com.baeldung.relationships.models;
import java.util.Date;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/models/Tweet.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/models/Tweet.java
similarity index 96%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/models/Tweet.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/models/Tweet.java
index 54a96deaf3..d8496f89be 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/models/Tweet.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/models/Tweet.java
@@ -1,4 +1,4 @@
-package com.baeldung.models;
+package com.baeldung.relationships.models;
import java.util.HashSet;
import java.util.Set;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/data/repositories/TweetRepository.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/repositories/TweetRepository.java
similarity index 84%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/data/repositories/TweetRepository.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/repositories/TweetRepository.java
index 7d6446ed0d..4e4b16a151 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/data/repositories/TweetRepository.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/repositories/TweetRepository.java
@@ -1,11 +1,11 @@
-package com.baeldung.data.repositories;
+package com.baeldung.relationships.repositories;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
-import com.baeldung.models.Tweet;
+import com.baeldung.relationships.models.Tweet;
public interface TweetRepository extends PagingAndSortingRepository {
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/data/repositories/UserRepository.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/repositories/UserRepository.java
similarity index 76%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/data/repositories/UserRepository.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/repositories/UserRepository.java
index 5240c683e0..883ea332f8 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/data/repositories/UserRepository.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/repositories/UserRepository.java
@@ -1,18 +1,15 @@
-package com.baeldung.data.repositories;
+package com.baeldung.relationships.repositories;
import java.util.Date;
import java.util.List;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
-import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
-import com.baeldung.models.AppUser;
+import com.baeldung.relationships.models.AppUser;
public interface UserRepository extends CrudRepository {
AppUser findByUsername(String username);
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/security/AppUserPrincipal.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/security/AppUserPrincipal.java
similarity index 93%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/security/AppUserPrincipal.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/security/AppUserPrincipal.java
index 195f9f7bf6..1ae7d95e41 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/security/AppUserPrincipal.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/security/AppUserPrincipal.java
@@ -1,4 +1,4 @@
-package com.baeldung.security;
+package com.baeldung.relationships.security;
import java.util.Collection;
import java.util.Collections;
@@ -8,7 +8,7 @@ import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
-import com.baeldung.models.AppUser;
+import com.baeldung.relationships.models.AppUser;
public class AppUserPrincipal implements UserDetails {
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/security/AuthenticationSuccessHandlerImpl.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/security/AuthenticationSuccessHandlerImpl.java
similarity index 88%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/security/AuthenticationSuccessHandlerImpl.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/security/AuthenticationSuccessHandlerImpl.java
index 3fc2bc6559..1b85294467 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/security/AuthenticationSuccessHandlerImpl.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/security/AuthenticationSuccessHandlerImpl.java
@@ -1,4 +1,4 @@
-package com.baeldung.security;
+package com.baeldung.relationships.security;
import java.io.IOException;
import java.util.Date;
@@ -12,7 +12,7 @@ import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.stereotype.Component;
-import com.baeldung.data.repositories.UserRepository;
+import com.baeldung.relationships.repositories.UserRepository;
@Component
public class AuthenticationSuccessHandlerImpl implements AuthenticationSuccessHandler {
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/security/CustomUserDetailsService.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/security/CustomUserDetailsService.java
similarity index 87%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/security/CustomUserDetailsService.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/security/CustomUserDetailsService.java
index 016f4f7fa9..10c266bb74 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/security/CustomUserDetailsService.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/security/CustomUserDetailsService.java
@@ -1,4 +1,4 @@
-package com.baeldung.security;
+package com.baeldung.relationships.security;
import javax.annotation.PostConstruct;
@@ -9,8 +9,8 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import org.springframework.web.context.WebApplicationContext;
-import com.baeldung.data.repositories.UserRepository;
-import com.baeldung.models.AppUser;
+import com.baeldung.relationships.repositories.UserRepository;
+import com.baeldung.relationships.models.AppUser;
@Service
public class CustomUserDetailsService implements UserDetailsService {
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/util/DummyContentUtil.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/util/DummyContentUtil.java
similarity index 95%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/util/DummyContentUtil.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/util/DummyContentUtil.java
index f1640264d2..b8e5192b48 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/util/DummyContentUtil.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/relationships/util/DummyContentUtil.java
@@ -1,4 +1,4 @@
-package com.baeldung.util;
+package com.baeldung.relationships.util;
import java.util.ArrayList;
import java.util.Collection;
@@ -10,8 +10,8 @@ import java.util.stream.IntStream;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-import com.baeldung.models.AppUser;
-import com.baeldung.models.Tweet;
+import com.baeldung.relationships.models.AppUser;
+import com.baeldung.relationships.models.Tweet;
public class DummyContentUtil {
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/Application.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/Application.java
similarity index 88%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/Application.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/Application.java
index e051e5a853..e7ace1f962 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/Application.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/Application.java
@@ -1,4 +1,4 @@
-package org.baeldung.custom;
+package com.baeldung.roles.custom;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -7,7 +7,7 @@ import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.PropertySource;
@SpringBootApplication
-@ComponentScan("org.baeldung.custom")
+@ComponentScan("com.baeldung.roles.custom")
@PropertySource("classpath:application-defaults.properties")
public class Application extends SpringBootServletInitializer {
public static void main(String[] args) {
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/config/MethodSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/config/MethodSecurityConfig.java
similarity index 83%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/config/MethodSecurityConfig.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/config/MethodSecurityConfig.java
index 6a005153dc..57ab8b120f 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/config/MethodSecurityConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/config/MethodSecurityConfig.java
@@ -1,7 +1,7 @@
-package org.baeldung.custom.config;
+package com.baeldung.roles.custom.config;
-import org.baeldung.custom.security.CustomMethodSecurityExpressionHandler;
-import org.baeldung.custom.security.CustomPermissionEvaluator;
+import com.baeldung.roles.custom.security.CustomMethodSecurityExpressionHandler;
+import com.baeldung.roles.custom.security.CustomPermissionEvaluator;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.access.expression.method.MethodSecurityExpressionHandler;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/config/MvcConfig.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/config/MvcConfig.java
similarity index 97%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/config/MvcConfig.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/config/MvcConfig.java
index 58d11ea9ae..c99d1e38a5 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/config/MvcConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/config/MvcConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.custom.config;
+package com.baeldung.roles.custom.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/config/SecurityConfig.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/config/SecurityConfig.java
similarity index 96%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/config/SecurityConfig.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/config/SecurityConfig.java
index 06357650dc..6bf04120ab 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/config/SecurityConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/config/SecurityConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.custom.config;
+package com.baeldung.roles.custom.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/SetupData.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/SetupData.java
similarity index 83%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/SetupData.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/SetupData.java
index f0fcce3908..ab57e7436c 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/SetupData.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/SetupData.java
@@ -1,16 +1,16 @@
-package org.baeldung.custom.persistence;
+package com.baeldung.roles.custom.persistence;
import java.util.Arrays;
import java.util.HashSet;
import javax.annotation.PostConstruct;
-import org.baeldung.custom.persistence.dao.OrganizationRepository;
-import org.baeldung.custom.persistence.dao.PrivilegeRepository;
-import org.baeldung.custom.persistence.dao.UserRepository;
-import org.baeldung.custom.persistence.model.Organization;
-import org.baeldung.custom.persistence.model.Privilege;
-import org.baeldung.custom.persistence.model.User;
+import com.baeldung.roles.custom.persistence.dao.OrganizationRepository;
+import com.baeldung.roles.custom.persistence.dao.PrivilegeRepository;
+import com.baeldung.roles.custom.persistence.dao.UserRepository;
+import com.baeldung.roles.custom.persistence.model.Organization;
+import com.baeldung.roles.custom.persistence.model.Privilege;
+import com.baeldung.roles.custom.persistence.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Component;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/dao/OrganizationRepository.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/dao/OrganizationRepository.java
similarity index 63%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/dao/OrganizationRepository.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/dao/OrganizationRepository.java
index 1319a7b9f8..2f585f3527 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/dao/OrganizationRepository.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/dao/OrganizationRepository.java
@@ -1,6 +1,6 @@
-package org.baeldung.custom.persistence.dao;
+package com.baeldung.roles.custom.persistence.dao;
-import org.baeldung.custom.persistence.model.Organization;
+import com.baeldung.roles.custom.persistence.model.Organization;
import org.springframework.data.jpa.repository.JpaRepository;
public interface OrganizationRepository extends JpaRepository {
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/dao/PrivilegeRepository.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/dao/PrivilegeRepository.java
similarity index 62%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/dao/PrivilegeRepository.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/dao/PrivilegeRepository.java
index c232bb986c..c83e0f505e 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/dao/PrivilegeRepository.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/dao/PrivilegeRepository.java
@@ -1,6 +1,6 @@
-package org.baeldung.custom.persistence.dao;
+package com.baeldung.roles.custom.persistence.dao;
-import org.baeldung.custom.persistence.model.Privilege;
+import com.baeldung.roles.custom.persistence.model.Privilege;
import org.springframework.data.jpa.repository.JpaRepository;
public interface PrivilegeRepository extends JpaRepository {
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/dao/UserRepository.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/dao/UserRepository.java
similarity index 74%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/dao/UserRepository.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/dao/UserRepository.java
index 68dd1d756c..884a998219 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/dao/UserRepository.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/dao/UserRepository.java
@@ -1,6 +1,6 @@
-package org.baeldung.custom.persistence.dao;
+package com.baeldung.roles.custom.persistence.dao;
-import org.baeldung.custom.persistence.model.User;
+import com.baeldung.roles.custom.persistence.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/model/Foo.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/model/Foo.java
similarity index 97%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/model/Foo.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/model/Foo.java
index f139382eea..3dbf48f7ce 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/model/Foo.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/model/Foo.java
@@ -1,4 +1,4 @@
-package org.baeldung.custom.persistence.model;
+package com.baeldung.roles.custom.persistence.model;
import javax.persistence.Column;
import javax.persistence.Entity;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/model/Organization.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/model/Organization.java
similarity index 97%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/model/Organization.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/model/Organization.java
index 1fdb88e320..0d0220b6b2 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/model/Organization.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/model/Organization.java
@@ -1,4 +1,4 @@
-package org.baeldung.custom.persistence.model;
+package com.baeldung.roles.custom.persistence.model;
import javax.persistence.Column;
import javax.persistence.Entity;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/model/Privilege.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/model/Privilege.java
similarity index 97%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/model/Privilege.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/model/Privilege.java
index ed3edd5085..60e0506641 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/model/Privilege.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/model/Privilege.java
@@ -1,4 +1,4 @@
-package org.baeldung.custom.persistence.model;
+package com.baeldung.roles.custom.persistence.model;
import javax.persistence.Column;
import javax.persistence.Entity;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/model/User.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/model/User.java
similarity index 98%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/model/User.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/model/User.java
index c14ef034b4..219f40a3df 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/persistence/model/User.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/persistence/model/User.java
@@ -1,4 +1,4 @@
-package org.baeldung.custom.persistence.model;
+package com.baeldung.roles.custom.persistence.model;
import java.util.Set;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionHandler.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/CustomMethodSecurityExpressionHandler.java
similarity index 96%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionHandler.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/CustomMethodSecurityExpressionHandler.java
index 646f5a387f..76e94a9dd4 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionHandler.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/CustomMethodSecurityExpressionHandler.java
@@ -1,4 +1,4 @@
-package org.baeldung.custom.security;
+package com.baeldung.roles.custom.security;
import org.aopalliance.intercept.MethodInvocation;
import org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionRoot.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/CustomMethodSecurityExpressionRoot.java
similarity index 92%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionRoot.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/CustomMethodSecurityExpressionRoot.java
index b2f2be8cf5..dd9f6a5786 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/CustomMethodSecurityExpressionRoot.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/CustomMethodSecurityExpressionRoot.java
@@ -1,6 +1,6 @@
-package org.baeldung.custom.security;
+package com.baeldung.roles.custom.security;
-import org.baeldung.custom.persistence.model.User;
+import com.baeldung.roles.custom.persistence.model.User;
import org.springframework.security.access.expression.SecurityExpressionRoot;
import org.springframework.security.access.expression.method.MethodSecurityExpressionOperations;
import org.springframework.security.core.Authentication;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/CustomPermissionEvaluator.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/CustomPermissionEvaluator.java
similarity index 97%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/CustomPermissionEvaluator.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/CustomPermissionEvaluator.java
index f436b4488b..d69e405b28 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/CustomPermissionEvaluator.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/CustomPermissionEvaluator.java
@@ -1,4 +1,4 @@
-package org.baeldung.custom.security;
+package com.baeldung.roles.custom.security;
import java.io.Serializable;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/MySecurityExpressionRoot.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/MySecurityExpressionRoot.java
similarity index 98%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/MySecurityExpressionRoot.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/MySecurityExpressionRoot.java
index 03d18cb755..8448ad9075 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/MySecurityExpressionRoot.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/MySecurityExpressionRoot.java
@@ -1,11 +1,11 @@
-package org.baeldung.custom.security;
+package com.baeldung.roles.custom.security;
import java.io.Serializable;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
-import org.baeldung.custom.persistence.model.User;
+import com.baeldung.roles.custom.persistence.model.User;
import org.springframework.security.access.PermissionEvaluator;
import org.springframework.security.access.expression.method.MethodSecurityExpressionOperations;
import org.springframework.security.access.hierarchicalroles.RoleHierarchy;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/MyUserDetailsService.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/MyUserDetailsService.java
similarity index 83%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/MyUserDetailsService.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/MyUserDetailsService.java
index b9b40fbcb9..c6514d6c05 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/MyUserDetailsService.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/MyUserDetailsService.java
@@ -1,7 +1,7 @@
-package org.baeldung.custom.security;
+package com.baeldung.roles.custom.security;
-import org.baeldung.custom.persistence.dao.UserRepository;
-import org.baeldung.custom.persistence.model.User;
+import com.baeldung.roles.custom.persistence.dao.UserRepository;
+import com.baeldung.roles.custom.persistence.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/MyUserPrincipal.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/MyUserPrincipal.java
similarity index 89%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/MyUserPrincipal.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/MyUserPrincipal.java
index 7d57227316..41741c64f4 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/security/MyUserPrincipal.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/security/MyUserPrincipal.java
@@ -1,11 +1,11 @@
-package org.baeldung.custom.security;
+package com.baeldung.roles.custom.security;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import org.baeldung.custom.persistence.model.Privilege;
-import org.baeldung.custom.persistence.model.User;
+import com.baeldung.roles.custom.persistence.model.Privilege;
+import com.baeldung.roles.custom.persistence.model.User;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/web/MainController.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/web/MainController.java
similarity index 87%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/web/MainController.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/web/MainController.java
index 74de45d1a8..beb12f7749 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/custom/web/MainController.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/custom/web/MainController.java
@@ -1,9 +1,9 @@
-package org.baeldung.custom.web;
+package com.baeldung.roles.custom.web;
-import org.baeldung.custom.persistence.dao.OrganizationRepository;
-import org.baeldung.custom.persistence.model.Foo;
-import org.baeldung.custom.persistence.model.Organization;
-import org.baeldung.custom.security.MyUserPrincipal;
+import com.baeldung.roles.custom.persistence.dao.OrganizationRepository;
+import com.baeldung.roles.custom.persistence.model.Foo;
+import com.baeldung.roles.custom.persistence.model.Organization;
+import com.baeldung.roles.custom.security.MyUserPrincipal;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.prepost.PreAuthorize;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/IpApplication.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/IpApplication.java
similarity index 90%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/IpApplication.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/IpApplication.java
index d77414c54e..b9a86fee3e 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/IpApplication.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/IpApplication.java
@@ -1,4 +1,4 @@
-package org.baeldung.ip;
+package com.baeldung.roles.ip;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -7,7 +7,7 @@ import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.PropertySource;
@SpringBootApplication
-@ComponentScan("org.baeldung.ip")
+@ComponentScan("com.baeldung.ip")
@PropertySource("classpath:application-defaults.properties")
public class IpApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/config/CustomIpAuthenticationProvider.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/config/CustomIpAuthenticationProvider.java
similarity index 98%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/config/CustomIpAuthenticationProvider.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/config/CustomIpAuthenticationProvider.java
index 078dd81259..adcadb65e8 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/config/CustomIpAuthenticationProvider.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/config/CustomIpAuthenticationProvider.java
@@ -1,4 +1,4 @@
-package org.baeldung.ip.config;
+package com.baeldung.roles.ip.config;
import java.util.ArrayList;
import java.util.HashSet;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/config/SecurityConfig.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/config/SecurityConfig.java
similarity index 97%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/config/SecurityConfig.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/config/SecurityConfig.java
index 3a8032a734..46ba62afb3 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/config/SecurityConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/config/SecurityConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.ip.config;
+package com.baeldung.roles.ip.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/config/SecurityXmlConfig.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/config/SecurityXmlConfig.java
similarity index 78%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/config/SecurityXmlConfig.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/config/SecurityXmlConfig.java
index 1d22ca4c67..4b2cf43f6a 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/config/SecurityXmlConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/config/SecurityXmlConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.ip.config;
+package com.baeldung.roles.ip.config;
//@Configuration
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/web/MainController.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/web/MainController.java
similarity index 94%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/web/MainController.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/web/MainController.java
index 940194c421..438b668c5f 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/ip/web/MainController.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/ip/web/MainController.java
@@ -1,11 +1,11 @@
-package org.baeldung.ip.web;
+package com.baeldung.roles.ip.web;
import java.util.List;
import javax.servlet.Filter;
import javax.servlet.http.HttpServletRequest;
-import org.baeldung.custom.persistence.model.Foo;
+import com.baeldung.roles.custom.persistence.model.Foo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.security.web.FilterChainProxy;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/CustomAuthenticationProvider.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/CustomAuthenticationProvider.java
similarity index 89%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/CustomAuthenticationProvider.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/CustomAuthenticationProvider.java
index d7195ac358..5168e64b4a 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/CustomAuthenticationProvider.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/CustomAuthenticationProvider.java
@@ -1,7 +1,7 @@
-package org.baeldung.rolesauthorities;
+package com.baeldung.roles.rolesauthorities;
-import org.baeldung.rolesauthorities.model.User;
-import org.baeldung.rolesauthorities.persistence.UserRepository;
+import com.baeldung.roles.rolesauthorities.model.User;
+import com.baeldung.roles.rolesauthorities.persistence.UserRepository;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/MyLogoutSuccessHandler.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/MyLogoutSuccessHandler.java
similarity index 95%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/MyLogoutSuccessHandler.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/MyLogoutSuccessHandler.java
index b0dc0b7537..23104e5292 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/MyLogoutSuccessHandler.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/MyLogoutSuccessHandler.java
@@ -1,4 +1,4 @@
-package org.baeldung.rolesauthorities;
+package com.baeldung.roles.rolesauthorities;
import java.io.IOException;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/MyUserDetailsService.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/MyUserDetailsService.java
similarity index 90%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/MyUserDetailsService.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/MyUserDetailsService.java
index f38b867a75..18230ba794 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/MyUserDetailsService.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/MyUserDetailsService.java
@@ -1,13 +1,13 @@
-package org.baeldung.rolesauthorities;
+package com.baeldung.roles.rolesauthorities;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
-import org.baeldung.rolesauthorities.model.Role;
-import org.baeldung.rolesauthorities.model.User;
-import org.baeldung.rolesauthorities.persistence.UserRepository;
+import com.baeldung.roles.rolesauthorities.model.Role;
+import com.baeldung.roles.rolesauthorities.model.User;
+import com.baeldung.roles.rolesauthorities.persistence.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/RolesAuthoritiesApplication.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/RolesAuthoritiesApplication.java
similarity index 87%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/RolesAuthoritiesApplication.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/RolesAuthoritiesApplication.java
index 3c4e6f7b5a..d3e54b4303 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/RolesAuthoritiesApplication.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/RolesAuthoritiesApplication.java
@@ -1,4 +1,4 @@
-package org.baeldung.rolesauthorities;
+package com.baeldung.roles.rolesauthorities;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@@ -8,7 +8,7 @@ import org.springframework.context.annotation.Configuration;
@Configuration
@EnableAutoConfiguration
-@ComponentScan("org.baeldung.rolesauthorities")
+@ComponentScan("com.baeldung.rolesauthorities")
public class RolesAuthoritiesApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
System.setProperty("spring.profiles.default", "rolesauthorities");
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/config/MvcConfig.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/config/MvcConfig.java
similarity index 97%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/config/MvcConfig.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/config/MvcConfig.java
index c42958457e..61394b6178 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/config/MvcConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/config/MvcConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.rolesauthorities.config;
+package com.baeldung.roles.rolesauthorities.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/config/SecurityConfig.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/config/SecurityConfig.java
similarity index 90%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/config/SecurityConfig.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/config/SecurityConfig.java
index 7624dd7d39..cb8476fcc7 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/config/SecurityConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/config/SecurityConfig.java
@@ -1,7 +1,7 @@
-package org.baeldung.rolesauthorities.config;
+package com.baeldung.roles.rolesauthorities.config;
-import org.baeldung.rolesauthorities.CustomAuthenticationProvider;
-import org.baeldung.rolesauthorities.persistence.UserRepository;
+import com.baeldung.roles.rolesauthorities.CustomAuthenticationProvider;
+import com.baeldung.roles.rolesauthorities.persistence.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@@ -18,7 +18,7 @@ import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
@Configuration
-@ComponentScan(basePackages = { "org.baeldung.rolesauthorities" })
+@ComponentScan(basePackages = {"com.baeldung.rolesauthorities"})
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@@ -76,7 +76,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Bean
public DaoAuthenticationProvider authProvider() {
- final CustomAuthenticationProvider authProvider
+ final CustomAuthenticationProvider authProvider
= new CustomAuthenticationProvider(userRepository, userDetailsService);
authProvider.setPasswordEncoder(encoder());
return authProvider;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/model/Privilege.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/model/Privilege.java
similarity index 97%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/model/Privilege.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/model/Privilege.java
index ab2cd08610..507beaffa8 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/model/Privilege.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/model/Privilege.java
@@ -1,4 +1,4 @@
-package org.baeldung.rolesauthorities.model;
+package com.baeldung.roles.rolesauthorities.model;
import java.util.Collection;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/model/Role.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/model/Role.java
similarity index 97%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/model/Role.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/model/Role.java
index ac33e32fcf..a284d92090 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/model/Role.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/model/Role.java
@@ -1,4 +1,4 @@
-package org.baeldung.rolesauthorities.model;
+package com.baeldung.roles.rolesauthorities.model;
import java.util.Collection;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/model/User.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/model/User.java
similarity index 98%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/model/User.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/model/User.java
index dc1096541d..ebf0c9b310 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/model/User.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/model/User.java
@@ -1,4 +1,4 @@
-package org.baeldung.rolesauthorities.model;
+package com.baeldung.roles.rolesauthorities.model;
import java.util.Collection;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/IUserService.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/IUserService.java
new file mode 100644
index 0000000000..be9cb911d7
--- /dev/null
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/IUserService.java
@@ -0,0 +1,9 @@
+package com.baeldung.roles.rolesauthorities.persistence;
+
+import com.baeldung.roles.rolesauthorities.model.User;
+
+public interface IUserService {
+
+ User findUserByEmail(String email);
+
+}
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/PrivilegeRepository.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/PrivilegeRepository.java
similarity index 65%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/PrivilegeRepository.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/PrivilegeRepository.java
index 05d5f2b870..f8ba7def49 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/PrivilegeRepository.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/PrivilegeRepository.java
@@ -1,6 +1,6 @@
-package org.baeldung.rolesauthorities.persistence;
+package com.baeldung.roles.rolesauthorities.persistence;
-import org.baeldung.rolesauthorities.model.Privilege;
+import com.baeldung.roles.rolesauthorities.model.Privilege;
import org.springframework.data.jpa.repository.JpaRepository;
public interface PrivilegeRepository extends JpaRepository {
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/RoleRepository.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/RoleRepository.java
similarity index 63%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/RoleRepository.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/RoleRepository.java
index 25e3b3a1f6..e5833712fe 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/RoleRepository.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/RoleRepository.java
@@ -1,6 +1,6 @@
-package org.baeldung.rolesauthorities.persistence;
+package com.baeldung.roles.rolesauthorities.persistence;
-import org.baeldung.rolesauthorities.model.Role;
+import com.baeldung.roles.rolesauthorities.model.Role;
import org.springframework.data.jpa.repository.JpaRepository;
public interface RoleRepository extends JpaRepository {
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/SetupDataLoader.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/SetupDataLoader.java
similarity index 93%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/SetupDataLoader.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/SetupDataLoader.java
index 46dad4f06d..140fc56e53 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/SetupDataLoader.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/SetupDataLoader.java
@@ -1,13 +1,13 @@
-package org.baeldung.rolesauthorities.persistence;
+package com.baeldung.roles.rolesauthorities.persistence;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
-import org.baeldung.rolesauthorities.model.Privilege;
-import org.baeldung.rolesauthorities.model.Role;
-import org.baeldung.rolesauthorities.model.User;
+import com.baeldung.roles.rolesauthorities.model.Privilege;
+import com.baeldung.roles.rolesauthorities.model.Role;
+import com.baeldung.roles.rolesauthorities.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/UserRepository.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/UserRepository.java
similarity index 64%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/UserRepository.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/UserRepository.java
index bca2953153..6801eec01d 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/UserRepository.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/UserRepository.java
@@ -1,6 +1,6 @@
-package org.baeldung.rolesauthorities.persistence;
+package com.baeldung.roles.rolesauthorities.persistence;
-import org.baeldung.rolesauthorities.model.User;
+import com.baeldung.roles.rolesauthorities.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
public interface UserRepository extends JpaRepository {
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/UserService.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/UserService.java
similarity index 77%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/UserService.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/UserService.java
index 3b16c78898..17770e5cd0 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/UserService.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/rolesauthorities/persistence/UserService.java
@@ -1,8 +1,8 @@
-package org.baeldung.rolesauthorities.persistence;
+package com.baeldung.roles.rolesauthorities.persistence;
import javax.transaction.Transactional;
-import org.baeldung.rolesauthorities.model.User;
+import com.baeldung.roles.rolesauthorities.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/MinuteBasedVoter.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/MinuteBasedVoter.java
similarity index 96%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/MinuteBasedVoter.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/MinuteBasedVoter.java
index 2beda1e557..6970441a4e 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/MinuteBasedVoter.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/MinuteBasedVoter.java
@@ -1,4 +1,4 @@
-package org.baeldung.voter;
+package com.baeldung.roles.voter;
import java.time.LocalDateTime;
import java.util.Collection;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/VoterApplication.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/VoterApplication.java
similarity index 83%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/VoterApplication.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/VoterApplication.java
index d2078e6115..d3e0652ae9 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/VoterApplication.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/VoterApplication.java
@@ -1,4 +1,4 @@
-package org.baeldung.voter;
+package com.baeldung.roles.voter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@@ -7,7 +7,7 @@ import org.springframework.context.annotation.Configuration;
@Configuration
@EnableAutoConfiguration
-@ComponentScan(basePackages = { "org.baeldung.voter" })
+@ComponentScan(basePackages = {"com.baeldung.voter"})
public class VoterApplication {
public static void main(String[] args) {
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/VoterMvcConfig.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/VoterMvcConfig.java
similarity index 71%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/VoterMvcConfig.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/VoterMvcConfig.java
index 8f41153f06..f11a4ae06c 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/VoterMvcConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/VoterMvcConfig.java
@@ -1,10 +1,8 @@
-package org.baeldung.voter;
+package com.baeldung.roles.voter;
import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/**
* Created by ambrusadrianz on 30/09/2016.
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/WebSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/WebSecurityConfig.java
similarity index 96%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/WebSecurityConfig.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/WebSecurityConfig.java
index 84ed070e8e..8a0f438b49 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/WebSecurityConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/WebSecurityConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.voter;
+package com.baeldung.roles.voter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
@@ -15,7 +15,6 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.access.expression.WebExpressionVoter;
-import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import java.util.Arrays;
import java.util.List;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/XmlSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/XmlSecurityConfig.java
similarity index 60%
rename from spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/XmlSecurityConfig.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/XmlSecurityConfig.java
index 8041585f42..0ef2ef51c7 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/voter/XmlSecurityConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/com/baeldung/roles/voter/XmlSecurityConfig.java
@@ -1,7 +1,4 @@
-package org.baeldung.voter;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.ImportResource;
+package com.baeldung.roles.voter;
/**
* Created by ambrusadrianz on 09/10/2016.
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/IUserService.java b/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/IUserService.java
deleted file mode 100644
index 2c508cbd20..0000000000
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/java/org/baeldung/rolesauthorities/persistence/IUserService.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.baeldung.rolesauthorities.persistence;
-
-import org.baeldung.rolesauthorities.model.User;
-
-public interface IUserService {
-
- User findUserByEmail(String email);
-
-}
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/main/resources/spring-security-custom-voter.xml b/spring-security-modules/spring-security-mvc-boot-1/src/main/resources/spring-security-custom-voter.xml
index 0b334a3694..9f510280a1 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/main/resources/spring-security-custom-voter.xml
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/main/resources/spring-security-custom-voter.xml
@@ -22,12 +22,12 @@
-
+
-
+
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java b/spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java
index b2def82c51..54120650d9 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java
@@ -1,12 +1,11 @@
package com.baeldung.relationships;
-import com.baeldung.AppConfig;
-import com.baeldung.data.repositories.TweetRepository;
-import com.baeldung.data.repositories.UserRepository;
-import com.baeldung.models.AppUser;
-import com.baeldung.models.Tweet;
-import com.baeldung.security.AppUserPrincipal;
-import com.baeldung.util.DummyContentUtil;
+import com.baeldung.relationships.repositories.TweetRepository;
+import com.baeldung.relationships.repositories.UserRepository;
+import com.baeldung.relationships.models.AppUser;
+import com.baeldung.relationships.models.Tweet;
+import com.baeldung.relationships.security.AppUserPrincipal;
+import com.baeldung.relationships.util.DummyContentUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/roles/SpringContextTest.java
similarity index 83%
rename from spring-security-modules/spring-security-mvc-boot-1/src/test/java/org/baeldung/SpringContextTest.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/roles/SpringContextTest.java
index 2041249b71..7b23b878c8 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/test/java/org/baeldung/SpringContextTest.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/roles/SpringContextTest.java
@@ -1,6 +1,6 @@
-package org.baeldung;
+package com.baeldung.roles;
-import org.baeldung.custom.Application;
+import com.baeldung.roles.custom.Application;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/test/java/org/baeldung/web/ApplicationLiveTest.java b/spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/roles/web/ApplicationLiveTest.java
similarity index 94%
rename from spring-security-modules/spring-security-mvc-boot-1/src/test/java/org/baeldung/web/ApplicationLiveTest.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/roles/web/ApplicationLiveTest.java
index e199411e58..5a040b8dea 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/test/java/org/baeldung/web/ApplicationLiveTest.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/roles/web/ApplicationLiveTest.java
@@ -1,9 +1,9 @@
-package org.baeldung.web;
+package com.baeldung.roles.web;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import org.baeldung.custom.persistence.model.Foo;
+import com.baeldung.roles.custom.persistence.model.Foo;
import io.restassured.RestAssured;
import io.restassured.authentication.FormAuthConfig;
@@ -13,7 +13,7 @@ import io.restassured.specification.RequestSpecification;
import org.junit.Test;
import org.springframework.http.MediaType;
-// In order to execute these tests, org.baeldung.custom.Application needs to be running.
+// In order to execute these tests, com.baeldung.custom.Application needs to be running.
public class ApplicationLiveTest {
@Test
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/test/java/org/baeldung/web/CustomUserDetailsServiceIntegrationTest.java b/spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/roles/web/CustomUserDetailsServiceIntegrationTest.java
similarity index 95%
rename from spring-security-modules/spring-security-mvc-boot-1/src/test/java/org/baeldung/web/CustomUserDetailsServiceIntegrationTest.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/roles/web/CustomUserDetailsServiceIntegrationTest.java
index a69b52c0dd..df7645150f 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/test/java/org/baeldung/web/CustomUserDetailsServiceIntegrationTest.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/roles/web/CustomUserDetailsServiceIntegrationTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.web;
+package com.baeldung.roles.web;
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.csrf;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
@@ -7,8 +7,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.apache.http.HttpHeaders;
-import org.baeldung.custom.Application;
-import org.baeldung.custom.persistence.model.Foo;
+import com.baeldung.roles.custom.Application;
+import com.baeldung.roles.custom.persistence.model.Foo;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
@@ -59,7 +59,7 @@ public class CustomUserDetailsServiceIntegrationTest {
@WithAnonymousUser
public void givenAnonymous_whenRequestFoo_thenRetrieveUnauthorized() throws Exception {
this.mvc.perform(get("/foos/1").with(csrf()))
- .andExpect(status().isFound());
+ .andExpect(status().isFound());
}
@Test
diff --git a/spring-security-modules/spring-security-mvc-boot-1/src/test/java/org/baeldung/web/IpLiveTest.java b/spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/roles/web/IpLiveTest.java
similarity index 90%
rename from spring-security-modules/spring-security-mvc-boot-1/src/test/java/org/baeldung/web/IpLiveTest.java
rename to spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/roles/web/IpLiveTest.java
index 761f5450f7..2d0e2e5402 100644
--- a/spring-security-modules/spring-security-mvc-boot-1/src/test/java/org/baeldung/web/IpLiveTest.java
+++ b/spring-security-modules/spring-security-mvc-boot-1/src/test/java/com/baeldung/roles/web/IpLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.web;
+package com.baeldung.roles.web;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -8,7 +8,7 @@ import io.restassured.response.Response;
import org.junit.Test;
-// In order to execute these tests, org.baeldung.ip.IpApplication needs to be running.
+// In order to execute these tests, com.baeldung.ip.IpApplication needs to be running.
public class IpLiveTest {
@Test
diff --git a/spring-security-modules/spring-security-mvc-boot-2/pom.xml b/spring-security-modules/spring-security-mvc-boot-2/pom.xml
index 565528e070..668eb04cd9 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/pom.xml
+++ b/spring-security-modules/spring-security-mvc-boot-2/pom.xml
@@ -222,16 +222,15 @@
- org.baeldung.custom.Application
-
-
+
+
+ com.baeldung.multiplelogin.MultipleLoginApplication
-
+
-
+
1.1.2
1.6.1
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/h2/H2JdbcAuthenticationApplication.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/h2/H2JdbcAuthenticationApplication.java
similarity index 92%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/h2/H2JdbcAuthenticationApplication.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/h2/H2JdbcAuthenticationApplication.java
index 6936cdc560..d71885d73c 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/h2/H2JdbcAuthenticationApplication.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/h2/H2JdbcAuthenticationApplication.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbcauthentication.h2;
+package com.baeldung.jdbcauthentication.h2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/h2/config/SecurityConfiguration.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/h2/config/SecurityConfiguration.java
similarity index 97%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/h2/config/SecurityConfiguration.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/h2/config/SecurityConfiguration.java
index 8b8696f0b2..50dc5b6958 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/h2/config/SecurityConfiguration.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/h2/config/SecurityConfiguration.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbcauthentication.h2.config;
+package com.baeldung.jdbcauthentication.h2.config;
import javax.sql.DataSource;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/h2/web/UserController.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/h2/web/UserController.java
similarity index 89%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/h2/web/UserController.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/h2/web/UserController.java
index 0955061614..03271677a4 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/h2/web/UserController.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/h2/web/UserController.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbcauthentication.h2.web;
+package com.baeldung.jdbcauthentication.h2.web;
import java.security.Principal;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/mysql/MySqlJdbcAuthenticationApplication.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/mysql/MySqlJdbcAuthenticationApplication.java
similarity index 90%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/mysql/MySqlJdbcAuthenticationApplication.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/mysql/MySqlJdbcAuthenticationApplication.java
index 52934e0096..1f4c54e512 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/mysql/MySqlJdbcAuthenticationApplication.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/mysql/MySqlJdbcAuthenticationApplication.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbcauthentication.mysql;
+package com.baeldung.jdbcauthentication.mysql;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/mysql/config/SecurityConfiguration.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/mysql/config/SecurityConfiguration.java
similarity index 95%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/mysql/config/SecurityConfiguration.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/mysql/config/SecurityConfiguration.java
index 157c0be748..a0584818cd 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/mysql/config/SecurityConfiguration.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/mysql/config/SecurityConfiguration.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbcauthentication.mysql.config;
+package com.baeldung.jdbcauthentication.mysql.config;
import javax.sql.DataSource;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/mysql/web/UserController.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/mysql/web/UserController.java
similarity index 88%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/mysql/web/UserController.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/mysql/web/UserController.java
index f1060b5f78..ed15f8bfe6 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/mysql/web/UserController.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/mysql/web/UserController.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbcauthentication.mysql.web;
+package com.baeldung.jdbcauthentication.mysql.web;
import java.security.Principal;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/postgre/PostgreJdbcAuthenticationApplication.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/postgre/PostgreJdbcAuthenticationApplication.java
similarity index 90%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/postgre/PostgreJdbcAuthenticationApplication.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/postgre/PostgreJdbcAuthenticationApplication.java
index 2c4d1a5255..4b074ef51d 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/postgre/PostgreJdbcAuthenticationApplication.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/postgre/PostgreJdbcAuthenticationApplication.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbcauthentication.postgre;
+package com.baeldung.jdbcauthentication.postgre;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/postgre/config/SecurityConfiguration.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/postgre/config/SecurityConfiguration.java
similarity index 93%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/postgre/config/SecurityConfiguration.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/postgre/config/SecurityConfiguration.java
index ba79635852..85dc9d364c 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/postgre/config/SecurityConfiguration.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/postgre/config/SecurityConfiguration.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbcauthentication.postgre.config;
+package com.baeldung.jdbcauthentication.postgre.config;
import javax.sql.DataSource;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/postgre/web/UserController.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/postgre/web/UserController.java
similarity index 88%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/postgre/web/UserController.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/postgre/web/UserController.java
index c8fd3812b1..da85a46562 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/jdbcauthentication/postgre/web/UserController.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/jdbcauthentication/postgre/web/UserController.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbcauthentication.postgre.web;
+package com.baeldung.jdbcauthentication.postgre.web;
import java.security.Principal;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleauthproviders/CustomAuthenticationProvider.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleauthproviders/CustomAuthenticationProvider.java
similarity index 96%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleauthproviders/CustomAuthenticationProvider.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleauthproviders/CustomAuthenticationProvider.java
index 1a89c362cd..97a8d8ac2a 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleauthproviders/CustomAuthenticationProvider.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleauthproviders/CustomAuthenticationProvider.java
@@ -1,4 +1,4 @@
-package org.baeldung.multipleauthproviders;
+package com.baeldung.multipleauthproviders;
import java.util.Collections;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthController.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleauthproviders/MultipleAuthController.java
similarity index 85%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthController.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleauthproviders/MultipleAuthController.java
index b63169bb00..0079c84c6c 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthController.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleauthproviders/MultipleAuthController.java
@@ -1,4 +1,4 @@
-package org.baeldung.multipleauthproviders;
+package com.baeldung.multipleauthproviders;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersApplication.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleauthproviders/MultipleAuthProvidersApplication.java
similarity index 92%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersApplication.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleauthproviders/MultipleAuthProvidersApplication.java
index 1f641298c3..e1a437e9a9 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersApplication.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleauthproviders/MultipleAuthProvidersApplication.java
@@ -1,4 +1,4 @@
-package org.baeldung.multipleauthproviders;
+package com.baeldung.multipleauthproviders;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleauthproviders/MultipleAuthProvidersSecurityConfig.java
similarity index 97%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersSecurityConfig.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleauthproviders/MultipleAuthProvidersSecurityConfig.java
index 3819e981a2..aa2ffc9046 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleauthproviders/MultipleAuthProvidersSecurityConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleauthproviders/MultipleAuthProvidersSecurityConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.multipleauthproviders;
+package com.baeldung.multipleauthproviders;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsApplication.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleentrypoints/MultipleEntryPointsApplication.java
similarity index 92%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsApplication.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleentrypoints/MultipleEntryPointsApplication.java
index 847dab073e..4ed36f770f 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsApplication.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleentrypoints/MultipleEntryPointsApplication.java
@@ -1,4 +1,4 @@
-package org.baeldung.multipleentrypoints;
+package com.baeldung.multipleentrypoints;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleentrypoints/MultipleEntryPointsSecurityConfig.java
similarity index 99%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsSecurityConfig.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleentrypoints/MultipleEntryPointsSecurityConfig.java
index dc89c83cde..b6155fc100 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleentrypoints/MultipleEntryPointsSecurityConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleentrypoints/MultipleEntryPointsSecurityConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.multipleentrypoints;
+package com.baeldung.multipleentrypoints;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleentrypoints/PagesController.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleentrypoints/PagesController.java
similarity index 96%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleentrypoints/PagesController.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleentrypoints/PagesController.java
index b3462d4061..ba5028aea7 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multipleentrypoints/PagesController.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multipleentrypoints/PagesController.java
@@ -1,4 +1,4 @@
-package org.baeldung.multipleentrypoints;
+package com.baeldung.multipleentrypoints;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multiplelogin/MultipleLoginApplication.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multiplelogin/MultipleLoginApplication.java
similarity index 85%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multiplelogin/MultipleLoginApplication.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multiplelogin/MultipleLoginApplication.java
index 90bb5e4260..abba2ba339 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multiplelogin/MultipleLoginApplication.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multiplelogin/MultipleLoginApplication.java
@@ -1,4 +1,4 @@
-package org.baeldung.multiplelogin;
+package com.baeldung.multiplelogin;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -7,7 +7,6 @@ import org.springframework.context.annotation.PropertySource;
@SpringBootApplication
@PropertySource("classpath:application-defaults.properties")
-@ComponentScan("org.baeldung.multiplelogin")
public class MultipleLoginApplication {
public static void main(String[] args) {
SpringApplication.run(MultipleLoginApplication.class, args);
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multiplelogin/MultipleLoginMvcConfig.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multiplelogin/MultipleLoginMvcConfig.java
similarity index 89%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multiplelogin/MultipleLoginMvcConfig.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multiplelogin/MultipleLoginMvcConfig.java
index 204b186411..86b3314c7c 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multiplelogin/MultipleLoginMvcConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multiplelogin/MultipleLoginMvcConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.multiplelogin;
+package com.baeldung.multiplelogin;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -6,14 +6,12 @@ import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
import org.springframework.web.servlet.view.JstlView;
import org.springframework.context.annotation.ComponentScan;
@EnableWebMvc
@Configuration
-@ComponentScan("org.baeldung.controller")
public class MultipleLoginMvcConfig implements WebMvcConfigurer {
public MultipleLoginMvcConfig() {
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multiplelogin/MultipleLoginSecurityConfig.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multiplelogin/MultipleLoginSecurityConfig.java
similarity index 99%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multiplelogin/MultipleLoginSecurityConfig.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multiplelogin/MultipleLoginSecurityConfig.java
index 9962bf41a9..3d12951f39 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multiplelogin/MultipleLoginSecurityConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multiplelogin/MultipleLoginSecurityConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.multiplelogin;
+package com.baeldung.multiplelogin;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multiplelogin/UsersController.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multiplelogin/UsersController.java
similarity index 95%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multiplelogin/UsersController.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multiplelogin/UsersController.java
index 61d7da127c..03be0fd6b2 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/multiplelogin/UsersController.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/multiplelogin/UsersController.java
@@ -1,4 +1,4 @@
-package org.baeldung.multiplelogin;
+package com.baeldung.multiplelogin;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/ssl/HttpsEnabledApplication.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/ssl/HttpsEnabledApplication.java
similarity index 95%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/ssl/HttpsEnabledApplication.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/ssl/HttpsEnabledApplication.java
index 17c249067c..f6a550ae54 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/ssl/HttpsEnabledApplication.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/ssl/HttpsEnabledApplication.java
@@ -1,4 +1,4 @@
-package org.baeldung.ssl;
+package com.baeldung.ssl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/ssl/SecurityConfig.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/ssl/SecurityConfig.java
similarity index 95%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/ssl/SecurityConfig.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/ssl/SecurityConfig.java
index 92f92d8fc7..4bddf0592a 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/ssl/SecurityConfig.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/ssl/SecurityConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.ssl;
+package com.baeldung.ssl;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/ssl/WelcomeController.java b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/ssl/WelcomeController.java
similarity index 74%
rename from spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/ssl/WelcomeController.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/ssl/WelcomeController.java
index 72ad8abb85..2bd8c8cfde 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/main/java/org/baeldung/ssl/WelcomeController.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/main/java/com/baeldung/ssl/WelcomeController.java
@@ -1,8 +1,7 @@
-package org.baeldung.ssl;
+package com.baeldung.ssl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class WelcomeController {
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/jdbcauthentication/h2/SpringContextTest.java b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/jdbcauthentication/h2/SpringContextTest.java
similarity index 76%
rename from spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/jdbcauthentication/h2/SpringContextTest.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/jdbcauthentication/h2/SpringContextTest.java
index 659dad9155..5bd2a0ce27 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/jdbcauthentication/h2/SpringContextTest.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/jdbcauthentication/h2/SpringContextTest.java
@@ -1,6 +1,5 @@
-package org.baeldung.jdbcauthentication.h2;
+package com.baeldung.jdbcauthentication.h2;
-import org.baeldung.jdbcauthentication.h2.H2JdbcAuthenticationApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/jdbcauthentication/h2/web/UserControllerLiveTest.java b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/jdbcauthentication/h2/web/UserControllerLiveTest.java
similarity index 95%
rename from spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/jdbcauthentication/h2/web/UserControllerLiveTest.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/jdbcauthentication/h2/web/UserControllerLiveTest.java
index 638e9d7919..12b5ca5867 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/jdbcauthentication/h2/web/UserControllerLiveTest.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/jdbcauthentication/h2/web/UserControllerLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbcauthentication.h2.web;
+package com.baeldung.jdbcauthentication.h2.web;
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/jdbcauthentication/mysql/web/UserControllerLiveTest.java b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/jdbcauthentication/mysql/web/UserControllerLiveTest.java
similarity index 95%
rename from spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/jdbcauthentication/mysql/web/UserControllerLiveTest.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/jdbcauthentication/mysql/web/UserControllerLiveTest.java
index 261063cbb6..79bc84ea69 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/jdbcauthentication/mysql/web/UserControllerLiveTest.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/jdbcauthentication/mysql/web/UserControllerLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbcauthentication.mysql.web;
+package com.baeldung.jdbcauthentication.mysql.web;
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/jdbcauthentication/postgre/web/UserControllerLiveTest.java b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/jdbcauthentication/postgre/web/UserControllerLiveTest.java
similarity index 95%
rename from spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/jdbcauthentication/postgre/web/UserControllerLiveTest.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/jdbcauthentication/postgre/web/UserControllerLiveTest.java
index 82bf6df8db..e6426a843e 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/jdbcauthentication/postgre/web/UserControllerLiveTest.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/jdbcauthentication/postgre/web/UserControllerLiveTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbcauthentication.postgre.web;
+package com.baeldung.jdbcauthentication.postgre.web;
import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/web/HttpsApplicationIntegrationTest.java
similarity index 96%
rename from spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/web/HttpsApplicationIntegrationTest.java
index fe7883ec94..63d47e6a46 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/web/HttpsApplicationIntegrationTest.java
@@ -1,10 +1,10 @@
-package org.baeldung.web;
+package com.baeldung.web;
import org.apache.http.client.HttpClient;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.ssl.SSLContextBuilder;
-import org.baeldung.ssl.HttpsEnabledApplication;
+import com.baeldung.ssl.HttpsEnabledApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/web/MultipleAuthProvidersApplicationIntegrationTest.java b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/web/MultipleAuthProvidersApplicationIntegrationTest.java
similarity index 96%
rename from spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/web/MultipleAuthProvidersApplicationIntegrationTest.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/web/MultipleAuthProvidersApplicationIntegrationTest.java
index 9ef09f1f67..c5ef469fe8 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/web/MultipleAuthProvidersApplicationIntegrationTest.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/web/MultipleAuthProvidersApplicationIntegrationTest.java
@@ -1,10 +1,10 @@
-package org.baeldung.web;
+package com.baeldung.web;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.Collections;
-import org.baeldung.multipleauthproviders.MultipleAuthProvidersApplication;
+import com.baeldung.multipleauthproviders.MultipleAuthProvidersApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/web/MultipleEntryPointsIntegrationTest.java b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/web/MultipleEntryPointsIntegrationTest.java
similarity index 96%
rename from spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/web/MultipleEntryPointsIntegrationTest.java
rename to spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/web/MultipleEntryPointsIntegrationTest.java
index 422be2ac88..352b4af244 100644
--- a/spring-security-modules/spring-security-mvc-boot-2/src/test/java/org/baeldung/web/MultipleEntryPointsIntegrationTest.java
+++ b/spring-security-modules/spring-security-mvc-boot-2/src/test/java/com/baeldung/web/MultipleEntryPointsIntegrationTest.java
@@ -1,4 +1,4 @@
-package org.baeldung.web;
+package com.baeldung.web;
import org.junit.Before;
import org.junit.Test;
@@ -15,7 +15,7 @@ import org.springframework.web.context.WebApplicationContext;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
-import org.baeldung.multipleentrypoints.MultipleEntryPointsApplication;
+import com.baeldung.multipleentrypoints.MultipleEntryPointsApplication;
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.*;
diff --git a/spring-swagger-codegen/spring-swagger-codegen-api-client/README.md b/spring-swagger-codegen/spring-swagger-codegen-api-client/README.md
deleted file mode 100644
index cffab6b9c7..0000000000
--- a/spring-swagger-codegen/spring-swagger-codegen-api-client/README.md
+++ /dev/null
@@ -1,159 +0,0 @@
-## Spring Swagger Codegen API Client
-
-This module contains the code for [Generate Spring Boot REST Client with Swagger](http://www.baeldung.com/spring-boot-rest-client-swagger-codegen).
-
-## Requirements
-
-Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
-
-## Installation
-
-To install the API client library to your local Maven repository, simply execute:
-
-```shell
-mvn install
-```
-
-To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
-
-```shell
-mvn deploy
-```
-
-Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
-
-### Maven users
-
-Add this dependency to your project's POM:
-
-```xml
-
- com.baeldung
- spring-swagger-codegen-api-client
- 0.0.1-SNAPSHOT
- compile
-
-```
-
-### Gradle users
-
-Add this dependency to your project's build file:
-
-```groovy
-compile "com.baeldung:spring-swagger-codegen-api-client:0.0.1-SNAPSHOT"
-```
-
-### Others
-
-At first generate the JAR by executing:
-
- mvn package
-
-Then manually install the following JARs:
-
-* target/spring-swagger-codegen-api-client-0.0.1-SNAPSHOT.jar
-* target/lib/*.jar
-
-## Getting Started
-
-Please follow the [installation](#installation) instruction and execute the following Java code:
-
-```java
-
-import com.baeldung.petstore.client.invoker.*;
-import com.baeldung.petstore.client.invoker.auth.*;
-import com.baeldung.petstore.client.model.*;
-import com.baeldung.petstore.client.api.PetApi;
-
-import java.io.File;
-import java.util.*;
-
-public class PetApiExample {
-
- public static void main(String[] args) {
- ApiClient defaultClient = Configuration.getDefaultApiClient();
-
- // Configure OAuth2 access token for authorization: petstore_auth
- OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
- petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
- PetApi apiInstance = new PetApi();
- Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
- try {
- apiInstance.addPet(body);
- } catch (ApiException e) {
- System.err.println("Exception when calling PetApi#addPet");
- e.printStackTrace();
- }
- }
-}
-
-```
-
-## Documentation for API Endpoints
-
-All URIs are relative to *http://petstore.swagger.io/v2*
-
-Class | Method | HTTP request | Description
------------- | ------------- | ------------- | -------------
-*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
-*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
-*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
-*PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
-*PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
-*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
-*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
-*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
-*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
-*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
-*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
-*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
-*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
-*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
-*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
-*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
-*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
-*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
-*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
-
-
-## Documentation for Models
-
- - [Category](docs/Category.md)
- - [ModelApiResponse](docs/ModelApiResponse.md)
- - [Order](docs/Order.md)
- - [Pet](docs/Pet.md)
- - [Tag](docs/Tag.md)
- - [User](docs/User.md)
-
-
-## Documentation for Authorization
-
-Authentication schemes defined for the API:
-### api_key
-
-- **Type**: API key
-- **API key parameter name**: api_key
-- **Location**: HTTP header
-
-### petstore_auth
-
-- **Type**: OAuth
-- **Flow**: implicit
-- **Authorization URL**: http://petstore.swagger.io/oauth/dialog
-- **Scopes**:
- - write:pets: modify pets in your account
- - read:pets: read your pets
-
-
-## Recommendation
-
-It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
-
-## Author
-
-apiteam@swagger.io
-
-
-
diff --git a/spring-threads/README.md b/spring-threads/README.md
new file mode 100644
index 0000000000..c3762cd86f
--- /dev/null
+++ b/spring-threads/README.md
@@ -0,0 +1,3 @@
+### Relevant Articles:
+
+- [ThreadPoolTaskExecutor corePoolSize vs. maxPoolSize](https://www.baeldung.com/java-threadpooltaskexecutor-core-vs-max-poolsize)