From 3596d3dc34533748ce1e245270d78819fdc3e4c2 Mon Sep 17 00:00:00 2001 From: Syed Mansoor Date: Fri, 12 Oct 2018 16:55:59 +1100 Subject: [PATCH 01/37] Added project for Apache pulsar examples --- apache-pulsar/.gitignore | 8 + apache-pulsar/build.gradle | 26 +++ .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 54413 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + apache-pulsar/gradlew | 172 ++++++++++++++++++ apache-pulsar/gradlew.bat | 84 +++++++++ .../main/java/com/baeldung/ConsumerTest.java | 48 +++++ .../main/java/com/baeldung/ProducerTest.java | 58 ++++++ .../ExclusiveSubscriptionTutorial.java | 59 ++++++ .../FailoverSubscriptionTutorial.java | 76 ++++++++ 10 files changed, 536 insertions(+) create mode 100755 apache-pulsar/.gitignore create mode 100755 apache-pulsar/build.gradle create mode 100755 apache-pulsar/gradle/wrapper/gradle-wrapper.jar create mode 100755 apache-pulsar/gradle/wrapper/gradle-wrapper.properties create mode 100755 apache-pulsar/gradlew create mode 100755 apache-pulsar/gradlew.bat create mode 100755 apache-pulsar/src/main/java/com/baeldung/ConsumerTest.java create mode 100755 apache-pulsar/src/main/java/com/baeldung/ProducerTest.java create mode 100755 apache-pulsar/src/main/java/com/baeldung/subscriptions/ExclusiveSubscriptionTutorial.java create mode 100755 apache-pulsar/src/main/java/com/baeldung/subscriptions/FailoverSubscriptionTutorial.java diff --git a/apache-pulsar/.gitignore b/apache-pulsar/.gitignore new file mode 100755 index 0000000000..1c53e03007 --- /dev/null +++ b/apache-pulsar/.gitignore @@ -0,0 +1,8 @@ +.classpath +.project +.settings +target +.idea +*.iml +.gradle/ +build/ diff --git a/apache-pulsar/build.gradle b/apache-pulsar/build.gradle new file mode 100755 index 0000000000..f3545d69b2 --- /dev/null +++ b/apache-pulsar/build.gradle @@ -0,0 +1,26 @@ +apply plugin: 'java' +ext{ + pulsarVersion = '2.1.1-incubating' +} + +repositories { + jcenter() + mavenCentral() + mavenLocal() +} + +sourceCompatibility = 1.8 +targetCompatibility = 1.8 + +group = 'com.baeldung.pulsar' +archivesBaseName = 'pulsar-java-example' +version = '0.0.1' + + + + +dependencies { + compile group: 'org.apache.pulsar', name: 'pulsar-client', version: pulsarVersion + +} + diff --git a/apache-pulsar/gradle/wrapper/gradle-wrapper.jar b/apache-pulsar/gradle/wrapper/gradle-wrapper.jar new file mode 100755 index 0000000000000000000000000000000000000000..91ca28c8b802289c3a438766657a5e98f20eff03 GIT binary patch literal 54413 zcmafaV|Zr4wq`oEZQHiZj%|LijZQlLf{tz5M#r{o+fI6V=G-$g=gzrzeyqLskF}nv zRZs0&c;EUi2L_G~0s;*U0szbK}f6%Pvi zRZ#mYf6f1oqJoH`jHHCB8l!^by~4z}yc`4LEP@;Z?bO6{g9`Hk+s@(L1jC5Tq{1Yf z4E;CQvrx0-gF+peRxFC*gF=&$zNYk(w0q}U=WqXMz`tYs@0o%B{dRD+{C_6(f9t^g zhmNJQv6-#;f2)f2uc{u-#*U8W&i{|ewYN^n_1~cv|1J!}zc&$eaBy{T{cEpa46s*q zHFkD2cV;xTHFj}{*3kBt*FgS4A5SI|$F%$gB@It9FlC}D3y`sbZG{2P6gGwC$U`6O zb_cId9AhQl#A<&=x>-xDD%=Ppt$;y71@Lwsl{x943#T@8*?cbR<~d`@@}4V${+r$jICUIOzgZJy_9I zu*eA(F)$~J07zX%tmQN}1^wj+RM|9bbwhQA=xrPE*{vB_P!pPYT5{Or^m*;Qz#@Bl zRywCG_RDyM6bf~=xn}FtiFAw|rrUxa1+z^H`j6e|GwKDuq}P)z&@J>MEhsVBvnF|O zOEm)dADU1wi8~mX(j_8`DwMT_OUAnjbWYer;P*^Uku_qMu3}qJU zTAkza-K9aj&wcsGuhQ>RQoD?gz~L8RwCHOZDzhBD$az*$TQ3!uygnx_rsXG`#_x5t zn*lb(%JI3%G^MpYp-Y(KI4@_!&kBRa3q z|Fzn&3R%ZsoMNEn4pN3-BSw2S_{IB8RzRv(eQ1X zyBQZHJ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RAPkotVt5-z21Ij~Ot9A^SK-1u*zFVK&mF?q1;|wy zrF+XWs^5Q-%Z6I62gTwrRe#F>riVM#fv_TihxSJ6to1X7NVszgivoTa!fPfBBYj94 zuc2m zL_k-<1FoORng190; z+@DGs;NHgGW8%wjH$EpvQ-Hd! znZdIh#!H5nOStiOKNV8}QvY~=VMqtG&p$ByF&%pe_gR`|H5ULg47lk20(Xe=k8ptc zn%EmTI7k9gNE=!IN4WnbymtsKoHn2-cL65z^9cQOSp>XFzo;!h*x1s^0U!<{Y-VZ1 zXJ7zekkYf(`@dZ3F9|?O+*dUL4K4?0@V^>I2;k-a1%ZgY9w2|C5r0R5?80e-|&4yEwkklXmZ)!QSYG) zXBKOz|IPC2W_X!t^cgb^@D=|>r@x$f{3Y+`%NoDT^Y@JIuJ%jxe;es9vi`kJmbnPYT%X}rzs0K#=H)Q`)_L7%?KLLJP+0XJbL&JgdJE{i*){MOFSK z{7XUfXZR-Te}aE8RelNkQV0AQ7RC0TVE^o8c!~K^RQ4GY+xed`|A+zjZ(qij@~zLP zkS@Q0`rpM|UsnI6B;_+vw)^iA{n0%C7N~ql@KXNonIOUIHwgYg4Dcn>OOdc=rUl>M zVEQe|u$P=Kb)TL&-2#4t^Pg0pUQ)dj%6O)#3;zwOe~`_1$@Ef`;F+l=>NlAFFbBS0 zN))`LdKnA;OjQ{B+f;z>i|wCv-CmNs46S`8X-oKRl0V+pKZ%XJWO*6G`OMOs^xG_d zj_7-p06{fybw_P;UzX^eX5Pkcrm04%9rPFa56 zyZE \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/apache-pulsar/gradlew.bat b/apache-pulsar/gradlew.bat new file mode 100755 index 0000000000..e95643d6a2 --- /dev/null +++ b/apache-pulsar/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/apache-pulsar/src/main/java/com/baeldung/ConsumerTest.java b/apache-pulsar/src/main/java/com/baeldung/ConsumerTest.java new file mode 100755 index 0000000000..72dc10b542 --- /dev/null +++ b/apache-pulsar/src/main/java/com/baeldung/ConsumerTest.java @@ -0,0 +1,48 @@ +package com.baeldung; + +import java.io.IOException; + +import org.apache.pulsar.client.api.Consumer; +import org.apache.pulsar.client.api.Message; +import org.apache.pulsar.client.api.PulsarClient; +import org.apache.pulsar.client.api.SubscriptionType; + +public class ConsumerTest { + + private static final String SERVICE_URL = "pulsar://localhost:6650"; + private static final String TOPIC_NAME = "test-topic"; + private static final String SUBSCRIPTION_NAME = "test-subscription"; + + public static void main(String[] args) throws IOException { + // Create a Pulsar client instance. A single instance can be shared across many + // producers and consumer within the same application + PulsarClient client = PulsarClient.builder() + .serviceUrl(SERVICE_URL) + .build(); + + //Configure consumer specific settings. + Consumer consumer = client.newConsumer() + .topic(TOPIC_NAME) + // Allow multiple consumers to attach to the same subscription + // and get messages dispatched as a queue + .subscriptionType(SubscriptionType.Shared) + .subscriptionName(SUBSCRIPTION_NAME) + .subscribe(); + + + // Once the consumer is created, it can be used for the entire application lifecycle + System.out.println("Created consumer for the topic "+ TOPIC_NAME); + + do { + // Wait until a message is available + Message msg = consumer.receive(); + + // Extract the message as a printable string and then log + String content = new String(msg.getData()); + System.out.println("Received message '"+content+"' with ID "+msg.getMessageId()); + + // Acknowledge processing of the message so that it can be deleted + consumer.acknowledge(msg); + } while (true); + } +} diff --git a/apache-pulsar/src/main/java/com/baeldung/ProducerTest.java b/apache-pulsar/src/main/java/com/baeldung/ProducerTest.java new file mode 100755 index 0000000000..08ee0e89b9 --- /dev/null +++ b/apache-pulsar/src/main/java/com/baeldung/ProducerTest.java @@ -0,0 +1,58 @@ +package com.baeldung; + +import org.apache.pulsar.client.api.CompressionType; +import org.apache.pulsar.client.api.Message; +import org.apache.pulsar.client.api.MessageBuilder; +import org.apache.pulsar.client.api.MessageId; +import org.apache.pulsar.client.api.Producer; +import org.apache.pulsar.client.api.PulsarClient; +import org.apache.pulsar.client.api.PulsarClientException; + +import java.io.IOException; +import java.util.stream.IntStream; + +public class ProducerTest { + + private static final String SERVICE_URL = "pulsar://localhost:6650"; + private static final String TOPIC_NAME = "test-topic"; + + public static void main(String[] args) throws IOException { + // Create a Pulsar client instance. A single instance can be shared across many + // producers and consumer within the same application + PulsarClient client = PulsarClient.builder() + .serviceUrl(SERVICE_URL) + .build(); + + // Configure producer specific settings + Producer producer = client.newProducer() + // Set the topic + .topic(TOPIC_NAME) + // Enable compression + .compressionType(CompressionType.LZ4) + .create(); + + // Once the producer is created, it can be used for the entire application life-cycle + System.out.println("Created producer for the topic "+TOPIC_NAME); + + // Send 5 test messages + IntStream.range(1, 5).forEach(i -> { + String content = String.format("hi-pulsar-%d", i); + + // Build a message object + Message msg = MessageBuilder.create() + .setContent(content.getBytes()) + .build(); + + // Send each message and log message content and ID when successfully received + try { + MessageId msgId = producer.send(msg); + + System.out.println("Published message '"+content+"' with the ID "+msgId); + } catch (PulsarClientException e) { + System.out.println(e.getMessage()); + } + }); + + client.close(); + } +} diff --git a/apache-pulsar/src/main/java/com/baeldung/subscriptions/ExclusiveSubscriptionTutorial.java b/apache-pulsar/src/main/java/com/baeldung/subscriptions/ExclusiveSubscriptionTutorial.java new file mode 100755 index 0000000000..da9ff0974d --- /dev/null +++ b/apache-pulsar/src/main/java/com/baeldung/subscriptions/ExclusiveSubscriptionTutorial.java @@ -0,0 +1,59 @@ +package com.baeldung.subscriptions; + +import org.apache.pulsar.client.api.ConsumerBuilder; +import org.apache.pulsar.client.api.Message; +import org.apache.pulsar.client.api.MessageBuilder; +import org.apache.pulsar.client.api.Producer; +import org.apache.pulsar.client.api.PulsarClient; +import org.apache.pulsar.client.api.PulsarClientException; +import org.apache.pulsar.client.api.SubscriptionType; + +import java.util.stream.IntStream; + +public class ExclusiveSubscriptionTutorial { + private static final String SERVICE_URL = "pulsar://localhost:6650"; + private static final String TOPIC_NAME = "test-topic"; + private static final String SUBSCRIPTION_NAME = "test-subscription"; + private static final SubscriptionType SUBSCRIPTION_TYPE = SubscriptionType.Exclusive; + + public static void main(String[] args) throws PulsarClientException { + PulsarClient client = PulsarClient.builder() + .serviceUrl(SERVICE_URL) + .build(); + + Producer producer = client.newProducer() + .topic(TOPIC_NAME) + .create(); + + ConsumerBuilder consumer1 = client.newConsumer() + .topic(TOPIC_NAME) + .subscriptionName(SUBSCRIPTION_NAME) + .subscriptionType(SUBSCRIPTION_TYPE); + + ConsumerBuilder consumer2 = client.newConsumer() + .topic(TOPIC_NAME) + .subscriptionName(SUBSCRIPTION_NAME) + .subscriptionType(SUBSCRIPTION_TYPE); + + IntStream.range(0, 999).forEach(i -> { + Message msg = MessageBuilder.create() + .setContent(String.format("message-%d", i).getBytes()) + .build(); + try { + producer.send(msg); + } catch (PulsarClientException e) { + System.out.println(e.getMessage()); + } + }); + + // Consumer 1 can subscribe to the topic + consumer1.subscribe(); + + // Consumer 2 cannot due to the exclusive subscription held by consumer 1 + consumer2.subscribeAsync() + .handle((consumer, exception) -> { + System.out.println(exception.getMessage()); + return null; + }); + } +} diff --git a/apache-pulsar/src/main/java/com/baeldung/subscriptions/FailoverSubscriptionTutorial.java b/apache-pulsar/src/main/java/com/baeldung/subscriptions/FailoverSubscriptionTutorial.java new file mode 100755 index 0000000000..30351c229d --- /dev/null +++ b/apache-pulsar/src/main/java/com/baeldung/subscriptions/FailoverSubscriptionTutorial.java @@ -0,0 +1,76 @@ +package com.baeldung.subscriptions; + +import org.apache.pulsar.client.api.Consumer; +import org.apache.pulsar.client.api.ConsumerBuilder; +import org.apache.pulsar.client.api.Message; +import org.apache.pulsar.client.api.MessageBuilder; +import org.apache.pulsar.client.api.Producer; +import org.apache.pulsar.client.api.PulsarClient; +import org.apache.pulsar.client.api.PulsarClientException; +import org.apache.pulsar.client.api.SubscriptionType; + +import java.util.stream.IntStream; + +public class FailoverSubscriptionTutorial { + private static final String SERVICE_URL = "pulsar://localhost:6650"; + private static final String TOPIC_NAME = "failover-subscription-test-topic"; + private static final String SUBSCRIPTION_NAME = "test-subscription"; + private static final SubscriptionType SUBSCRIPTION_TYPE = SubscriptionType.Failover; + private static final int NUM_MSGS = 10; + + public static void main(String[] args) throws PulsarClientException { + PulsarClient client = PulsarClient.builder() + .serviceUrl(SERVICE_URL) + .build(); + + Producer producer = client.newProducer() + .topic(TOPIC_NAME) + .create(); + + ConsumerBuilder consumerBuilder = client.newConsumer() + .topic(TOPIC_NAME) + .subscriptionName(SUBSCRIPTION_NAME) + .subscriptionType(SUBSCRIPTION_TYPE); + + Consumer mainConsumer = consumerBuilder + .consumerName("consumer-a") + .messageListener((consumer, msg) -> { + System.out.println("Message received by main consumer"); + + try { + consumer.acknowledge(msg); + } catch (PulsarClientException e) { + System.out.println(e.getMessage()); + } + }) + .subscribe(); + + Consumer failoverConsumer = consumerBuilder + .consumerName("consumer-b") + .messageListener((consumer, msg) -> { + System.out.println("Message received by failover consumer"); + + try { + consumer.acknowledge(msg); + } catch (PulsarClientException e) { + System.out.println(e.getMessage()); + } + }) + .subscribe(); + + IntStream.range(0, NUM_MSGS).forEach(i -> { + Message msg = MessageBuilder.create() + .setContent(String.format("message-%d", i).getBytes()) + .build(); + try { + producer.send(msg); + + Thread.sleep(100); + + if (i > 5) mainConsumer.close(); + } catch (InterruptedException | PulsarClientException e) { + System.out.println(e.getMessage()); + } + }); + } +} From 9a6ce97d4811916f3c6b0387eed50a4d88b0561e Mon Sep 17 00:00:00 2001 From: Chirag Dewan Date: Sat, 13 Oct 2018 11:24:04 +0530 Subject: [PATCH 02/37] BAEL-1708 Custom Types in Hibernate --- hibernate5/pom.xml | 7 +- .../com/baeldung/hibernate/HibernateUtil.java | 11 +- .../hibernate/customtypes/Address.java | 69 +++++++ .../hibernate/customtypes/AddressType.java | 169 ++++++++++++++++++ .../LocalDateStringJavaDescriptor.java | 51 ++++++ .../customtypes/LocalDateStringType.java | 34 ++++ .../hibernate/customtypes/OfficeEmployee.java | 88 +++++++++ .../hibernate/customtypes/PhoneNumber.java | 43 +++++ .../customtypes/PhoneNumberType.java | 98 ++++++++++ .../hibernate/customtypes/Salary.java | 39 ++++ .../customtypes/SalaryCurrencyConvertor.java | 15 ++ .../hibernate/customtypes/SalaryType.java | 161 +++++++++++++++++ .../HibernateCustomTypesUnitTest.java | 90 ++++++++++ .../hibernate-customtypes.properties | 10 ++ 14 files changed, 883 insertions(+), 2 deletions(-) create mode 100644 hibernate5/src/main/java/com/baeldung/hibernate/customtypes/Address.java create mode 100644 hibernate5/src/main/java/com/baeldung/hibernate/customtypes/AddressType.java create mode 100644 hibernate5/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringJavaDescriptor.java create mode 100644 hibernate5/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringType.java create mode 100644 hibernate5/src/main/java/com/baeldung/hibernate/customtypes/OfficeEmployee.java create mode 100644 hibernate5/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumber.java create mode 100644 hibernate5/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumberType.java create mode 100644 hibernate5/src/main/java/com/baeldung/hibernate/customtypes/Salary.java create mode 100644 hibernate5/src/main/java/com/baeldung/hibernate/customtypes/SalaryCurrencyConvertor.java create mode 100644 hibernate5/src/main/java/com/baeldung/hibernate/customtypes/SalaryType.java create mode 100644 hibernate5/src/test/java/com/baeldung/hibernate/customtypes/HibernateCustomTypesUnitTest.java create mode 100644 hibernate5/src/test/resources/hibernate-customtypes.properties diff --git a/hibernate5/pom.xml b/hibernate5/pom.xml index 610c893bdc..748a106cca 100644 --- a/hibernate5/pom.xml +++ b/hibernate5/pom.xml @@ -44,6 +44,11 @@ mariaDB4j ${mariaDB4j.version} + + org.hibernate + hibernate-testing + 5.2.2.Final + @@ -57,7 +62,7 @@ - 5.3.2.Final + 5.3.6.Final 6.0.6 2.2.3 1.4.196 diff --git a/hibernate5/src/main/java/com/baeldung/hibernate/HibernateUtil.java b/hibernate5/src/main/java/com/baeldung/hibernate/HibernateUtil.java index 2212e736ab..e0d1de591b 100644 --- a/hibernate5/src/main/java/com/baeldung/hibernate/HibernateUtil.java +++ b/hibernate5/src/main/java/com/baeldung/hibernate/HibernateUtil.java @@ -5,6 +5,8 @@ import java.io.IOException; import java.net.URL; import java.util.Properties; +import com.baeldung.hibernate.customtypes.LocalDateStringType; +import com.baeldung.hibernate.customtypes.OfficeEmployee; import com.baeldung.hibernate.entities.DeptEmployee; import com.baeldung.hibernate.optimisticlocking.OptimisticLockingCourse; import com.baeldung.hibernate.optimisticlocking.OptimisticLockingStudent; @@ -18,8 +20,10 @@ import com.baeldung.hibernate.pojo.inheritance.*; import org.apache.commons.lang3.StringUtils; import org.hibernate.SessionFactory; import org.hibernate.boot.Metadata; +import org.hibernate.boot.MetadataBuilder; import org.hibernate.boot.MetadataSources; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; +import org.hibernate.cfg.Configuration; import org.hibernate.service.ServiceRegistry; import com.baeldung.hibernate.pojo.Course; @@ -66,6 +70,7 @@ public class HibernateUtil { private static SessionFactory makeSessionFactory(ServiceRegistry serviceRegistry) { MetadataSources metadataSources = new MetadataSources(serviceRegistry); + metadataSources.addPackage("com.baeldung.hibernate.pojo"); metadataSources.addAnnotatedClass(Employee.class); metadataSources.addAnnotatedClass(Phone.class); @@ -102,8 +107,12 @@ public class HibernateUtil { metadataSources.addAnnotatedClass(com.baeldung.hibernate.entities.Department.class); metadataSources.addAnnotatedClass(OptimisticLockingCourse.class); metadataSources.addAnnotatedClass(OptimisticLockingStudent.class); + metadataSources.addAnnotatedClass(OfficeEmployee.class); + + Metadata metadata = metadataSources.getMetadataBuilder() + .applyBasicType(LocalDateStringType.INSTANCE) + .build(); - Metadata metadata = metadataSources.buildMetadata(); return metadata.getSessionFactoryBuilder() .build(); diff --git a/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/Address.java b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/Address.java new file mode 100644 index 0000000000..d559e5a6c2 --- /dev/null +++ b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/Address.java @@ -0,0 +1,69 @@ +package com.baeldung.hibernate.customtypes; + +import java.util.Objects; + +public class Address { + + private String addressLine1; + private String addressLine2; + private String city; + private String country; + private int zipCode; + + public String getAddressLine1() { + return addressLine1; + } + + public String getAddressLine2() { + return addressLine2; + } + + public String getCity() { + return city; + } + + public String getCountry() { + return country; + } + + public int getZipCode() { + return zipCode; + } + + public void setAddressLine1(String addressLine1) { + this.addressLine1 = addressLine1; + } + + public void setAddressLine2(String addressLine2) { + this.addressLine2 = addressLine2; + } + + public void setCity(String city) { + this.city = city; + } + + public void setCountry(String country) { + this.country = country; + } + + public void setZipCode(int zipCode) { + this.zipCode = zipCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Address address = (Address) o; + return zipCode == address.zipCode && + Objects.equals(addressLine1, address.addressLine1) && + Objects.equals(addressLine2, address.addressLine2) && + Objects.equals(city, address.city) && + Objects.equals(country, address.country); + } + + @Override + public int hashCode() { + return Objects.hash(addressLine1, addressLine2, city, country, zipCode); + } +} diff --git a/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/AddressType.java b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/AddressType.java new file mode 100644 index 0000000000..c10c67df9a --- /dev/null +++ b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/AddressType.java @@ -0,0 +1,169 @@ +package com.baeldung.hibernate.customtypes; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.type.IntegerType; +import org.hibernate.type.StringType; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Types; +import java.util.Objects; + +public class AddressType implements CompositeUserType { + + @Override + public String[] getPropertyNames() { + return new String[]{"addressLine1", "addressLine2", + "city", "country", "zipcode"}; + } + + @Override + public Type[] getPropertyTypes() { + return new Type[]{StringType.INSTANCE, StringType.INSTANCE, + StringType.INSTANCE, StringType.INSTANCE, IntegerType.INSTANCE}; + } + + @Override + public Object getPropertyValue(Object component, int property) throws HibernateException { + + Address empAdd = (Address) component; + + switch (property) { + case 0: + return empAdd.getAddressLine1(); + case 1: + return empAdd.getAddressLine2(); + case 2: + return empAdd.getCity(); + case 3: + return empAdd.getCountry(); + case 4: + return Integer.valueOf(empAdd.getZipCode()); + } + + throw new IllegalArgumentException(property + + " is an invalid property index for class type " + + component.getClass().getName()); + } + + @Override + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + + Address empAdd = (Address) component; + + switch (property) { + case 0: + empAdd.setAddressLine1((String) value); + case 1: + empAdd.setAddressLine2((String) value); + case 2: + empAdd.setCity((String) value); + case 3: + empAdd.setCountry((String) value); + case 4: + empAdd.setZipCode((Integer) value); + } + + throw new IllegalArgumentException(property + + " is an invalid property index for class type " + + component.getClass().getName()); + + } + + @Override + public Class returnedClass() { + return Address.class; + } + + @Override + public boolean equals(Object x, Object y) throws HibernateException { + if (x == y) + return true; + + if (Objects.isNull(x) || Objects.isNull(y)) + return false; + + return x.equals(y); + } + + @Override + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + @Override + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + + Address empAdd = new Address(); + empAdd.setAddressLine1(rs.getString(names[0])); + + if (rs.wasNull()) + return null; + + empAdd.setAddressLine2(rs.getString(names[1])); + empAdd.setCity(rs.getString(names[2])); + empAdd.setCountry(rs.getString(names[3])); + empAdd.setZipCode(rs.getInt(names[4])); + + return empAdd; + } + + @Override + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + + if (Objects.isNull(value)) + st.setNull(index, Types.VARCHAR); + else { + + Address empAdd = (Address) value; + st.setString(index, empAdd.getAddressLine1()); + st.setString(index + 1, empAdd.getAddressLine2()); + st.setString(index + 2, empAdd.getCity()); + st.setString(index + 3, empAdd.getCountry()); + st.setInt(index + 4, empAdd.getZipCode()); + } + } + + @Override + public Object deepCopy(Object value) throws HibernateException { + + if (Objects.isNull(value)) + return null; + + Address oldEmpAdd = (Address) value; + Address newEmpAdd = new Address(); + + newEmpAdd.setAddressLine1(oldEmpAdd.getAddressLine1()); + newEmpAdd.setAddressLine2(oldEmpAdd.getAddressLine2()); + newEmpAdd.setCity(oldEmpAdd.getCity()); + newEmpAdd.setCountry(oldEmpAdd.getCountry()); + newEmpAdd.setZipCode(oldEmpAdd.getZipCode()); + + return newEmpAdd; + } + + @Override + public boolean isMutable() { + return true; + } + + @Override + public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + @Override + public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } + + @Override + public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return original; + } +} diff --git a/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringJavaDescriptor.java b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringJavaDescriptor.java new file mode 100644 index 0000000000..56be9e693f --- /dev/null +++ b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringJavaDescriptor.java @@ -0,0 +1,51 @@ +package com.baeldung.hibernate.customtypes; + +import org.hibernate.type.LocalDateType; +import org.hibernate.type.descriptor.WrapperOptions; +import org.hibernate.type.descriptor.java.AbstractTypeDescriptor; +import org.hibernate.type.descriptor.java.ImmutableMutabilityPlan; +import org.hibernate.type.descriptor.java.MutabilityPlan; + +import java.time.LocalDate; + +public class LocalDateStringJavaDescriptor extends AbstractTypeDescriptor { + + public static final LocalDateStringJavaDescriptor INSTANCE = new LocalDateStringJavaDescriptor(); + + public LocalDateStringJavaDescriptor() { + super(LocalDate.class, ImmutableMutabilityPlan.INSTANCE); + } + + @Override + public String toString(LocalDate value) { + return LocalDateType.FORMATTER.format(value); + } + + @Override + public LocalDate fromString(String string) { + return LocalDate.from(LocalDateType.FORMATTER.parse(string)); + } + + @Override + public X unwrap(LocalDate value, Class type, WrapperOptions options) { + + if (value == null) + return null; + + if (String.class.isAssignableFrom(type)) + return (X) LocalDateType.FORMATTER.format(value); + + throw unknownUnwrap(type); + } + + @Override + public LocalDate wrap(X value, WrapperOptions options) { + if (value == null) + return null; + + if(String.class.isInstance(value)) + return LocalDate.from(LocalDateType.FORMATTER.parse((CharSequence) value)); + + throw unknownWrap(value.getClass()); + } +} diff --git a/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringType.java b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringType.java new file mode 100644 index 0000000000..c8d37073e8 --- /dev/null +++ b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/LocalDateStringType.java @@ -0,0 +1,34 @@ +package com.baeldung.hibernate.customtypes; + +import org.hibernate.dialect.Dialect; +import org.hibernate.type.AbstractSingleColumnStandardBasicType; +import org.hibernate.type.DiscriminatorType; +import org.hibernate.type.descriptor.java.LocalDateJavaDescriptor; +import org.hibernate.type.descriptor.sql.VarcharTypeDescriptor; + +import java.time.LocalDate; + +public class LocalDateStringType extends AbstractSingleColumnStandardBasicType implements DiscriminatorType { + + public static final LocalDateStringType INSTANCE = new LocalDateStringType(); + + public LocalDateStringType() { + super(VarcharTypeDescriptor.INSTANCE, LocalDateStringJavaDescriptor.INSTANCE); + } + + @Override + public String getName() { + return "LocalDateString"; + } + + @Override + public LocalDate stringToObject(String xml) throws Exception { + return fromString(xml); + } + + @Override + public String objectToSQLString(LocalDate value, Dialect dialect) throws Exception { + return '\'' + toString(value) + '\''; + } + +} diff --git a/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/OfficeEmployee.java b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/OfficeEmployee.java new file mode 100644 index 0000000000..3ca06e4316 --- /dev/null +++ b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/OfficeEmployee.java @@ -0,0 +1,88 @@ +package com.baeldung.hibernate.customtypes; + +import com.baeldung.hibernate.pojo.Phone; +import org.hibernate.annotations.Columns; +import org.hibernate.annotations.Parameter; +import org.hibernate.annotations.Type; +import org.hibernate.annotations.TypeDef; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import java.time.LocalDate; + +@TypeDef(name = "PhoneNumber", + typeClass = PhoneNumberType.class, + defaultForType = PhoneNumber.class) +@Entity +@Table(name = "OfficeEmployee") +public class OfficeEmployee { + + @Id + @GeneratedValue + private long id; + + @Column + @Type(type = "LocalDateString") + private LocalDate dateOfJoining; + + @Columns(columns = {@Column(name = "country_code"), + @Column(name = "city_code"), + @Column(name = "number")}) + private PhoneNumber employeeNumber; + + @Columns(columns = {@Column(name = "address_line_1"), + @Column(name = "address_line_2"), + @Column(name = "city"), @Column(name = "country"), + @Column(name = "zip_code")}) + @Type(type = "com.baeldung.hibernate.customtypes.AddressType") + private Address empAddress; + + @Type(type = "com.baeldung.hibernate.customtypes.SalaryType", + parameters = {@Parameter(name = "currency", value = "USD")}) + @Columns(columns = {@Column(name = "amount"), + @Column(name = "currency")}) + private Salary salary; + + public Salary getSalary() { + return salary; + } + + public void setSalary(Salary salary) { + this.salary = salary; + } + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public LocalDate getDateOfJoining() { + return dateOfJoining; + } + + public void setDateOfJoining(LocalDate dateOfJoining) { + this.dateOfJoining = dateOfJoining; + } + + public PhoneNumber getEmployeeNumber() { + return employeeNumber; + } + + public void setEmployeeNumber(PhoneNumber employeeNumber) { + this.employeeNumber = employeeNumber; + } + + public Address getEmpAddress() { + return empAddress; + } + + public void setEmpAddress(Address empAddress) { + this.empAddress = empAddress; + } +} diff --git a/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumber.java b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumber.java new file mode 100644 index 0000000000..0be6cbc910 --- /dev/null +++ b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumber.java @@ -0,0 +1,43 @@ +package com.baeldung.hibernate.customtypes; + +import java.util.Objects; + +public final class PhoneNumber { + + private final int countryCode; + private final int cityCode; + private final int number; + + public PhoneNumber(int countryCode, int cityCode, int number) { + this.countryCode = countryCode; + this.cityCode = cityCode; + this.number = number; + } + + public int getCountryCode() { + return countryCode; + } + + public int getCityCode() { + return cityCode; + } + + public int getNumber() { + return number; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PhoneNumber that = (PhoneNumber) o; + return countryCode == that.countryCode && + cityCode == that.cityCode && + number == that.number; + } + + @Override + public int hashCode() { + return Objects.hash(countryCode, cityCode, number); + } +} diff --git a/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumberType.java b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumberType.java new file mode 100644 index 0000000000..9f09352bec --- /dev/null +++ b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/PhoneNumberType.java @@ -0,0 +1,98 @@ +package com.baeldung.hibernate.customtypes; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.usertype.UserType; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Types; +import java.util.Objects; + + +public class PhoneNumberType implements UserType { + @Override + public int[] sqlTypes() { + return new int[]{Types.INTEGER, Types.INTEGER, Types.INTEGER}; + } + + @Override + public Class returnedClass() { + return PhoneNumber.class; + } + + @Override + public boolean equals(Object x, Object y) throws HibernateException { + if (x == y) + return true; + if (Objects.isNull(x) || Objects.isNull(y)) + return false; + + return x.equals(y); + } + + @Override + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + @Override + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + int countryCode = rs.getInt(names[0]); + + if (rs.wasNull()) + return null; + + int cityCode = rs.getInt(names[1]); + int number = rs.getInt(names[2]); + PhoneNumber employeeNumber = new PhoneNumber(countryCode, cityCode, number); + + return employeeNumber; + } + + @Override + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + + if (Objects.isNull(value)) { + st.setNull(index, Types.INTEGER); + } else { + PhoneNumber employeeNumber = (PhoneNumber) value; + st.setInt(index,employeeNumber.getCountryCode()); + st.setInt(index+1,employeeNumber.getCityCode()); + st.setInt(index+2,employeeNumber.getNumber()); + } + } + + @Override + public Object deepCopy(Object value) throws HibernateException { + if (Objects.isNull(value)) + return null; + + PhoneNumber empNumber = (PhoneNumber) value; + PhoneNumber newEmpNumber = new PhoneNumber(empNumber.getCountryCode(),empNumber.getCityCode(),empNumber.getNumber()); + + return newEmpNumber; + } + + @Override + public boolean isMutable() { + return false; + } + + @Override + public Serializable disassemble(Object value) throws HibernateException { + return (Serializable) value; + } + + @Override + public Object assemble(Serializable cached, Object owner) throws HibernateException { + return cached; + } + + @Override + public Object replace(Object original, Object target, Object owner) throws HibernateException { + return original; + } +} diff --git a/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/Salary.java b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/Salary.java new file mode 100644 index 0000000000..f9a7ac5902 --- /dev/null +++ b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/Salary.java @@ -0,0 +1,39 @@ +package com.baeldung.hibernate.customtypes; + +import java.util.Objects; + +public class Salary { + + private Long amount; + private String currency; + + public Long getAmount() { + return amount; + } + + public void setAmount(Long amount) { + this.amount = amount; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Salary salary = (Salary) o; + return Objects.equals(amount, salary.amount) && + Objects.equals(currency, salary.currency); + } + + @Override + public int hashCode() { + return Objects.hash(amount, currency); + } +} diff --git a/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/SalaryCurrencyConvertor.java b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/SalaryCurrencyConvertor.java new file mode 100644 index 0000000000..340c697c11 --- /dev/null +++ b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/SalaryCurrencyConvertor.java @@ -0,0 +1,15 @@ +package com.baeldung.hibernate.customtypes; + +public class SalaryCurrencyConvertor { + + public static Long convert(Long amount, String oldCurr, String newCurr){ + if (newCurr.equalsIgnoreCase(oldCurr)) + return amount; + + return convertTo(); + } + + private static Long convertTo() { + return 10L; + } +} diff --git a/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/SalaryType.java b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/SalaryType.java new file mode 100644 index 0000000000..266b85140b --- /dev/null +++ b/hibernate5/src/main/java/com/baeldung/hibernate/customtypes/SalaryType.java @@ -0,0 +1,161 @@ +package com.baeldung.hibernate.customtypes; + +import org.hibernate.HibernateException; +import org.hibernate.engine.spi.SharedSessionContractImplementor; +import org.hibernate.type.LongType; +import org.hibernate.type.StringType; +import org.hibernate.type.Type; +import org.hibernate.usertype.CompositeUserType; +import org.hibernate.usertype.DynamicParameterizedType; + +import java.io.Serializable; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Types; +import java.util.Objects; +import java.util.Properties; + +public class SalaryType implements CompositeUserType, DynamicParameterizedType { + + private String localCurrency; + + @Override + public String[] getPropertyNames() { + return new String[]{"amount", "currency"}; + } + + @Override + public Type[] getPropertyTypes() { + return new Type[]{LongType.INSTANCE, StringType.INSTANCE}; + } + + @Override + public Object getPropertyValue(Object component, int property) throws HibernateException { + + Salary salary = (Salary) component; + + switch (property) { + case 0: + return salary.getAmount(); + case 1: + return salary.getCurrency(); + } + + throw new IllegalArgumentException(property + + " is an invalid property index for class type " + + component.getClass().getName()); + + } + + + @Override + public void setPropertyValue(Object component, int property, Object value) throws HibernateException { + + Salary salary = (Salary) component; + + switch (property) { + case 0: + salary.setAmount((Long) value); + case 1: + salary.setCurrency((String) value); + } + + throw new IllegalArgumentException(property + + " is an invalid property index for class type " + + component.getClass().getName()); + + } + + @Override + public Class returnedClass() { + return Salary.class; + } + + @Override + public boolean equals(Object x, Object y) throws HibernateException { + + if (x == y) + return true; + + if (Objects.isNull(x) || Objects.isNull(y)) + return false; + + return x.equals(y); + + } + + @Override + public int hashCode(Object x) throws HibernateException { + return x.hashCode(); + } + + @Override + public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException { + + Salary salary = new Salary(); + salary.setAmount(rs.getLong(names[0])); + + if (rs.wasNull()) + return null; + + salary.setCurrency(rs.getString(names[1])); + + return salary; + } + + @Override + public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException { + + + if (Objects.isNull(value)) + st.setNull(index, Types.BIGINT); + else { + + Salary salary = (Salary) value; + st.setLong(index, SalaryCurrencyConvertor.convert(salary.getAmount(), + salary.getCurrency(), localCurrency)); + st.setString(index + 1, salary.getCurrency()); + } + } + + @Override + public Object deepCopy(Object value) throws HibernateException { + + if (Objects.isNull(value)) + return null; + + Salary oldSal = (Salary) value; + Salary newSal = new Salary(); + + newSal.setAmount(oldSal.getAmount()); + newSal.setCurrency(oldSal.getCurrency()); + + return newSal; + } + + @Override + public boolean isMutable() { + return true; + } + + @Override + public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException { + return (Serializable) deepCopy(value); + } + + @Override + public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return deepCopy(cached); + } + + @Override + public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException { + return original; + } + + @Override + public void setParameterValues(Properties parameters) { + this.localCurrency = parameters.getProperty("currency"); + } +} diff --git a/hibernate5/src/test/java/com/baeldung/hibernate/customtypes/HibernateCustomTypesUnitTest.java b/hibernate5/src/test/java/com/baeldung/hibernate/customtypes/HibernateCustomTypesUnitTest.java new file mode 100644 index 0000000000..f0179701df --- /dev/null +++ b/hibernate5/src/test/java/com/baeldung/hibernate/customtypes/HibernateCustomTypesUnitTest.java @@ -0,0 +1,90 @@ +package com.baeldung.hibernate.customtypes; + +import com.baeldung.hibernate.HibernateUtil; +import org.hibernate.SessionFactory; +import org.hibernate.query.Query; +import org.junit.Assert; +import org.junit.Test; + +import java.io.IOException; +import java.time.LocalDate; + +import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; + +public class HibernateCustomTypesUnitTest { + + @Test + public void givenEmployee_whenSavedWithCustomTypes_thenEntityIsSaved() throws IOException { + + final OfficeEmployee e = new OfficeEmployee(); + e.setDateOfJoining(LocalDate.now()); + + PhoneNumber number = new PhoneNumber(1, 222, 8781902); + e.setEmployeeNumber(number); + + Address empAdd = new Address(); + empAdd.setAddressLine1("Street"); + empAdd.setAddressLine2("Area"); + empAdd.setCity("City"); + empAdd.setCountry("Country"); + empAdd.setZipCode(100); + + e.setEmpAddress(empAdd); + + Salary empSalary = new Salary(); + empSalary.setAmount(1000L); + empSalary.setCurrency("USD"); + e.setSalary(empSalary); + + doInHibernate(this::sessionFactory, session -> { + session.save(e); + boolean contains = session.contains(e); + Assert.assertTrue(contains); + }); + + } + + @Test + public void givenEmployee_whenCustomTypeInQuery_thenReturnEntity() throws IOException { + + final OfficeEmployee e = new OfficeEmployee(); + e.setDateOfJoining(LocalDate.now()); + + PhoneNumber number = new PhoneNumber(1, 222, 8781902); + e.setEmployeeNumber(number); + + Address empAdd = new Address(); + empAdd.setAddressLine1("Street"); + empAdd.setAddressLine2("Area"); + empAdd.setCity("City"); + empAdd.setCountry("Country"); + empAdd.setZipCode(100); + e.setEmpAddress(empAdd); + + Salary empSalary = new Salary(); + empSalary.setAmount(1000L); + empSalary.setCurrency("USD"); + e.setSalary(empSalary); + + doInHibernate(this::sessionFactory, session -> { + session.save(e); + + Query query = session.createQuery("FROM OfficeEmployee OE WHERE OE.empAddress.zipcode = :pinCode"); + query.setParameter("pinCode",100); + int size = query.list().size(); + + Assert.assertEquals(1, size); + }); + + } + + private SessionFactory sessionFactory() { + try { + return HibernateUtil.getSessionFactory("hibernate-customtypes.properties"); + } catch (IOException e) { + e.printStackTrace(); + } + + return null; + } +} diff --git a/hibernate5/src/test/resources/hibernate-customtypes.properties b/hibernate5/src/test/resources/hibernate-customtypes.properties new file mode 100644 index 0000000000..345f3d37b0 --- /dev/null +++ b/hibernate5/src/test/resources/hibernate-customtypes.properties @@ -0,0 +1,10 @@ +hibernate.connection.driver_class=org.postgresql.Driver +hibernate.connection.url=jdbc:postgresql://localhost:5432/test +hibernate.connection.username=postgres +hibernate.connection.password=thule +hibernate.connection.autocommit=true +jdbc.password=thule + +hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +hibernate.show_sql=true +hibernate.hbm2ddl.auto=create-drop \ No newline at end of file From 500367de1400deb5c7d47a4ea2bafb72899af939 Mon Sep 17 00:00:00 2001 From: Syed Mansoor Date: Mon, 15 Oct 2018 12:58:06 +1100 Subject: [PATCH 03/37] Removed Gradle --- apache-pulsar/build.gradle | 26 --- .../gradle/wrapper/gradle-wrapper.jar | Bin 54413 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 - apache-pulsar/gradlew | 172 ------------------ apache-pulsar/gradlew.bat | 84 --------- apache-pulsar/pom.xml | 21 +++ ...al.java => ExclusiveSubscriptionTest.java} | 2 +- ...ial.java => FailoverSubscriptionTest.java} | 2 +- 8 files changed, 23 insertions(+), 289 deletions(-) delete mode 100755 apache-pulsar/build.gradle delete mode 100755 apache-pulsar/gradle/wrapper/gradle-wrapper.jar delete mode 100755 apache-pulsar/gradle/wrapper/gradle-wrapper.properties delete mode 100755 apache-pulsar/gradlew delete mode 100755 apache-pulsar/gradlew.bat create mode 100644 apache-pulsar/pom.xml rename apache-pulsar/src/main/java/com/baeldung/subscriptions/{ExclusiveSubscriptionTutorial.java => ExclusiveSubscriptionTest.java} (98%) mode change 100755 => 100644 rename apache-pulsar/src/main/java/com/baeldung/subscriptions/{FailoverSubscriptionTutorial.java => FailoverSubscriptionTest.java} (98%) mode change 100755 => 100644 diff --git a/apache-pulsar/build.gradle b/apache-pulsar/build.gradle deleted file mode 100755 index f3545d69b2..0000000000 --- a/apache-pulsar/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -apply plugin: 'java' -ext{ - pulsarVersion = '2.1.1-incubating' -} - -repositories { - jcenter() - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -group = 'com.baeldung.pulsar' -archivesBaseName = 'pulsar-java-example' -version = '0.0.1' - - - - -dependencies { - compile group: 'org.apache.pulsar', name: 'pulsar-client', version: pulsarVersion - -} - diff --git a/apache-pulsar/gradle/wrapper/gradle-wrapper.jar b/apache-pulsar/gradle/wrapper/gradle-wrapper.jar deleted file mode 100755 index 91ca28c8b802289c3a438766657a5e98f20eff03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 54413 zcmafaV|Zr4wq`oEZQHiZj%|LijZQ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7zekkYf(`@dZ3F9|?O+*dUL4K4?0@V^>I2;k-a1%ZgY9w2|C5r0R5?80e-|&4yEwkklXmZ)!QSYG) zXBKOz|IPC2W_X!t^cgb^@D=|>r@x$f{3Y+`%NoDT^Y@JIuJ%jxe;es9vi`kJmbnPYT%X}rzs0K#=H)Q`)_L7%?KLLJP+0XJbL&JgdJE{i*){MOFSK z{7XUfXZR-Te}aE8RelNkQV0AQ7RC0TVE^o8c!~K^RQ4GY+xed`|A+zjZ(qij@~zLP zkS@Q0`rpM|UsnI6B;_+vw)^iA{n0%C7N~ql@KXNonIOUIHwgYg4Dcn>OOdc=rUl>M zVEQe|u$P=Kb)TL&-2#4t^Pg0pUQ)dj%6O)#3;zwOe~`_1$@Ef`;F+l=>NlAFFbBS0 zN))`LdKnA;OjQ{B+f;z>i|wCv-CmNs46S`8X-oKRl0V+pKZ%XJWO*6G`OMOs^xG_d zj_7-p06{fybw_P;UzX^eX5Pkcrm04%9rPFa56 zyZE \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/apache-pulsar/gradlew.bat b/apache-pulsar/gradlew.bat deleted file mode 100755 index e95643d6a2..0000000000 --- a/apache-pulsar/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/apache-pulsar/pom.xml b/apache-pulsar/pom.xml new file mode 100644 index 0000000000..da004a7638 --- /dev/null +++ b/apache-pulsar/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + com.baeldung.pulsar + pulsar-java + 0.0.1 + + + + org.apache.pulsar + pulsar-client + 2.1.1-incubating + compile + + + + 1.8 + 1.8 + + diff --git a/apache-pulsar/src/main/java/com/baeldung/subscriptions/ExclusiveSubscriptionTutorial.java b/apache-pulsar/src/main/java/com/baeldung/subscriptions/ExclusiveSubscriptionTest.java old mode 100755 new mode 100644 similarity index 98% rename from apache-pulsar/src/main/java/com/baeldung/subscriptions/ExclusiveSubscriptionTutorial.java rename to apache-pulsar/src/main/java/com/baeldung/subscriptions/ExclusiveSubscriptionTest.java index da9ff0974d..efb898eaf4 --- a/apache-pulsar/src/main/java/com/baeldung/subscriptions/ExclusiveSubscriptionTutorial.java +++ b/apache-pulsar/src/main/java/com/baeldung/subscriptions/ExclusiveSubscriptionTest.java @@ -10,7 +10,7 @@ import org.apache.pulsar.client.api.SubscriptionType; import java.util.stream.IntStream; -public class ExclusiveSubscriptionTutorial { +public class ExclusiveSubscriptionTest { private static final String SERVICE_URL = "pulsar://localhost:6650"; private static final String TOPIC_NAME = "test-topic"; private static final String SUBSCRIPTION_NAME = "test-subscription"; diff --git a/apache-pulsar/src/main/java/com/baeldung/subscriptions/FailoverSubscriptionTutorial.java b/apache-pulsar/src/main/java/com/baeldung/subscriptions/FailoverSubscriptionTest.java old mode 100755 new mode 100644 similarity index 98% rename from apache-pulsar/src/main/java/com/baeldung/subscriptions/FailoverSubscriptionTutorial.java rename to apache-pulsar/src/main/java/com/baeldung/subscriptions/FailoverSubscriptionTest.java index 30351c229d..545661e0c3 --- a/apache-pulsar/src/main/java/com/baeldung/subscriptions/FailoverSubscriptionTutorial.java +++ b/apache-pulsar/src/main/java/com/baeldung/subscriptions/FailoverSubscriptionTest.java @@ -11,7 +11,7 @@ import org.apache.pulsar.client.api.SubscriptionType; import java.util.stream.IntStream; -public class FailoverSubscriptionTutorial { +public class FailoverSubscriptionTest { private static final String SERVICE_URL = "pulsar://localhost:6650"; private static final String TOPIC_NAME = "failover-subscription-test-topic"; private static final String SUBSCRIPTION_NAME = "test-subscription"; From 99a840fd03c3ea72bdb0abf34a98d65b85d27f04 Mon Sep 17 00:00:00 2001 From: DomWos Date: Sat, 13 Oct 2018 23:55:53 +0200 Subject: [PATCH 04/37] BAEL-1463: Apache Storm Introduction --- libraries-data/pom.xml | 6 ++ .../com/baeldung/storm/TopologyRunner.java | 34 ++++++++++ .../baeldung/storm/bolt/AggregatingBolt.java | 39 ++++++++++++ .../baeldung/storm/bolt/FileWritingBolt.java | 63 +++++++++++++++++++ .../baeldung/storm/bolt/FilteringBolt.java | 22 +++++++ .../com/baeldung/storm/bolt/PrintingBolt.java | 18 ++++++ .../storm/model/AggregatedWindow.java | 16 +++++ .../java/com/baeldung/storm/model/User.java | 40 ++++++++++++ .../storm/serialization/UserSerializer.java | 30 +++++++++ .../baeldung/storm/spout/RandomIntSpout.java | 35 +++++++++++ .../storm/spout/RandomNumberSpout.java | 40 ++++++++++++ 11 files changed, 343 insertions(+) create mode 100644 libraries-data/src/main/java/com/baeldung/storm/TopologyRunner.java create mode 100644 libraries-data/src/main/java/com/baeldung/storm/bolt/AggregatingBolt.java create mode 100644 libraries-data/src/main/java/com/baeldung/storm/bolt/FileWritingBolt.java create mode 100644 libraries-data/src/main/java/com/baeldung/storm/bolt/FilteringBolt.java create mode 100644 libraries-data/src/main/java/com/baeldung/storm/bolt/PrintingBolt.java create mode 100644 libraries-data/src/main/java/com/baeldung/storm/model/AggregatedWindow.java create mode 100644 libraries-data/src/main/java/com/baeldung/storm/model/User.java create mode 100644 libraries-data/src/main/java/com/baeldung/storm/serialization/UserSerializer.java create mode 100644 libraries-data/src/main/java/com/baeldung/storm/spout/RandomIntSpout.java create mode 100644 libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java diff --git a/libraries-data/pom.xml b/libraries-data/pom.xml index bbf0c7832f..54d24edbf6 100644 --- a/libraries-data/pom.xml +++ b/libraries-data/pom.xml @@ -259,6 +259,11 @@ slf4j-api ${slf4j.version} + + org.apache.storm + storm-core + ${storm.version} + ch.qos.logback @@ -432,6 +437,7 @@ + 1.2.2 4.0.1 1.4.196 16.5.1 diff --git a/libraries-data/src/main/java/com/baeldung/storm/TopologyRunner.java b/libraries-data/src/main/java/com/baeldung/storm/TopologyRunner.java new file mode 100644 index 0000000000..326f53c0b8 --- /dev/null +++ b/libraries-data/src/main/java/com/baeldung/storm/TopologyRunner.java @@ -0,0 +1,34 @@ +package com.baeldung.storm; + +import com.baeldung.storm.bolt.AggregatingBolt; +import com.baeldung.storm.bolt.FileWritingBolt; +import com.baeldung.storm.bolt.FilteringBolt; +import com.baeldung.storm.bolt.PrintingBolt; +import com.baeldung.storm.spout.RandomNumberSpout; +import org.apache.storm.Config; +import org.apache.storm.LocalCluster; +import org.apache.storm.topology.TopologyBuilder; +import org.apache.storm.topology.base.BaseWindowedBolt; + +public class TopologyRunner { + public static void main(String[] args) { + runTopology(); + } + + public static void runTopology() { + String filePath = "./src/main/resources/operations.txt"; + TopologyBuilder builder = new TopologyBuilder(); + builder.setSpout("randomNumberSpout", new RandomNumberSpout()); + builder.setBolt("filteringBolt", new FilteringBolt()).shuffleGrouping("randomNumberSpout"); + builder.setBolt("aggregatingBolt", new AggregatingBolt() + .withTimestampField("timestamp") + .withLag(BaseWindowedBolt.Duration.seconds(1)) + .withWindow(BaseWindowedBolt.Duration.seconds(5))).shuffleGrouping("filteringBolt"); + builder.setBolt("fileBolt", new FileWritingBolt(filePath)).shuffleGrouping("aggregatingBolt"); + + Config config = new Config(); + config.setDebug(false); + LocalCluster cluster = new LocalCluster(); + cluster.submitTopology("Test", config, builder.createTopology()); + } +} diff --git a/libraries-data/src/main/java/com/baeldung/storm/bolt/AggregatingBolt.java b/libraries-data/src/main/java/com/baeldung/storm/bolt/AggregatingBolt.java new file mode 100644 index 0000000000..555ba7e692 --- /dev/null +++ b/libraries-data/src/main/java/com/baeldung/storm/bolt/AggregatingBolt.java @@ -0,0 +1,39 @@ +package com.baeldung.storm.bolt; + +import org.apache.storm.task.OutputCollector; +import org.apache.storm.task.TopologyContext; +import org.apache.storm.topology.OutputFieldsDeclarer; +import org.apache.storm.topology.base.BaseWindowedBolt; +import org.apache.storm.tuple.Fields; +import org.apache.storm.tuple.Tuple; +import org.apache.storm.tuple.Values; +import org.apache.storm.windowing.TupleWindow; + +import java.util.Comparator; +import java.util.List; +import java.util.Map; + +public class AggregatingBolt extends BaseWindowedBolt { + OutputCollector outputCollector; + @Override + public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { + this.outputCollector = collector; + } + + @Override + public void declareOutputFields(OutputFieldsDeclarer declarer) { + declarer.declare(new Fields("sumOfOperations", "beginningTimestamp", "endTimestamp")); + } + + @Override + public void execute(TupleWindow tupleWindow) { + List tuples = tupleWindow.get(); + tuples.sort(Comparator.comparing(a -> a.getLongByField("timestamp"))); + //This is safe since the window is calculated basing on Tuple's timestamp, thus it can't really be empty + Long beginningTimestamp = tuples.get(0).getLongByField("timestamp"); + Long endTimestamp = tuples.get(tuples.size() - 1).getLongByField("timestamp"); + int sumOfOperations = tuples.stream().mapToInt(tuple -> tuple.getIntegerByField("operation")).sum(); + Values values = new Values(sumOfOperations, beginningTimestamp, endTimestamp); + outputCollector.emit(values); + } +} diff --git a/libraries-data/src/main/java/com/baeldung/storm/bolt/FileWritingBolt.java b/libraries-data/src/main/java/com/baeldung/storm/bolt/FileWritingBolt.java new file mode 100644 index 0000000000..a35ff3aaf5 --- /dev/null +++ b/libraries-data/src/main/java/com/baeldung/storm/bolt/FileWritingBolt.java @@ -0,0 +1,63 @@ +package com.baeldung.storm.bolt; + +import com.baeldung.storm.model.AggregatedWindow; +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectWriter; +import org.apache.storm.task.OutputCollector; +import org.apache.storm.task.TopologyContext; +import org.apache.storm.topology.OutputFieldsDeclarer; +import org.apache.storm.topology.base.BaseRichBolt; +import org.apache.storm.tuple.Tuple; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.BufferedWriter; +import java.io.FileWriter; +import java.io.IOException; +import java.util.Map; + +public class FileWritingBolt extends BaseRichBolt { + public static Logger logger = LoggerFactory.getLogger(FileWritingBolt.class); + BufferedWriter writer; + String filePath; + ObjectMapper objectMapper; + @Override + public void prepare(Map map, TopologyContext topologyContext, OutputCollector outputCollector) { + objectMapper = new ObjectMapper(); + objectMapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY); + try { + writer = new BufferedWriter(new FileWriter(filePath)); + } catch (IOException e) { + logger.error("Failed to open a file for writing.", e); + } + } + + @Override + public void execute(Tuple tuple) { + int sumOfOperations = tuple.getIntegerByField("sumOfOperations"); + long beginningTimestamp = tuple.getLongByField("beginningTimestamp"); + long endTimestamp = tuple.getLongByField("endTimestamp"); + + if(sumOfOperations > 200) { + AggregatedWindow aggregatedWindow = new AggregatedWindow(sumOfOperations, beginningTimestamp, endTimestamp); + try { + writer.write(objectMapper.writeValueAsString(aggregatedWindow)); + writer.write("\n"); + writer.flush(); + } catch (IOException e) { + logger.error("Failed to write data to file.", e); + } + } + } + + public FileWritingBolt(String filePath) { + this.filePath = filePath; + } + + @Override + public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) { + + } +} diff --git a/libraries-data/src/main/java/com/baeldung/storm/bolt/FilteringBolt.java b/libraries-data/src/main/java/com/baeldung/storm/bolt/FilteringBolt.java new file mode 100644 index 0000000000..a2e80deb33 --- /dev/null +++ b/libraries-data/src/main/java/com/baeldung/storm/bolt/FilteringBolt.java @@ -0,0 +1,22 @@ +package com.baeldung.storm.bolt; + +import org.apache.storm.topology.BasicOutputCollector; +import org.apache.storm.topology.OutputFieldsDeclarer; +import org.apache.storm.topology.base.BaseBasicBolt; +import org.apache.storm.tuple.Fields; +import org.apache.storm.tuple.Tuple; + +public class FilteringBolt extends BaseBasicBolt { + @Override + public void execute(Tuple tuple, BasicOutputCollector basicOutputCollector) { + int operation = tuple.getIntegerByField("operation"); + if(operation >= 0 ) { + basicOutputCollector.emit(tuple.getValues()); + } + } + + @Override + public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) { + outputFieldsDeclarer.declare(new Fields("operation", "timestamp")); + } +} diff --git a/libraries-data/src/main/java/com/baeldung/storm/bolt/PrintingBolt.java b/libraries-data/src/main/java/com/baeldung/storm/bolt/PrintingBolt.java new file mode 100644 index 0000000000..efd2c9b1d9 --- /dev/null +++ b/libraries-data/src/main/java/com/baeldung/storm/bolt/PrintingBolt.java @@ -0,0 +1,18 @@ +package com.baeldung.storm.bolt; + +import org.apache.storm.topology.BasicOutputCollector; +import org.apache.storm.topology.OutputFieldsDeclarer; +import org.apache.storm.topology.base.BaseBasicBolt; +import org.apache.storm.tuple.Tuple; + +public class PrintingBolt extends BaseBasicBolt { + @Override + public void execute(Tuple tuple, BasicOutputCollector basicOutputCollector) { + System.out.println(tuple); + } + + @Override + public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) { + + } +} diff --git a/libraries-data/src/main/java/com/baeldung/storm/model/AggregatedWindow.java b/libraries-data/src/main/java/com/baeldung/storm/model/AggregatedWindow.java new file mode 100644 index 0000000000..beaf54d34c --- /dev/null +++ b/libraries-data/src/main/java/com/baeldung/storm/model/AggregatedWindow.java @@ -0,0 +1,16 @@ +package com.baeldung.storm.model; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +@JsonSerialize +public class AggregatedWindow { + int sumOfOperations; + long beginningTimestamp; + long endTimestamp; + + public AggregatedWindow(int sumOfOperations, long beginningTimestamp, long endTimestamp) { + this.sumOfOperations = sumOfOperations; + this.beginningTimestamp = beginningTimestamp; + this.endTimestamp = endTimestamp; + } +} diff --git a/libraries-data/src/main/java/com/baeldung/storm/model/User.java b/libraries-data/src/main/java/com/baeldung/storm/model/User.java new file mode 100644 index 0000000000..62b9ac639b --- /dev/null +++ b/libraries-data/src/main/java/com/baeldung/storm/model/User.java @@ -0,0 +1,40 @@ +package com.baeldung.storm.model; + +public class User { + String username; + String password; + String email; + int age; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } +} diff --git a/libraries-data/src/main/java/com/baeldung/storm/serialization/UserSerializer.java b/libraries-data/src/main/java/com/baeldung/storm/serialization/UserSerializer.java new file mode 100644 index 0000000000..6199a203da --- /dev/null +++ b/libraries-data/src/main/java/com/baeldung/storm/serialization/UserSerializer.java @@ -0,0 +1,30 @@ +package com.baeldung.storm.serialization; + + +import com.baeldung.storm.model.User; +import com.esotericsoftware.kryo.Kryo; +import com.esotericsoftware.kryo.Serializer; +import com.esotericsoftware.kryo.io.Input; +import com.esotericsoftware.kryo.io.Output; + +public class UserSerializer extends Serializer{ + @Override + public void write(Kryo kryo, Output output, User user) { + output.writeString(user.getEmail()); + output.writeString(user.getUsername()); + output.write(user.getAge()); + } + + @Override + public User read(Kryo kryo, Input input, Class aClass) { + User user = new User(); + String email = input.readString(); + String name = input.readString(); + int age = input.read(); + user.setAge(age); + user.setEmail(email); + user.setUsername(name); + + return user; + } +} diff --git a/libraries-data/src/main/java/com/baeldung/storm/spout/RandomIntSpout.java b/libraries-data/src/main/java/com/baeldung/storm/spout/RandomIntSpout.java new file mode 100644 index 0000000000..669eb4f897 --- /dev/null +++ b/libraries-data/src/main/java/com/baeldung/storm/spout/RandomIntSpout.java @@ -0,0 +1,35 @@ +package com.baeldung.storm.spout; + +import org.apache.storm.spout.SpoutOutputCollector; +import org.apache.storm.task.TopologyContext; +import org.apache.storm.topology.OutputFieldsDeclarer; +import org.apache.storm.topology.base.BaseRichSpout; +import org.apache.storm.tuple.Fields; +import org.apache.storm.tuple.Values; +import org.apache.storm.utils.Utils; + +import java.util.Map; +import java.util.Random; + +public class RandomIntSpout extends BaseRichSpout { + + Random random; + SpoutOutputCollector outputCollector; + + @Override + public void open(Map map, TopologyContext topologyContext, SpoutOutputCollector spoutOutputCollector) { + random = new Random(); + outputCollector = spoutOutputCollector; + } + + @Override + public void nextTuple() { + Utils.sleep(1000); + outputCollector.emit(new Values(random.nextInt(), System.currentTimeMillis())); + } + + @Override + public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) { + outputFieldsDeclarer.declare(new Fields("randomInt", "timestamp")); + } +} diff --git a/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java b/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java new file mode 100644 index 0000000000..5d7d3cc53e --- /dev/null +++ b/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java @@ -0,0 +1,40 @@ +package com.baeldung.storm.spout; + +import org.apache.storm.spout.SpoutOutputCollector; +import org.apache.storm.task.OutputCollector; +import org.apache.storm.task.TopologyContext; +import org.apache.storm.topology.OutputFieldsDeclarer; +import org.apache.storm.topology.base.BaseRichSpout; +import org.apache.storm.tuple.Fields; +import org.apache.storm.tuple.Values; +import org.apache.storm.utils.Utils; + +import java.util.Map; +import java.util.Random; + +public class RandomNumberSpout extends BaseRichSpout { + Random random; + SpoutOutputCollector collector; + + @Override + public void open(Map map, TopologyContext topologyContext, SpoutOutputCollector spoutOutputCollector) { + random = new Random(); + collector = spoutOutputCollector; + } + + @Override + public void nextTuple() { + Utils.sleep(1000); + //This will select random int from the range (-1000, 1000) + int operation = random.nextInt(1000 + 1 + 1000) - 1000; + long timestamp = System.currentTimeMillis(); + + Values values = new Values(operation, timestamp); + collector.emit(values); + } + + @Override + public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) { + outputFieldsDeclarer.declare(new Fields("operation", "timestamp")); + } +} From a0a393cdfc7e9e080e812f041bbf5a0f1fa127fb Mon Sep 17 00:00:00 2001 From: DomWos Date: Tue, 16 Oct 2018 10:39:18 +0200 Subject: [PATCH 05/37] BAEL-1463: Privatize Everything. --- .../java/com/baeldung/storm/bolt/AggregatingBolt.java | 2 +- .../java/com/baeldung/storm/bolt/FileWritingBolt.java | 7 +++---- .../src/main/java/com/baeldung/storm/model/User.java | 8 ++++---- .../java/com/baeldung/storm/spout/RandomIntSpout.java | 4 ++-- .../java/com/baeldung/storm/spout/RandomNumberSpout.java | 4 ++-- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/libraries-data/src/main/java/com/baeldung/storm/bolt/AggregatingBolt.java b/libraries-data/src/main/java/com/baeldung/storm/bolt/AggregatingBolt.java index 555ba7e692..c7263cd8d5 100644 --- a/libraries-data/src/main/java/com/baeldung/storm/bolt/AggregatingBolt.java +++ b/libraries-data/src/main/java/com/baeldung/storm/bolt/AggregatingBolt.java @@ -14,7 +14,7 @@ import java.util.List; import java.util.Map; public class AggregatingBolt extends BaseWindowedBolt { - OutputCollector outputCollector; + private OutputCollector outputCollector; @Override public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { this.outputCollector = collector; diff --git a/libraries-data/src/main/java/com/baeldung/storm/bolt/FileWritingBolt.java b/libraries-data/src/main/java/com/baeldung/storm/bolt/FileWritingBolt.java index a35ff3aaf5..40ed72164d 100644 --- a/libraries-data/src/main/java/com/baeldung/storm/bolt/FileWritingBolt.java +++ b/libraries-data/src/main/java/com/baeldung/storm/bolt/FileWritingBolt.java @@ -4,7 +4,6 @@ import com.baeldung.storm.model.AggregatedWindow; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectWriter; import org.apache.storm.task.OutputCollector; import org.apache.storm.task.TopologyContext; import org.apache.storm.topology.OutputFieldsDeclarer; @@ -20,9 +19,9 @@ import java.util.Map; public class FileWritingBolt extends BaseRichBolt { public static Logger logger = LoggerFactory.getLogger(FileWritingBolt.class); - BufferedWriter writer; - String filePath; - ObjectMapper objectMapper; + private BufferedWriter writer; + private String filePath; + private ObjectMapper objectMapper; @Override public void prepare(Map map, TopologyContext topologyContext, OutputCollector outputCollector) { objectMapper = new ObjectMapper(); diff --git a/libraries-data/src/main/java/com/baeldung/storm/model/User.java b/libraries-data/src/main/java/com/baeldung/storm/model/User.java index 62b9ac639b..eafbf0e1eb 100644 --- a/libraries-data/src/main/java/com/baeldung/storm/model/User.java +++ b/libraries-data/src/main/java/com/baeldung/storm/model/User.java @@ -1,10 +1,10 @@ package com.baeldung.storm.model; public class User { - String username; - String password; - String email; - int age; + private String username; + private String password; + private String email; + private int age; public String getUsername() { return username; diff --git a/libraries-data/src/main/java/com/baeldung/storm/spout/RandomIntSpout.java b/libraries-data/src/main/java/com/baeldung/storm/spout/RandomIntSpout.java index 669eb4f897..4a8ef76598 100644 --- a/libraries-data/src/main/java/com/baeldung/storm/spout/RandomIntSpout.java +++ b/libraries-data/src/main/java/com/baeldung/storm/spout/RandomIntSpout.java @@ -13,8 +13,8 @@ import java.util.Random; public class RandomIntSpout extends BaseRichSpout { - Random random; - SpoutOutputCollector outputCollector; + private Random random; + private SpoutOutputCollector outputCollector; @Override public void open(Map map, TopologyContext topologyContext, SpoutOutputCollector spoutOutputCollector) { diff --git a/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java b/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java index 5d7d3cc53e..371a61720a 100644 --- a/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java +++ b/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java @@ -13,8 +13,8 @@ import java.util.Map; import java.util.Random; public class RandomNumberSpout extends BaseRichSpout { - Random random; - SpoutOutputCollector collector; + private Random random; + private SpoutOutputCollector collector; @Override public void open(Map map, TopologyContext topologyContext, SpoutOutputCollector spoutOutputCollector) { From b30136c2b53f7fffb2e42c0a983014c006e4d7bc Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Fri, 19 Oct 2018 20:56:11 +0300 Subject: [PATCH 06/37] Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 8e0a5eb9ee..d896ac0715 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,12 @@ To do the full build, do: `mvn install -Pdefault -Dgib.enabled=false` Building a single module ==================== To build a specific module run the command: `mvn clean install -Dgib.enabled=false` in the module directory + + +Running a Spring Boot module +==================== +To run a Spring Boot module run the command: `mvn spring-boot:run -Dgib.enabled=false` in the module directory + + + + From 71793cef7ffeca962bf2bd801d3a38f360cb0b99 Mon Sep 17 00:00:00 2001 From: amit2103 Date: Sat, 20 Oct 2018 00:37:31 +0530 Subject: [PATCH 07/37] [BAEL-9550] - Moved articles and codes from core-java-collections module to java-collections-convversions and java-collections-maps module --- core-java-collections/README.md | 18 ------- core-java-collections/pom.xml | 17 ------ java-collections-conversions/README.md | 11 ++++ java-collections-conversions/pom.xml | 40 ++++++++++++++ .../convertcollectiontoarraylist/Foo.java | 0 .../com/baeldung/convertlisttomap/Animal.java | 0 .../ConvertListToMapService.java | 0 .../src/main/resources/logback.xml | 13 +++++ .../FooUnitTest.java | 0 .../ConvertListToMapServiceUnitTest.java | 0 ...tWithDiplicatedIdToMapServiceUnitTest.java | 0 .../JavaCollectionConversionUnitTest.java | 0 .../org/baeldung/java/lists/ListToSTring.java | 0 java-collections-maps/README.md | 17 ++++++ java-collections-maps/pom.xml | 54 +++++++++++++++++++ .../java/com/baeldung/java/map/MapUtil.java | 0 .../java/com/baeldung/java/map/MyKey.java | 0 .../baeldung/java/map/MyLinkedHashMap.java | 0 .../java/map/initialize/MapInitializer.java | 0 .../baeldung/map/iteration/MapIteration.java | 0 .../com/baeldung/map/java_8/MergeMaps.java | 0 .../java/com/baeldung/map/util/MapMax.java | 0 .../main/java/com/baeldung/sort/Employee.java | 0 .../java/com/baeldung/sort/SortHashMap.java | 0 .../src/main/resources/logback.xml | 13 +++++ .../WhenComparingTreeMapVsHashMap.java | 0 .../baeldung/java/map/KeyCheckUnitTest.java | 0 .../java/map/MapMultipleValuesUnitTest.java | 0 .../com/baeldung/java/map/MapUnitTest.java | 0 .../baeldung/java/map/MapUtilUnitTest.java | 0 .../initialize/MapInitializerUnitTest.java | 0 .../com/baeldung/map/util/MapMaxUnitTest.java | 0 .../weakhashmap/WeakHashMapUnitTest.java | 0 pom.xml | 4 ++ 34 files changed, 152 insertions(+), 35 deletions(-) create mode 100644 java-collections-conversions/README.md create mode 100644 java-collections-conversions/pom.xml rename {core-java-collections => java-collections-conversions}/src/main/java/com/baeldung/convertcollectiontoarraylist/Foo.java (100%) rename {core-java-collections => java-collections-conversions}/src/main/java/com/baeldung/convertlisttomap/Animal.java (100%) rename {core-java-collections => java-collections-conversions}/src/main/java/com/baeldung/convertlisttomap/ConvertListToMapService.java (100%) create mode 100644 java-collections-conversions/src/main/resources/logback.xml rename {core-java-collections => java-collections-conversions}/src/test/java/com/baeldung/convertcollectiontoarraylist/FooUnitTest.java (100%) rename {core-java-collections => java-collections-conversions}/src/test/java/com/baeldung/convertlisttomap/ConvertListToMapServiceUnitTest.java (100%) rename {core-java-collections => java-collections-conversions}/src/test/java/com/baeldung/convertlisttomap/ConvertListWithDiplicatedIdToMapServiceUnitTest.java (100%) rename {core-java-collections => java-collections-conversions}/src/test/java/org/baeldung/java/collections/JavaCollectionConversionUnitTest.java (100%) rename {core-java-collections => java-collections-conversions}/src/test/java/org/baeldung/java/lists/ListToSTring.java (100%) create mode 100644 java-collections-maps/README.md create mode 100644 java-collections-maps/pom.xml rename {core-java-collections => java-collections-maps}/src/main/java/com/baeldung/java/map/MapUtil.java (100%) rename {core-java-collections => java-collections-maps}/src/main/java/com/baeldung/java/map/MyKey.java (100%) rename {core-java-collections => java-collections-maps}/src/main/java/com/baeldung/java/map/MyLinkedHashMap.java (100%) rename {core-java-collections => java-collections-maps}/src/main/java/com/baeldung/java/map/initialize/MapInitializer.java (100%) rename {core-java-collections => java-collections-maps}/src/main/java/com/baeldung/map/iteration/MapIteration.java (100%) rename {core-java-collections => java-collections-maps}/src/main/java/com/baeldung/map/java_8/MergeMaps.java (100%) rename {core-java-collections => java-collections-maps}/src/main/java/com/baeldung/map/util/MapMax.java (100%) rename {core-java-collections => java-collections-maps}/src/main/java/com/baeldung/sort/Employee.java (100%) rename {core-java-collections => java-collections-maps}/src/main/java/com/baeldung/sort/SortHashMap.java (100%) create mode 100644 java-collections-maps/src/main/resources/logback.xml rename {core-java-collections => java-collections-maps}/src/test/java/com/baeldung/collection/WhenComparingTreeMapVsHashMap.java (100%) rename {core-java-collections => java-collections-maps}/src/test/java/com/baeldung/java/map/KeyCheckUnitTest.java (100%) rename {core-java-collections => java-collections-maps}/src/test/java/com/baeldung/java/map/MapMultipleValuesUnitTest.java (100%) rename {core-java-collections => java-collections-maps}/src/test/java/com/baeldung/java/map/MapUnitTest.java (100%) rename {core-java-collections => java-collections-maps}/src/test/java/com/baeldung/java/map/MapUtilUnitTest.java (100%) rename {core-java-collections => java-collections-maps}/src/test/java/com/baeldung/java/map/initialize/MapInitializerUnitTest.java (100%) rename {core-java-collections => java-collections-maps}/src/test/java/com/baeldung/map/util/MapMaxUnitTest.java (100%) rename {core-java-collections => java-collections-maps}/src/test/java/com/baeldung/weakhashmap/WeakHashMapUnitTest.java (100%) diff --git a/core-java-collections/README.md b/core-java-collections/README.md index e366232f74..684beda281 100644 --- a/core-java-collections/README.md +++ b/core-java-collections/README.md @@ -4,37 +4,23 @@ ### Relevant Articles: - [Immutable ArrayList in Java](http://www.baeldung.com/java-immutable-list) -- [Converting between an Array and a List in Java](http://www.baeldung.com/convert-array-to-list-and-list-to-array) -- [Converting between an Array and a Set in Java](http://www.baeldung.com/convert-array-to-set-and-set-to-array) -- [Converting between a List and a Set in Java](http://www.baeldung.com/convert-list-to-set-and-set-to-list) -- [Convert a Map to an Array, List or Set in Java](http://www.baeldung.com/convert-map-values-to-array-list-set) - [Guide to the Java ArrayList](http://www.baeldung.com/java-arraylist) - [Random List Element](http://www.baeldung.com/java-random-list-element) - [Java - Combine Multiple Collections](http://www.baeldung.com/java-combine-multiple-collections) -- [Guide to WeakHashMap in Java](http://www.baeldung.com/java-weakhashmap) -- [Guide to the Guava BiMap](http://www.baeldung.com/guava-bimap) -- [The Java HashMap Under the Hood](http://www.baeldung.com/java-hashmap) -- [A Guide to LinkedHashMap in Java](http://www.baeldung.com/java-linked-hashmap) -- [A Guide to TreeMap in Java](http://www.baeldung.com/java-treemap) - [Removing all nulls from a List in Java](http://www.baeldung.com/java-remove-nulls-from-list) - [Removing all duplicates from a List in Java](http://www.baeldung.com/java-remove-duplicates-from-list) - [Flattening Nested Collections in Java](http://www.baeldung.com/java-flatten-nested-collections) - [HashSet and TreeSet Comparison](http://www.baeldung.com/java-hashset-vs-treeset) -- [Iterate over a Map in Java](http://www.baeldung.com/java-iterate-map) - [Collect a Java Stream to an Immutable Collection](http://www.baeldung.com/java-stream-immutable-collection) -- [Converting a List to String in Java](http://www.baeldung.com/java-list-to-string) - [Introduction to the Java ArrayDeque](http://www.baeldung.com/java-array-deque) - [A Guide to HashSet in Java](http://www.baeldung.com/java-hashset) - [A Guide to TreeSet in Java](http://www.baeldung.com/java-tree-set) -- [Java TreeMap vs HashMap](http://www.baeldung.com/java-treemap-vs-hashmap) - [How to TDD a List Implementation in Java](http://www.baeldung.com/java-test-driven-list) -- [How to Store Duplicate Keys in a Map in Java?](http://www.baeldung.com/java-map-duplicate-keys) - [Getting the Size of an Iterable in Java](http://www.baeldung.com/java-iterable-size) - [Iterating Backward Through a List](http://www.baeldung.com/java-list-iterate-backwards) - [How to Filter a Collection in Java](http://www.baeldung.com/java-collection-filtering) - [Add Multiple Items to an Java ArrayList](http://www.baeldung.com/java-add-items-array-list) - [Remove the First Element from a List](http://www.baeldung.com/java-remove-first-element-from-list) -- [How to Convert List to Map in Java](http://www.baeldung.com/java-list-to-map) - [Initializing HashSet at the Time of Construction](http://www.baeldung.com/java-initialize-hashset) - [Removing the First Element of an Array](https://www.baeldung.com/java-array-remove-first-element) - [Fail-Safe Iterator vs Fail-Fast Iterator](http://www.baeldung.com/java-fail-safe-vs-fail-fast-iterator) @@ -47,12 +33,8 @@ - [Remove All Occurrences of a Specific Value from a List](https://www.baeldung.com/java-remove-value-from-list) - [Thread Safe LIFO Data Structure Implementations](https://www.baeldung.com/java-lifo-thread-safe) - [Collections.emptyList() vs. New List Instance](https://www.baeldung.com/java-collections-emptylist-new-list) -- [Initialize a HashMap in Java](https://www.baeldung.com/java-initialize-hashmap) - [Differences Between Collection.clear() and Collection.removeAll()](https://www.baeldung.com/java-collection-clear-vs-removeall) - [Performance of contains() in a HashSet vs ArrayList](https://www.baeldung.com/java-hashset-arraylist-contains-performance) -- [Get the Key for a Value from a Java Map](https://www.baeldung.com/java-map-key-from-value) - [Time Complexity of Java Collections](https://www.baeldung.com/java-collections-complexity) -- [Sort a HashMap in Java](https://www.baeldung.com/java-hashmap-sort) -- [Finding the Highest Value in a Java Map](https://www.baeldung.com/java-find-map-max) - [Operating on and Removing an Item from Stream](https://www.baeldung.com/java-use-remove-item-stream) - [An Introduction to Synchronized Java Collections](https://www.baeldung.com/java-synchronized-collections) diff --git a/core-java-collections/pom.xml b/core-java-collections/pom.xml index b4a6e26d13..39ddc17684 100644 --- a/core-java-collections/pom.xml +++ b/core-java-collections/pom.xml @@ -14,22 +14,11 @@ - - net.sourceforge.collections - collections-generic - ${collections-generic.version} - org.apache.commons commons-collections4 ${commons-collections4.version} - - com.jayway.awaitility - awaitility - ${avaitility.version} - test - org.apache.commons commons-lang3 @@ -67,12 +56,6 @@ commons-exec 1.3 - - - one.util - streamex - 0.6.5 - diff --git a/java-collections-conversions/README.md b/java-collections-conversions/README.md new file mode 100644 index 0000000000..761a78d7b0 --- /dev/null +++ b/java-collections-conversions/README.md @@ -0,0 +1,11 @@ +========= + +## Java Collections Cookbooks and Examples + +### Relevant Articles: +- [Converting between an Array and a List in Java](http://www.baeldung.com/convert-array-to-list-and-list-to-array) +- [Converting between an Array and a Set in Java](http://www.baeldung.com/convert-array-to-set-and-set-to-array) +- [Converting between a List and a Set in Java](http://www.baeldung.com/convert-list-to-set-and-set-to-list) +- [Convert a Map to an Array, List or Set in Java](http://www.baeldung.com/convert-map-values-to-array-list-set) +- [Converting a List to String in Java](http://www.baeldung.com/java-list-to-string) +- [How to Convert List to Map in Java](http://www.baeldung.com/java-list-to-map) \ No newline at end of file diff --git a/java-collections-conversions/pom.xml b/java-collections-conversions/pom.xml new file mode 100644 index 0000000000..9b54652001 --- /dev/null +++ b/java-collections-conversions/pom.xml @@ -0,0 +1,40 @@ + + 4.0.0 + java-collections-conversions + 0.1.0-SNAPSHOT + jar + java-collections-conversions + + + com.baeldung + parent-java + 0.0.1-SNAPSHOT + ../parent-java + + + + + org.apache.commons + commons-collections4 + ${commons-collections4.version} + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + org.assertj + assertj-core + ${assertj.version} + test + + + + + 3.5 + 4.1 + 3.6.1 + + diff --git a/core-java-collections/src/main/java/com/baeldung/convertcollectiontoarraylist/Foo.java b/java-collections-conversions/src/main/java/com/baeldung/convertcollectiontoarraylist/Foo.java similarity index 100% rename from core-java-collections/src/main/java/com/baeldung/convertcollectiontoarraylist/Foo.java rename to java-collections-conversions/src/main/java/com/baeldung/convertcollectiontoarraylist/Foo.java diff --git a/core-java-collections/src/main/java/com/baeldung/convertlisttomap/Animal.java b/java-collections-conversions/src/main/java/com/baeldung/convertlisttomap/Animal.java similarity index 100% rename from core-java-collections/src/main/java/com/baeldung/convertlisttomap/Animal.java rename to java-collections-conversions/src/main/java/com/baeldung/convertlisttomap/Animal.java diff --git a/core-java-collections/src/main/java/com/baeldung/convertlisttomap/ConvertListToMapService.java b/java-collections-conversions/src/main/java/com/baeldung/convertlisttomap/ConvertListToMapService.java similarity index 100% rename from core-java-collections/src/main/java/com/baeldung/convertlisttomap/ConvertListToMapService.java rename to java-collections-conversions/src/main/java/com/baeldung/convertlisttomap/ConvertListToMapService.java diff --git a/java-collections-conversions/src/main/resources/logback.xml b/java-collections-conversions/src/main/resources/logback.xml new file mode 100644 index 0000000000..7d900d8ea8 --- /dev/null +++ b/java-collections-conversions/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + \ No newline at end of file diff --git a/core-java-collections/src/test/java/com/baeldung/convertcollectiontoarraylist/FooUnitTest.java b/java-collections-conversions/src/test/java/com/baeldung/convertcollectiontoarraylist/FooUnitTest.java similarity index 100% rename from core-java-collections/src/test/java/com/baeldung/convertcollectiontoarraylist/FooUnitTest.java rename to java-collections-conversions/src/test/java/com/baeldung/convertcollectiontoarraylist/FooUnitTest.java diff --git a/core-java-collections/src/test/java/com/baeldung/convertlisttomap/ConvertListToMapServiceUnitTest.java b/java-collections-conversions/src/test/java/com/baeldung/convertlisttomap/ConvertListToMapServiceUnitTest.java similarity index 100% rename from core-java-collections/src/test/java/com/baeldung/convertlisttomap/ConvertListToMapServiceUnitTest.java rename to java-collections-conversions/src/test/java/com/baeldung/convertlisttomap/ConvertListToMapServiceUnitTest.java diff --git a/core-java-collections/src/test/java/com/baeldung/convertlisttomap/ConvertListWithDiplicatedIdToMapServiceUnitTest.java b/java-collections-conversions/src/test/java/com/baeldung/convertlisttomap/ConvertListWithDiplicatedIdToMapServiceUnitTest.java similarity index 100% rename from core-java-collections/src/test/java/com/baeldung/convertlisttomap/ConvertListWithDiplicatedIdToMapServiceUnitTest.java rename to java-collections-conversions/src/test/java/com/baeldung/convertlisttomap/ConvertListWithDiplicatedIdToMapServiceUnitTest.java diff --git a/core-java-collections/src/test/java/org/baeldung/java/collections/JavaCollectionConversionUnitTest.java b/java-collections-conversions/src/test/java/org/baeldung/java/collections/JavaCollectionConversionUnitTest.java similarity index 100% rename from core-java-collections/src/test/java/org/baeldung/java/collections/JavaCollectionConversionUnitTest.java rename to java-collections-conversions/src/test/java/org/baeldung/java/collections/JavaCollectionConversionUnitTest.java diff --git a/core-java-collections/src/test/java/org/baeldung/java/lists/ListToSTring.java b/java-collections-conversions/src/test/java/org/baeldung/java/lists/ListToSTring.java similarity index 100% rename from core-java-collections/src/test/java/org/baeldung/java/lists/ListToSTring.java rename to java-collections-conversions/src/test/java/org/baeldung/java/lists/ListToSTring.java diff --git a/java-collections-maps/README.md b/java-collections-maps/README.md new file mode 100644 index 0000000000..4883e0e1b6 --- /dev/null +++ b/java-collections-maps/README.md @@ -0,0 +1,17 @@ +========= + +## Java Collections Cookbooks and Examples + +### Relevant Articles: +- [Guide to WeakHashMap in Java](http://www.baeldung.com/java-weakhashmap) +- [Guide to the Guava BiMap](http://www.baeldung.com/guava-bimap) +- [The Java HashMap Under the Hood](http://www.baeldung.com/java-hashmap) +- [A Guide to LinkedHashMap in Java](http://www.baeldung.com/java-linked-hashmap) +- [A Guide to TreeMap in Java](http://www.baeldung.com/java-treemap) +- [Iterate over a Map in Java](http://www.baeldung.com/java-iterate-map) +- [Java TreeMap vs HashMap](http://www.baeldung.com/java-treemap-vs-hashmap) +- [How to Store Duplicate Keys in a Map in Java?](http://www.baeldung.com/java-map-duplicate-keys) +- [Initialize a HashMap in Java](https://www.baeldung.com/java-initialize-hashmap) +- [Get the Key for a Value from a Java Map](https://www.baeldung.com/java-map-key-from-value) +- [Sort a HashMap in Java](https://www.baeldung.com/java-hashmap-sort) +- [Finding the Highest Value in a Java Map](https://www.baeldung.com/java-find-map-max) \ No newline at end of file diff --git a/java-collections-maps/pom.xml b/java-collections-maps/pom.xml new file mode 100644 index 0000000000..0803866c51 --- /dev/null +++ b/java-collections-maps/pom.xml @@ -0,0 +1,54 @@ + + 4.0.0 + java-collections-maps + 0.1.0-SNAPSHOT + jar + java-collections-maps + + + com.baeldung + parent-java + 0.0.1-SNAPSHOT + ../parent-java + + + + + org.apache.commons + commons-collections4 + ${commons-collections4.version} + + + com.jayway.awaitility + awaitility + ${avaitility.version} + test + + + org.apache.commons + commons-lang3 + ${commons-lang3.version} + + + org.assertj + assertj-core + ${assertj.version} + test + + + one.util + streamex + 0.6.5 + + + + + 3.5 + 4.1 + 4.01 + 1.7.0 + 3.6.1 + 7.1.0 + + diff --git a/core-java-collections/src/main/java/com/baeldung/java/map/MapUtil.java b/java-collections-maps/src/main/java/com/baeldung/java/map/MapUtil.java similarity index 100% rename from core-java-collections/src/main/java/com/baeldung/java/map/MapUtil.java rename to java-collections-maps/src/main/java/com/baeldung/java/map/MapUtil.java diff --git a/core-java-collections/src/main/java/com/baeldung/java/map/MyKey.java b/java-collections-maps/src/main/java/com/baeldung/java/map/MyKey.java similarity index 100% rename from core-java-collections/src/main/java/com/baeldung/java/map/MyKey.java rename to java-collections-maps/src/main/java/com/baeldung/java/map/MyKey.java diff --git a/core-java-collections/src/main/java/com/baeldung/java/map/MyLinkedHashMap.java b/java-collections-maps/src/main/java/com/baeldung/java/map/MyLinkedHashMap.java similarity index 100% rename from core-java-collections/src/main/java/com/baeldung/java/map/MyLinkedHashMap.java rename to java-collections-maps/src/main/java/com/baeldung/java/map/MyLinkedHashMap.java diff --git a/core-java-collections/src/main/java/com/baeldung/java/map/initialize/MapInitializer.java b/java-collections-maps/src/main/java/com/baeldung/java/map/initialize/MapInitializer.java similarity index 100% rename from core-java-collections/src/main/java/com/baeldung/java/map/initialize/MapInitializer.java rename to java-collections-maps/src/main/java/com/baeldung/java/map/initialize/MapInitializer.java diff --git a/core-java-collections/src/main/java/com/baeldung/map/iteration/MapIteration.java b/java-collections-maps/src/main/java/com/baeldung/map/iteration/MapIteration.java similarity index 100% rename from core-java-collections/src/main/java/com/baeldung/map/iteration/MapIteration.java rename to java-collections-maps/src/main/java/com/baeldung/map/iteration/MapIteration.java diff --git a/core-java-collections/src/main/java/com/baeldung/map/java_8/MergeMaps.java b/java-collections-maps/src/main/java/com/baeldung/map/java_8/MergeMaps.java similarity index 100% rename from core-java-collections/src/main/java/com/baeldung/map/java_8/MergeMaps.java rename to java-collections-maps/src/main/java/com/baeldung/map/java_8/MergeMaps.java diff --git a/core-java-collections/src/main/java/com/baeldung/map/util/MapMax.java b/java-collections-maps/src/main/java/com/baeldung/map/util/MapMax.java similarity index 100% rename from core-java-collections/src/main/java/com/baeldung/map/util/MapMax.java rename to java-collections-maps/src/main/java/com/baeldung/map/util/MapMax.java diff --git a/core-java-collections/src/main/java/com/baeldung/sort/Employee.java b/java-collections-maps/src/main/java/com/baeldung/sort/Employee.java similarity index 100% rename from core-java-collections/src/main/java/com/baeldung/sort/Employee.java rename to java-collections-maps/src/main/java/com/baeldung/sort/Employee.java diff --git a/core-java-collections/src/main/java/com/baeldung/sort/SortHashMap.java b/java-collections-maps/src/main/java/com/baeldung/sort/SortHashMap.java similarity index 100% rename from core-java-collections/src/main/java/com/baeldung/sort/SortHashMap.java rename to java-collections-maps/src/main/java/com/baeldung/sort/SortHashMap.java diff --git a/java-collections-maps/src/main/resources/logback.xml b/java-collections-maps/src/main/resources/logback.xml new file mode 100644 index 0000000000..7d900d8ea8 --- /dev/null +++ b/java-collections-maps/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + \ No newline at end of file diff --git a/core-java-collections/src/test/java/com/baeldung/collection/WhenComparingTreeMapVsHashMap.java b/java-collections-maps/src/test/java/com/baeldung/collection/WhenComparingTreeMapVsHashMap.java similarity index 100% rename from core-java-collections/src/test/java/com/baeldung/collection/WhenComparingTreeMapVsHashMap.java rename to java-collections-maps/src/test/java/com/baeldung/collection/WhenComparingTreeMapVsHashMap.java diff --git a/core-java-collections/src/test/java/com/baeldung/java/map/KeyCheckUnitTest.java b/java-collections-maps/src/test/java/com/baeldung/java/map/KeyCheckUnitTest.java similarity index 100% rename from core-java-collections/src/test/java/com/baeldung/java/map/KeyCheckUnitTest.java rename to java-collections-maps/src/test/java/com/baeldung/java/map/KeyCheckUnitTest.java diff --git a/core-java-collections/src/test/java/com/baeldung/java/map/MapMultipleValuesUnitTest.java b/java-collections-maps/src/test/java/com/baeldung/java/map/MapMultipleValuesUnitTest.java similarity index 100% rename from core-java-collections/src/test/java/com/baeldung/java/map/MapMultipleValuesUnitTest.java rename to java-collections-maps/src/test/java/com/baeldung/java/map/MapMultipleValuesUnitTest.java diff --git a/core-java-collections/src/test/java/com/baeldung/java/map/MapUnitTest.java b/java-collections-maps/src/test/java/com/baeldung/java/map/MapUnitTest.java similarity index 100% rename from core-java-collections/src/test/java/com/baeldung/java/map/MapUnitTest.java rename to java-collections-maps/src/test/java/com/baeldung/java/map/MapUnitTest.java diff --git a/core-java-collections/src/test/java/com/baeldung/java/map/MapUtilUnitTest.java b/java-collections-maps/src/test/java/com/baeldung/java/map/MapUtilUnitTest.java similarity index 100% rename from core-java-collections/src/test/java/com/baeldung/java/map/MapUtilUnitTest.java rename to java-collections-maps/src/test/java/com/baeldung/java/map/MapUtilUnitTest.java diff --git a/core-java-collections/src/test/java/com/baeldung/java/map/initialize/MapInitializerUnitTest.java b/java-collections-maps/src/test/java/com/baeldung/java/map/initialize/MapInitializerUnitTest.java similarity index 100% rename from core-java-collections/src/test/java/com/baeldung/java/map/initialize/MapInitializerUnitTest.java rename to java-collections-maps/src/test/java/com/baeldung/java/map/initialize/MapInitializerUnitTest.java diff --git a/core-java-collections/src/test/java/com/baeldung/map/util/MapMaxUnitTest.java b/java-collections-maps/src/test/java/com/baeldung/map/util/MapMaxUnitTest.java similarity index 100% rename from core-java-collections/src/test/java/com/baeldung/map/util/MapMaxUnitTest.java rename to java-collections-maps/src/test/java/com/baeldung/map/util/MapMaxUnitTest.java diff --git a/core-java-collections/src/test/java/com/baeldung/weakhashmap/WeakHashMapUnitTest.java b/java-collections-maps/src/test/java/com/baeldung/weakhashmap/WeakHashMapUnitTest.java similarity index 100% rename from core-java-collections/src/test/java/com/baeldung/weakhashmap/WeakHashMapUnitTest.java rename to java-collections-maps/src/test/java/com/baeldung/weakhashmap/WeakHashMapUnitTest.java diff --git a/pom.xml b/pom.xml index a0c54f4b8a..03ee171ad5 100644 --- a/pom.xml +++ b/pom.xml @@ -354,6 +354,8 @@ core-java core-java-collections + java-collections-conversions + java-collections-maps core-java-io core-java-8 java-streams @@ -1270,6 +1272,8 @@ java-strings core-java-collections + java-collections-conversions + java-collections-maps core-java-io core-java-8 java-streams From 0b210ac086ca8d064f7a0a1f3c92c73ae5ad04a2 Mon Sep 17 00:00:00 2001 From: amit2103 Date: Sat, 20 Oct 2018 01:23:54 +0530 Subject: [PATCH 08/37] [BAEL-9515] - Added spring boot version property for artifact and plugin dependency --- parent-boot-1/pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parent-boot-1/pom.xml b/parent-boot-1/pom.xml index d220b4a6b7..0f1086fa31 100644 --- a/parent-boot-1/pom.xml +++ b/parent-boot-1/pom.xml @@ -17,7 +17,7 @@ org.springframework.boot spring-boot-dependencies - 1.5.16.RELEASE + ${spring-boot.version} pom import @@ -42,7 +42,7 @@ org.springframework.boot spring-boot-maven-plugin - 1.5.15.RELEASE + ${spring-boot.version} @@ -50,6 +50,7 @@ 3.1.0 + 1.5.16.RELEASE \ No newline at end of file From dc0cf74266999e940a08e3cfb70e2e034e04388c Mon Sep 17 00:00:00 2001 From: amit2103 Date: Mon, 15 Oct 2018 00:05:22 +0530 Subject: [PATCH 09/37] [BAEL-9516] - Added latest version of spring 2 --- parent-boot-2/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent-boot-2/pom.xml b/parent-boot-2/pom.xml index de6cb5d068..b014181d65 100644 --- a/parent-boot-2/pom.xml +++ b/parent-boot-2/pom.xml @@ -17,7 +17,7 @@ org.springframework.boot spring-boot-dependencies - 2.0.4.RELEASE + 2.0.5.RELEASE pom import From 296e9c03cc84c278f30381817695563a0a51c4e3 Mon Sep 17 00:00:00 2001 From: amit2103 Date: Sat, 20 Oct 2018 01:33:02 +0530 Subject: [PATCH 10/37] [BAEL-9516] - Added spring boot version property for artifact and plugin dependency --- parent-boot-2/pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parent-boot-2/pom.xml b/parent-boot-2/pom.xml index b014181d65..ba98898987 100644 --- a/parent-boot-2/pom.xml +++ b/parent-boot-2/pom.xml @@ -17,7 +17,7 @@ org.springframework.boot spring-boot-dependencies - 2.0.5.RELEASE + ${spring-boot.version} pom import @@ -41,7 +41,7 @@ org.springframework.boot spring-boot-maven-plugin - 2.0.4.RELEASE + ${spring-boot.version} @@ -73,6 +73,7 @@ 3.1.0 1.0.11.RELEASE + 2.0.5.RELEASE \ No newline at end of file From 2404312d20387c11599e7b23c428fb23947e24b9 Mon Sep 17 00:00:00 2001 From: Adam InTae Gerard Date: Fri, 19 Oct 2018 21:29:05 -0700 Subject: [PATCH 11/37] BAEL-1909 (#5366) --- spring-5-reactive/README.md | 1 + spring-5-reactive/pom.xml | 22 +++++++ .../com/baeldung/websession/Application.java | 15 +++++ .../websession/configuration/RedisConfig.java | 17 ++++++ .../configuration/SessionConfig.java | 20 +++++++ .../configuration/WebFluxConfig.java | 20 +++++++ .../configuration/WebFluxSecurityConfig.java | 58 +++++++++++++++++++ .../controller/SessionController.java | 42 ++++++++++++++ .../websession/transfer/CustomResponse.java | 31 ++++++++++ 9 files changed, 226 insertions(+) create mode 100644 spring-5-reactive/src/main/java/com/baeldung/websession/Application.java create mode 100644 spring-5-reactive/src/main/java/com/baeldung/websession/configuration/RedisConfig.java create mode 100644 spring-5-reactive/src/main/java/com/baeldung/websession/configuration/SessionConfig.java create mode 100644 spring-5-reactive/src/main/java/com/baeldung/websession/configuration/WebFluxConfig.java create mode 100644 spring-5-reactive/src/main/java/com/baeldung/websession/configuration/WebFluxSecurityConfig.java create mode 100644 spring-5-reactive/src/main/java/com/baeldung/websession/controller/SessionController.java create mode 100644 spring-5-reactive/src/main/java/com/baeldung/websession/transfer/CustomResponse.java diff --git a/spring-5-reactive/README.md b/spring-5-reactive/README.md index 7977fd820f..1431554882 100644 --- a/spring-5-reactive/README.md +++ b/spring-5-reactive/README.md @@ -14,3 +14,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Spring Webflux and CORS](http://www.baeldung.com/spring-webflux-cors) - [Handling Errors in Spring WebFlux](http://www.baeldung.com/spring-webflux-errors) - [Server-Sent Events in Spring](https://www.baeldung.com/spring-server-sent-events) +- [A Guide to Spring Session Reactive Support: WebSession](https://www.baeldung.com/a-guide-to-spring-session-reactive-support-websession/) \ No newline at end of file diff --git a/spring-5-reactive/pom.xml b/spring-5-reactive/pom.xml index 5f455c3906..e903b57c4e 100644 --- a/spring-5-reactive/pom.xml +++ b/spring-5-reactive/pom.xml @@ -76,6 +76,28 @@ test + + + org.springframework.boot + spring-boot-starter-webflux + + + org.springframework.boot + spring-boot-starter-data-redis + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.session + spring-session-core + + + org.springframework.session + spring-session-data-redis + + org.apache.commons commons-collections4 diff --git a/spring-5-reactive/src/main/java/com/baeldung/websession/Application.java b/spring-5-reactive/src/main/java/com/baeldung/websession/Application.java new file mode 100644 index 0000000000..667ef29658 --- /dev/null +++ b/spring-5-reactive/src/main/java/com/baeldung/websession/Application.java @@ -0,0 +1,15 @@ +package com.baeldung.websession; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; + +@SpringBootApplication +@ComponentScan(basePackages = {"com.baeldung"}) +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + +} \ No newline at end of file diff --git a/spring-5-reactive/src/main/java/com/baeldung/websession/configuration/RedisConfig.java b/spring-5-reactive/src/main/java/com/baeldung/websession/configuration/RedisConfig.java new file mode 100644 index 0000000000..aa85cf9fd9 --- /dev/null +++ b/spring-5-reactive/src/main/java/com/baeldung/websession/configuration/RedisConfig.java @@ -0,0 +1,17 @@ +package com.baeldung.websession.configuration; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; +import org.springframework.session.data.redis.config.annotation.web.server.EnableRedisWebSession; + +@Configuration +//@EnableRedisWebSession +public class RedisConfig { +/** + @Bean + public LettuceConnectionFactory redisConnectionFactory() { + return new LettuceConnectionFactory(); + } +*/ +} \ No newline at end of file diff --git a/spring-5-reactive/src/main/java/com/baeldung/websession/configuration/SessionConfig.java b/spring-5-reactive/src/main/java/com/baeldung/websession/configuration/SessionConfig.java new file mode 100644 index 0000000000..7cb2ff680e --- /dev/null +++ b/spring-5-reactive/src/main/java/com/baeldung/websession/configuration/SessionConfig.java @@ -0,0 +1,20 @@ +package com.baeldung.websession.configuration; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.session.ReactiveMapSessionRepository; +import org.springframework.session.ReactiveSessionRepository; +import org.springframework.session.config.annotation.web.server.EnableSpringWebSession; + +import java.util.concurrent.ConcurrentHashMap; + +@Configuration +@EnableSpringWebSession +public class SessionConfig { + + @Bean + public ReactiveSessionRepository reactiveSessionRepository() { + return new ReactiveMapSessionRepository(new ConcurrentHashMap<>()); + } + +} diff --git a/spring-5-reactive/src/main/java/com/baeldung/websession/configuration/WebFluxConfig.java b/spring-5-reactive/src/main/java/com/baeldung/websession/configuration/WebFluxConfig.java new file mode 100644 index 0000000000..964b544916 --- /dev/null +++ b/spring-5-reactive/src/main/java/com/baeldung/websession/configuration/WebFluxConfig.java @@ -0,0 +1,20 @@ +package com.baeldung.websession.configuration; + +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.reactive.config.EnableWebFlux; +import org.springframework.web.reactive.config.ResourceHandlerRegistry; +import org.springframework.web.reactive.config.WebFluxConfigurer; + +@Configuration +@EnableWebFlux +public class WebFluxConfig implements ApplicationContextAware, WebFluxConfigurer { + + private ApplicationContext context; + + @Override + public void setApplicationContext(ApplicationContext context) { + this.context = context; + } +} diff --git a/spring-5-reactive/src/main/java/com/baeldung/websession/configuration/WebFluxSecurityConfig.java b/spring-5-reactive/src/main/java/com/baeldung/websession/configuration/WebFluxSecurityConfig.java new file mode 100644 index 0000000000..452bcac8ab --- /dev/null +++ b/spring-5-reactive/src/main/java/com/baeldung/websession/configuration/WebFluxSecurityConfig.java @@ -0,0 +1,58 @@ +package com.baeldung.websession.configuration; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; +import org.springframework.security.config.web.server.ServerHttpSecurity; +import org.springframework.security.core.userdetails.MapReactiveUserDetailsService; +import org.springframework.security.core.userdetails.User; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.security.web.server.SecurityWebFilterChain; +import org.springframework.security.web.server.context.WebSessionServerSecurityContextRepository; + +@Configuration +@EnableWebFluxSecurity +public class WebFluxSecurityConfig { + + @Bean + public MapReactiveUserDetailsService userDetailsService() { + UserDetails admin = User + .withUsername("admin") + .password(encoder().encode("password")) + .roles("ADMIN") + .build(); + + UserDetails user = User + .withUsername("user") + .password(encoder().encode("password")) + .roles("USER") + .build(); + + return new MapReactiveUserDetailsService(admin, user); + } + + @Bean + public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { + http + .authorizeExchange() + .anyExchange().authenticated() + .and() + .httpBasic() + .securityContextRepository(new WebSessionServerSecurityContextRepository()) + .and() + .formLogin(); + + http + .csrf().disable(); + + return http.build(); + + } + + @Bean + public PasswordEncoder encoder() { + return new BCryptPasswordEncoder(); + } +} diff --git a/spring-5-reactive/src/main/java/com/baeldung/websession/controller/SessionController.java b/spring-5-reactive/src/main/java/com/baeldung/websession/controller/SessionController.java new file mode 100644 index 0000000000..b91a050322 --- /dev/null +++ b/spring-5-reactive/src/main/java/com/baeldung/websession/controller/SessionController.java @@ -0,0 +1,42 @@ +package com.baeldung.websession.controller; + +import com.baeldung.websession.transfer.CustomResponse; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.server.WebSession; +import reactor.core.publisher.Mono; + +@RestController +public class SessionController { + + @GetMapping("/websession/test") + public Mono testWebSessionByParam( + @RequestParam(value = "id") int id, + @RequestParam(value = "note") String note, + WebSession session) { + + session.getAttributes().put("id", id); + session.getAttributes().put("note", note); + + CustomResponse r = new CustomResponse(); + r.setId((int) session.getAttributes().get("id")); + r.setNote((String) session.getAttributes().get("note")); + + return Mono.just(r); + } + + @GetMapping("/websession") + public Mono getSession(WebSession session) { + + session.getAttributes().putIfAbsent("id", 0); + session.getAttributes().putIfAbsent("note", "Howdy Cosmic Spheroid!"); + + CustomResponse r = new CustomResponse(); + r.setId((int) session.getAttributes().get("id")); + r.setNote((String) session.getAttributes().get("note")); + + return Mono.just(r); + } + +} \ No newline at end of file diff --git a/spring-5-reactive/src/main/java/com/baeldung/websession/transfer/CustomResponse.java b/spring-5-reactive/src/main/java/com/baeldung/websession/transfer/CustomResponse.java new file mode 100644 index 0000000000..2d562de157 --- /dev/null +++ b/spring-5-reactive/src/main/java/com/baeldung/websession/transfer/CustomResponse.java @@ -0,0 +1,31 @@ +package com.baeldung.websession.transfer; + +public class CustomResponse { + + private int id; + private String note; + + public CustomResponse() {} + + public CustomResponse(int id, String note) { + this.id = id; + this.note = note; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getNote() { + return note; + } + + public void setNote(String note) { + this.note = note; + } + +} From 21a3a43788075ec30d1868cdabc65b8ef0ceb2df Mon Sep 17 00:00:00 2001 From: amit2103 Date: Sat, 20 Oct 2018 11:27:08 +0530 Subject: [PATCH 12/37] [BAEL-9538] - Move persistence-related modules into the persistence folder --- .../core-java-persistence}/README.md | 0 .../core-java-persistence}/pom.xml | 140 ++++----- .../connectionpool/BasicConnectionPool.java | 0 .../connectionpool/C3poDataSource.java | 0 .../connectionpool/ConnectionPool.java | 0 .../connectionpool/DBCPDataSource.java | 0 .../connectionpool/HikariCPDataSource.java | 0 .../com/baeldung/jdbc/BatchProcessing.java | 0 .../main/java/com/baeldung/jdbc/Employee.java | 0 .../jdbcrowset/DatabaseConfiguration.java | 0 .../baeldung/jdbcrowset/ExampleListener.java | 0 .../baeldung/jdbcrowset/FilterExample.java | 0 .../jdbcrowset/JdbcRowsetApplication.java | 0 .../src/main/resources/logback.xml | 0 .../BasicConnectionPoolUnitTest.java | 134 ++++---- .../C3poDataSourceUnitTest.java | 24 +- .../DBCPDataSourceUnitTest.java | 24 +- .../HikariCPDataSourceUnitTest.java | 24 +- .../jdbc/BatchProcessingLiveTest.java | 0 .../java/com/baeldung/jdbc/JdbcLiveTest.java | 0 .../jdbcrowset/JdbcRowSetLiveTest.java | 0 .../deltaspike}/.gitignore | 0 .../deltaspike}/README.md | 0 .../deltaspike}/pom.xml | 1 + .../baeldung/controller/MemberController.java | 0 .../baeldung/data/EntityManagerProducer.java | 0 .../baeldung/data/MemberListProducer.java | 0 .../java/baeldung/data/MemberRepository.java | 0 .../data/QueryDslRepositoryExtension.java | 0 .../java/baeldung/data/QueryDslSupport.java | 0 .../data/SecondaryEntityManagerProducer.java | 0 .../data/SecondaryEntityManagerResolver.java | 0 .../data/SecondaryPersistenceUnit.java | 0 .../baeldung/data/SimpleUserRepository.java | 0 .../java/baeldung/data/UserRepository.java | 0 .../src/main/java/baeldung/model/Address.java | 0 .../src/main/java/baeldung/model/Member.java | 0 .../src/main/java/baeldung/model/User.java | 0 .../java/baeldung/rest/JaxRsActivator.java | 0 .../rest/MemberResourceRESTService.java | 0 .../baeldung/service/MemberRegistration.java | 0 .../main/java/baeldung/util/Resources.java | 0 .../META-INF/apache-deltaspike.properties | 0 .../src/main/resources/META-INF/beans.xml | 0 .../main/resources/META-INF/persistence.xml | 0 .../deltaspike}/src/main/resources/import.sql | 0 .../src/main/resources/logback.xml | 0 .../webapp/WEB-INF/baeldung-jee7-seed-ds.xml | 0 .../baeldung-jee7-seed-secondary-ds.xml | 0 .../src/main/webapp/WEB-INF/beans.xml | 0 .../src/main/webapp/WEB-INF/faces-config.xml | 0 .../webapp/WEB-INF/templates/default.xhtml | 0 .../deltaspike}/src/main/webapp/index.html | 0 .../deltaspike}/src/main/webapp/index.xhtml | 0 .../src/main/webapp/resources/css/screen.css | 0 .../main/webapp/resources/gfx/asidebkg.png | Bin .../webapp/resources/gfx/bkg-blkheader.png | Bin .../webapp/resources/gfx/dualbrand_logo.png | Bin .../main/webapp/resources/gfx/headerbkg.png | Bin .../webapp/resources/gfx/wildfly_400x130.jpg | Bin .../test/java/baeldung/ValidatorProducer.java | 0 .../data/TestEntityManagerProducer.java | 0 .../test/MemberRegistrationLiveTest.java | 0 .../test/SimpleUserRepositoryUnitTest.java | 0 .../baeldung/test/UserRepositoryUnitTest.java | 0 .../META-INF/apache-deltaspike.properties | 0 .../src/test/resources/META-INF/beans.xml | 0 .../test/resources/META-INF/persistence.xml | 0 .../src/test/resources/arquillian.xml | 0 .../deltaspike}/src/test/resources/import.sql | 0 .../src/test/resources/test-ds.xml | 0 .../src/test/resources/test-secondary-ds.xml | 0 .../influxdb}/README.md | 0 .../influxdb}/pom.xml | 1 + .../com/baeldung/influxdb/MemoryPoint.java | 0 .../influxdb}/src/main/resources/logback.xml | 0 .../influxdb/InfluxDBConnectionLiveTest.java | 0 .../influxdb}/src/test/resources/logback.xml | 0 .../orientdb}/.gitignore | 0 .../orientdb}/.mvn/wrapper/maven-wrapper.jar | Bin .../.mvn/wrapper/maven-wrapper.properties | 0 .../orientdb}/README.md | 0 .../orientdb}/mvnw | 0 .../orientdb}/mvnw.cmd | 0 .../orientdb}/pom.xml | 1 + .../java/com/baeldung/orientdb/Author.java | 0 .../orientdb}/src/main/resources/logback.xml | 0 .../orientdb/OrientDBDocumentAPILiveTest.java | 0 .../orientdb/OrientDBGraphAPILiveTest.java | 0 .../orientdb/OrientDBObjectAPILiveTest.java | 0 .../spring-boot-persistence}/.gitignore | 10 +- .../.mvn/wrapper/maven-wrapper.properties | 0 .../spring-boot-persistence}/README.MD | 0 .../spring-boot-persistence}/mvnw | 0 .../spring-boot-persistence}/mvnw.cmd | 290 +++++++++--------- .../spring-boot-persistence}/pom.xml | 150 ++++----- .../main/java/com/baeldung/Application.java | 0 .../com/baeldung/boot/config/H2JpaConfig.java | 0 .../java/com/baeldung/domain/Country.java | 0 .../main/java/com/baeldung/domain/User.java | 0 .../baeldung/repository/UserRepository.java | 0 .../SpringBootConsoleApplication.java | 44 +-- .../application/entities/Customer.java | 106 +++---- .../repositories/CustomerRepository.java | 24 +- .../runners/CommandLineCrudRunner.java | 74 ++--- .../baeldung/boot/domain/GenericEntity.java | 0 .../repository/GenericEntityRepository.java | 0 .../src/main/resources/application.properties | 0 .../src/main/resources/data.sql | 0 .../src/main/resources/logback.xml | 0 .../persistence-generic-entity.properties | 0 .../src/main/resources/schema.sql | 0 .../baeldung/SpringBootH2IntegrationTest.java | 0 .../SpringBootJPAIntegrationTest.java | 0 .../SpringBootProfileIntegrationTest.java | 0 .../UserRepositoryIntegrationTest.java | 0 ...otTomcatConnectionPoolIntegrationTest.java | 44 +-- .../config/H2TestProfileJPAConfig.java | 0 .../src/test/resources/application.properties | 0 .../test/resources/import_active_users.sql | 0 .../test/resources/import_inactive_users.sql | 0 .../src/test/resources/migrated_users.sql | 0 .../spring-data-elasticsearch}/README.md | 0 .../spring-data-elasticsearch}/pom.xml | 2 +- .../com/baeldung/elasticsearch/Person.java | 0 .../spring/data/es/config/Config.java | 0 .../spring/data/es/model/Article.java | 0 .../baeldung/spring/data/es/model/Author.java | 0 .../data/es/repository/ArticleRepository.java | 0 .../data/es/service/ArticleService.java | 0 .../data/es/service/ArticleServiceImpl.java | 0 .../src/main/resources/log4j2.properties | 0 .../ElasticSearchManualTest.java | 0 .../GeoQueriesIntegrationTest.java | 0 .../data/es/ElasticSearchIntegrationTest.java | 0 .../es/ElasticSearchQueryIntegrationTest.java | 0 .../SpringContextIntegrationTest.java | 0 .../spring-data-jpa}/README.md | 0 .../spring-data-jpa}/pom.xml | 9 +- .../main/java/com/baeldung/Application.java | 0 .../config/PersistenceConfiguration.java | 0 .../PersistenceProductConfiguration.java | 0 .../config/PersistenceUserConfiguration.java | 0 .../main/java/com/baeldung/dao/IFooDao.java | 0 .../dao/repositories/ArticleRepository.java | 0 .../repositories/CustomItemRepository.java | 0 .../CustomItemTypeRepository.java | 0 .../dao/repositories/ExtendedRepository.java | 0 .../ExtendedStudentRepository.java | 0 .../dao/repositories/IBarCrudRepository.java | 0 .../dao/repositories/InventoryRepository.java | 0 .../dao/repositories/ItemTypeRepository.java | 0 .../dao/repositories/LocationRepository.java | 0 .../ReadOnlyLocationRepository.java | 0 .../dao/repositories/StoreRepository.java | 0 .../impl/CustomItemRepositoryImpl.java | 0 .../impl/CustomItemTypeRepositoryImpl.java | 0 .../impl/ExtendedRepositoryImpl.java | 0 .../product/ProductRepository.java | 0 .../user/PossessionRepository.java | 0 .../dao/repositories/user/UserRepository.java | 0 .../com/baeldung/ddd/event/Aggregate.java | 0 .../com/baeldung/ddd/event/Aggregate2.java | 0 .../ddd/event/Aggregate2Repository.java | 0 .../com/baeldung/ddd/event/Aggregate3.java | 0 .../ddd/event/Aggregate3Repository.java | 0 .../ddd/event/AggregateRepository.java | 0 .../com/baeldung/ddd/event/DddConfig.java | 0 .../com/baeldung/ddd/event/DomainEvent.java | 0 .../com/baeldung/ddd/event/DomainService.java | 0 .../java/com/baeldung/domain/Article.java | 0 .../main/java/com/baeldung/domain/Bar.java | 0 .../main/java/com/baeldung/domain/Foo.java | 0 .../main/java/com/baeldung/domain/Item.java | 162 +++++----- .../java/com/baeldung/domain/ItemType.java | 92 +++--- .../main/java/com/baeldung/domain/KVTag.java | 0 .../java/com/baeldung/domain/Location.java | 110 +++---- .../baeldung/domain/MerchandiseEntity.java | 0 .../java/com/baeldung/domain/SkillTag.java | 0 .../main/java/com/baeldung/domain/Store.java | 152 ++++----- .../java/com/baeldung/domain/Student.java | 0 .../com/baeldung/domain/product/Product.java | 0 .../com/baeldung/domain/user/Possession.java | 0 .../java/com/baeldung/domain/user/User.java | 0 .../com/baeldung/services/IBarService.java | 0 .../com/baeldung/services/IFooService.java | 0 .../com/baeldung/services/IOperations.java | 0 .../services/impl/AbstractService.java | 0 .../impl/AbstractSpringDataJpaService.java | 0 .../impl/BarSpringDataJpaService.java | 0 .../baeldung/services/impl/FooService.java | 0 .../src/main/resources/application.properties | 0 .../src/main/resources/ddd.properties | 0 .../src/main/resources/logback.xml | 0 .../persistence-multiple-db.properties | 0 .../src/main/resources/persistence.properties | 0 .../ArticleRepositoryIntegrationTest.java | 0 ...endedStudentRepositoryIntegrationTest.java | 0 .../InventoryRepositoryIntegrationTest.java | 0 .../JpaRepositoriesIntegrationTest.java | 0 .../UserRepositoryIntegrationTest.java | 0 .../Aggregate2EventsIntegrationTest.java | 0 .../Aggregate3EventsIntegrationTest.java | 0 .../event/AggregateEventsIntegrationTest.java | 0 .../baeldung/ddd/event/TestEventHandler.java | 0 ...ractServicePersistenceIntegrationTest.java | 0 .../FooServicePersistenceIntegrationTest.java | 0 .../JpaMultipleDBIntegrationTest.java | 0 .../SpringDataJPABarAuditIntegrationTest.java | 0 .../test/java/com/baeldung/util/IDUtil.java | 0 .../SpringContextIntegrationTest.java | 0 .../src/test/resources/import_entities.sql | 0 .../spring-data-keyvalue}/README.md | 0 .../spring-data-keyvalue}/pom.xml | 2 +- .../spring/data/keyvalue/Configurations.java | 0 .../SpringDataKeyValueApplication.java | 0 .../repositories/EmployeeRepository.java | 0 .../keyvalue/services/EmployeeService.java | 0 .../EmployeeServicesWithKeyValueTemplate.java | 0 .../impl/EmployeeServicesWithRepository.java | 0 .../spring/data/keyvalue/vo/Employee.java | 0 .../src/main/resources/logback.xml | 0 ...WithKeyValueRepositoryIntegrationTest.java | 0 ...ServicesWithRepositoryIntegrationTest.java | 0 .../SpringContextIntegrationTest.java | 0 .../spring-data-mongodb}/README.md | 0 .../spring-data-mongodb}/pom.xml | 2 +- .../com/baeldung/annotation/CascadeSave.java | 0 .../java/com/baeldung/config/MongoConfig.java | 0 .../baeldung/config/MongoReactiveConfig.java | 0 .../baeldung/config/SimpleMongoConfig.java | 0 .../converter/UserWriterConverter.java | 0 .../com/baeldung/event/CascadeCallback.java | 0 .../event/CascadeSaveMongoEventListener.java | 0 .../com/baeldung/event/FieldCallback.java | 0 .../UserCascadeSaveMongoEventListener.java | 0 .../java/com/baeldung/model/EmailAddress.java | 0 .../main/java/com/baeldung/model/User.java | 0 .../reactive/repository/UserRepository.java | 0 .../baeldung/repository/UserRepository.java | 0 .../src/main/resources/logback.xml | 0 .../src/main/resources/mongoConfig.xml | 0 .../src/main/resources/test.png | Bin .../aggregation/ZipsAggregationLiveTest.java | 0 .../aggregation/model/StatePopulation.java | 0 .../com/baeldung/gridfs/GridFSLiveTest.java | 0 .../mongotemplate/DocumentQueryLiveTest.java | 0 .../MongoTemplateProjectionLiveTest.java | 0 .../MongoTemplateQueryLiveTest.java | 0 .../repository/BaseQueryLiveTest.java | 0 .../baeldung/repository/DSLQueryLiveTest.java | 0 .../repository/JSONQueryLiveTest.java | 0 .../repository/QueryMethodsLiveTest.java | 0 .../repository/UserRepositoryLiveTest.java | 0 .../UserRepositoryProjectionLiveTest.java | 0 ...ngoTransactionReactiveIntegrationTest.java | 0 ...ngoTransactionTemplateIntegrationTest.java | 0 .../MongoTransactionalIntegrationTest.java | 0 .../SpringContextIntegrationTest.java | 0 .../src/test/resources/zips.json | 0 .../spring-hibernate3}/README.md | 0 .../spring/PersistenceConfigHibernate3.java | 162 +++++----- .../src/main/resources/logback.xml | 0 ...nateExceptionScen1MainIntegrationTest.java | 86 +++--- ...nateExceptionScen2MainIntegrationTest.java | 90 +++--- .../spring-hibernate4}/.gitignore | 0 .../spring-hibernate4}/README.md | 0 .../spring-hibernate4}/pom.xml | 1 + .../hibernate/criteria/model/Item.java | 0 .../hibernate/fetching/model/OrderDetail.java | 0 .../hibernate/fetching/model/UserEager.java | 0 .../hibernate/fetching/model/UserLazy.java | 0 .../fetching/util/HibernateUtil.java | 0 .../fetching/view/FetchingAppView.java | 0 .../config/HibernateAnnotationUtil.java | 0 .../HibernateOneToManyAnnotationMain.java | 0 .../hibernate/oneToMany/model/Cart.java | 0 .../hibernate/oneToMany/model/Items.java | 0 .../persistence/dao/IBarAuditableDao.java | 0 .../persistence/dao/IBarCrudRepository.java | 0 .../com/baeldung/persistence/dao/IBarDao.java | 0 .../baeldung/persistence/dao/IChildDao.java | 0 .../persistence/dao/IFooAuditableDao.java | 0 .../com/baeldung/persistence/dao/IFooDao.java | 0 .../baeldung/persistence/dao/IParentDao.java | 0 .../persistence/dao/common/AbstractDao.java | 0 .../common/AbstractHibernateAuditableDao.java | 0 .../dao/common/AbstractHibernateDao.java | 0 .../dao/common/AbstractJpaDao.java | 0 .../dao/common/GenericHibernateDao.java | 0 .../dao/common/IAuditOperations.java | 0 .../persistence/dao/common/IGenericDao.java | 0 .../persistence/dao/common/IOperations.java | 0 .../persistence/dao/impl/BarAuditableDao.java | 0 .../baeldung/persistence/dao/impl/BarDao.java | 0 .../persistence/dao/impl/BarJpaDao.java | 0 .../persistence/dao/impl/ChildDao.java | 0 .../persistence/dao/impl/FooAuditableDao.java | 0 .../baeldung/persistence/dao/impl/FooDao.java | 0 .../persistence/dao/impl/ParentDao.java | 0 .../com/baeldung/persistence/model/Bar.java | 0 .../com/baeldung/persistence/model/Child.java | 0 .../com/baeldung/persistence/model/Foo.java | 0 .../baeldung/persistence/model/Parent.java | 0 .../baeldung/persistence/model/Person.java | 0 .../service/IBarAuditableService.java | 0 .../persistence/service/IBarService.java | 0 .../persistence/service/IChildService.java | 0 .../service/IFooAuditableService.java | 0 .../persistence/service/IFooService.java | 0 .../persistence/service/IParentService.java | 0 .../AbstractHibernateAuditableService.java | 0 .../common/AbstractHibernateService.java | 0 .../service/common/AbstractJpaService.java | 0 .../service/common/AbstractService.java | 0 .../common/AbstractSpringDataJpaService.java | 0 .../service/impl/BarAuditableService.java | 0 .../service/impl/BarJpaService.java | 0 .../persistence/service/impl/BarService.java | 0 .../service/impl/BarSpringDataJpaService.java | 0 .../service/impl/ChildService.java | 0 .../service/impl/FooAuditableService.java | 0 .../persistence/service/impl/FooService.java | 0 .../service/impl/ParentService.java | 0 .../baeldung/spring/PersistenceConfig.java | 0 .../baeldung/spring/PersistenceXmlConfig.java | 0 .../src/main/resources/fetching.cfg.xml | 0 .../src/main/resources/fetchingLazy.cfg.xml | 0 .../resources/fetching_create_queries.sql | 0 .../resources/hibernate-annotation.cfg.xml | 0 .../src/main/resources/hibernate4Config.xml | 0 .../src/main/resources/immutable.cfg.xml | 0 .../src/main/resources/insert_statements.sql | 0 .../src/main/resources/logback.xml | 0 .../src/main/resources/one_to_many.sql | 0 .../resources/persistence-mysql.properties | 0 .../src/main/resources/stored_procedure.sql | 38 +-- .../src/main/resources/webSecurityConfig.xml | 0 .../HibernateFetchingIntegrationTest.java | 0 ...neToManyAnnotationMainIntegrationTest.java | 0 .../persistence/IntegrationTestSuite.java | 0 .../persistence/audit/AuditTestSuite.java | 0 .../EnversFooBarAuditIntegrationTest.java | 0 .../audit/JPABarAuditIntegrationTest.java | 0 .../SpringDataJPABarAuditIntegrationTest.java | 0 .../persistence/hibernate/FooFixtures.java | 0 ...oPaginationPersistenceIntegrationTest.java | 0 .../FooSortingPersistenceIntegrationTest.java | 0 .../save/SaveMethodsIntegrationTest.java | 0 ...erviceBasicPersistenceIntegrationTest.java | 0 .../FooServicePersistenceIntegrationTest.java | 0 .../service/FooStoredProceduresLiveTest.java | 242 +++++++-------- ...rentServicePersistenceIntegrationTest.java | 0 .../spring/config/PersistenceTestConfig.java | 0 .../SpringContextIntegrationTest.java | 0 .../src/test/resources/.gitignore | 0 .../src/test/resources/fetching.cfg.xml | 0 .../src/test/resources/fetchingLazy.cfg.xml | 0 .../test/resources/persistence-h2.properties | 0 pom.xml | 60 ++-- 360 files changed, 1153 insertions(+), 1148 deletions(-) rename {core-java-persistence => persistence-modules/core-java-persistence}/README.md (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/pom.xml (95%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/main/java/com/baeldung/connectionpool/BasicConnectionPool.java (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/main/java/com/baeldung/connectionpool/C3poDataSource.java (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/main/java/com/baeldung/connectionpool/ConnectionPool.java (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/main/java/com/baeldung/connectionpool/DBCPDataSource.java (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/main/java/com/baeldung/connectionpool/HikariCPDataSource.java (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/main/java/com/baeldung/jdbc/BatchProcessing.java (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/main/java/com/baeldung/jdbc/Employee.java (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/main/java/com/baeldung/jdbcrowset/DatabaseConfiguration.java (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/main/java/com/baeldung/jdbcrowset/ExampleListener.java (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/main/java/com/baeldung/jdbcrowset/FilterExample.java (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/main/java/com/baeldung/jdbcrowset/JdbcRowsetApplication.java (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/main/resources/logback.xml (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/test/java/com/baeldung/connectionpool/BasicConnectionPoolUnitTest.java (97%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/test/java/com/baeldung/connectionpool/C3poDataSourceUnitTest.java (96%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/test/java/com/baeldung/connectionpool/DBCPDataSourceUnitTest.java (96%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/test/java/com/baeldung/connectionpool/HikariCPDataSourceUnitTest.java (96%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/test/java/com/baeldung/jdbc/BatchProcessingLiveTest.java (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/test/java/com/baeldung/jdbc/JdbcLiveTest.java (100%) rename {core-java-persistence => persistence-modules/core-java-persistence}/src/test/java/com/baeldung/jdbcrowset/JdbcRowSetLiveTest.java (100%) rename {deltaspike => persistence-modules/deltaspike}/.gitignore (100%) rename {deltaspike => persistence-modules/deltaspike}/README.md (100%) rename {deltaspike => persistence-modules/deltaspike}/pom.xml (99%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/controller/MemberController.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/data/EntityManagerProducer.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/data/MemberListProducer.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/data/MemberRepository.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/data/QueryDslRepositoryExtension.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/data/QueryDslSupport.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/data/SecondaryEntityManagerProducer.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/data/SecondaryEntityManagerResolver.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/data/SecondaryPersistenceUnit.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/data/SimpleUserRepository.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/data/UserRepository.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/model/Address.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/model/Member.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/model/User.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/rest/JaxRsActivator.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/rest/MemberResourceRESTService.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/service/MemberRegistration.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/java/baeldung/util/Resources.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/resources/META-INF/apache-deltaspike.properties (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/resources/META-INF/beans.xml (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/resources/META-INF/persistence.xml (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/resources/import.sql (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/resources/logback.xml (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/webapp/WEB-INF/baeldung-jee7-seed-ds.xml (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/webapp/WEB-INF/baeldung-jee7-seed-secondary-ds.xml (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/webapp/WEB-INF/beans.xml (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/webapp/WEB-INF/faces-config.xml (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/webapp/WEB-INF/templates/default.xhtml (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/webapp/index.html (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/webapp/index.xhtml (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/webapp/resources/css/screen.css (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/webapp/resources/gfx/asidebkg.png (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/webapp/resources/gfx/bkg-blkheader.png (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/webapp/resources/gfx/dualbrand_logo.png (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/webapp/resources/gfx/headerbkg.png (100%) rename {deltaspike => persistence-modules/deltaspike}/src/main/webapp/resources/gfx/wildfly_400x130.jpg (100%) rename {deltaspike => persistence-modules/deltaspike}/src/test/java/baeldung/ValidatorProducer.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/test/java/baeldung/data/TestEntityManagerProducer.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/test/java/baeldung/test/MemberRegistrationLiveTest.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/test/java/baeldung/test/SimpleUserRepositoryUnitTest.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/test/java/baeldung/test/UserRepositoryUnitTest.java (100%) rename {deltaspike => persistence-modules/deltaspike}/src/test/resources/META-INF/apache-deltaspike.properties (100%) rename {deltaspike => persistence-modules/deltaspike}/src/test/resources/META-INF/beans.xml (100%) rename {deltaspike => persistence-modules/deltaspike}/src/test/resources/META-INF/persistence.xml (100%) rename {deltaspike => persistence-modules/deltaspike}/src/test/resources/arquillian.xml (100%) rename {deltaspike => persistence-modules/deltaspike}/src/test/resources/import.sql (100%) rename {deltaspike => persistence-modules/deltaspike}/src/test/resources/test-ds.xml (100%) rename {deltaspike => persistence-modules/deltaspike}/src/test/resources/test-secondary-ds.xml (100%) rename {influxdb => persistence-modules/influxdb}/README.md (100%) rename {influxdb => persistence-modules/influxdb}/pom.xml (96%) rename {influxdb => persistence-modules/influxdb}/src/main/java/com/baeldung/influxdb/MemoryPoint.java (100%) rename {influxdb => persistence-modules/influxdb}/src/main/resources/logback.xml (100%) rename {influxdb => persistence-modules/influxdb}/src/test/java/com/baeldung/influxdb/InfluxDBConnectionLiveTest.java (100%) rename {influxdb => persistence-modules/influxdb}/src/test/resources/logback.xml (100%) rename {orientdb => persistence-modules/orientdb}/.gitignore (100%) rename {orientdb => persistence-modules/orientdb}/.mvn/wrapper/maven-wrapper.jar (100%) rename {orientdb => persistence-modules/orientdb}/.mvn/wrapper/maven-wrapper.properties (100%) rename {orientdb => persistence-modules/orientdb}/README.md (100%) rename {orientdb => persistence-modules/orientdb}/mvnw (100%) mode change 100755 => 100644 rename {orientdb => persistence-modules/orientdb}/mvnw.cmd (100%) rename {orientdb => persistence-modules/orientdb}/pom.xml (97%) rename {orientdb => persistence-modules/orientdb}/src/main/java/com/baeldung/orientdb/Author.java (100%) rename {orientdb => persistence-modules/orientdb}/src/main/resources/logback.xml (100%) rename {orientdb => persistence-modules/orientdb}/src/test/java/com/baeldung/orientdb/OrientDBDocumentAPILiveTest.java (100%) rename {orientdb => persistence-modules/orientdb}/src/test/java/com/baeldung/orientdb/OrientDBGraphAPILiveTest.java (100%) rename {orientdb => persistence-modules/orientdb}/src/test/java/com/baeldung/orientdb/OrientDBObjectAPILiveTest.java (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/.gitignore (89%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/.mvn/wrapper/maven-wrapper.properties (100%) mode change 100755 => 100644 rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/README.MD (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/mvnw (100%) mode change 100755 => 100644 rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/mvnw.cmd (97%) mode change 100755 => 100644 rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/pom.xml (93%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/java/com/baeldung/Application.java (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/java/com/baeldung/boot/config/H2JpaConfig.java (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/java/com/baeldung/domain/Country.java (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/java/com/baeldung/domain/User.java (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/java/com/baeldung/repository/UserRepository.java (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/java/com/baeldung/tomcatconnectionpool/application/SpringBootConsoleApplication.java (97%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/java/com/baeldung/tomcatconnectionpool/application/entities/Customer.java (95%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/java/com/baeldung/tomcatconnectionpool/application/repositories/CustomerRepository.java (97%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/java/com/baeldung/tomcatconnectionpool/application/runners/CommandLineCrudRunner.java (97%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/java/org/baeldung/boot/domain/GenericEntity.java (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/java/org/baeldung/boot/repository/GenericEntityRepository.java (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/resources/application.properties (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/resources/data.sql (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/resources/logback.xml (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/resources/persistence-generic-entity.properties (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/main/resources/schema.sql (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/test/java/com/baeldung/SpringBootH2IntegrationTest.java (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/test/java/com/baeldung/SpringBootJPAIntegrationTest.java (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/test/java/com/baeldung/SpringBootProfileIntegrationTest.java (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/test/java/com/baeldung/repository/UserRepositoryIntegrationTest.java (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/test/java/com/baeldung/tomcatconnectionpool/test/application/SpringBootTomcatConnectionPoolIntegrationTest.java (97%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/test/java/org/baeldung/config/H2TestProfileJPAConfig.java (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/test/resources/application.properties (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/test/resources/import_active_users.sql (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/test/resources/import_inactive_users.sql (100%) rename {spring-boot-persistence => persistence-modules/spring-boot-persistence}/src/test/resources/migrated_users.sql (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/README.md (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/pom.xml (98%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/src/main/java/com/baeldung/elasticsearch/Person.java (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/src/main/java/com/baeldung/spring/data/es/config/Config.java (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/src/main/java/com/baeldung/spring/data/es/model/Article.java (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/src/main/java/com/baeldung/spring/data/es/model/Author.java (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/src/main/java/com/baeldung/spring/data/es/repository/ArticleRepository.java (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/src/main/java/com/baeldung/spring/data/es/service/ArticleService.java (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/src/main/java/com/baeldung/spring/data/es/service/ArticleServiceImpl.java (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/src/main/resources/log4j2.properties (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/src/test/java/com/baeldung/elasticsearch/ElasticSearchManualTest.java (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/src/test/java/com/baeldung/elasticsearch/GeoQueriesIntegrationTest.java (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/src/test/java/com/baeldung/spring/data/es/ElasticSearchIntegrationTest.java (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/src/test/java/com/baeldung/spring/data/es/ElasticSearchQueryIntegrationTest.java (100%) rename {spring-data-elasticsearch => persistence-modules/spring-data-elasticsearch}/src/test/java/org/baeldung/SpringContextIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/README.md (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/pom.xml (96%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/Application.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/config/PersistenceConfiguration.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/config/PersistenceProductConfiguration.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/config/PersistenceUserConfiguration.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/IFooDao.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/ArticleRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/CustomItemRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/CustomItemTypeRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/ExtendedRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/ExtendedStudentRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/IBarCrudRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/InventoryRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/ItemTypeRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/LocationRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/ReadOnlyLocationRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/StoreRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/impl/CustomItemRepositoryImpl.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/impl/CustomItemTypeRepositoryImpl.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/impl/ExtendedRepositoryImpl.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/product/ProductRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/user/PossessionRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/dao/repositories/user/UserRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/ddd/event/Aggregate.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/ddd/event/Aggregate2.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/ddd/event/Aggregate2Repository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/ddd/event/Aggregate3.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/ddd/event/Aggregate3Repository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/ddd/event/AggregateRepository.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/ddd/event/DddConfig.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/ddd/event/DomainEvent.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/ddd/event/DomainService.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/Article.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/Bar.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/Foo.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/Item.java (94%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/ItemType.java (94%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/KVTag.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/Location.java (95%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/MerchandiseEntity.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/SkillTag.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/Store.java (95%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/Student.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/product/Product.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/user/Possession.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/domain/user/User.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/services/IBarService.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/services/IFooService.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/services/IOperations.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/services/impl/AbstractService.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/services/impl/AbstractSpringDataJpaService.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/services/impl/BarSpringDataJpaService.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/java/com/baeldung/services/impl/FooService.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/resources/application.properties (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/resources/ddd.properties (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/resources/logback.xml (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/resources/persistence-multiple-db.properties (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/main/resources/persistence.properties (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/dao/repositories/ArticleRepositoryIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/dao/repositories/ExtendedStudentRepositoryIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/dao/repositories/InventoryRepositoryIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/dao/repositories/JpaRepositoriesIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/dao/repositories/UserRepositoryIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/ddd/event/Aggregate2EventsIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/ddd/event/Aggregate3EventsIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/ddd/event/AggregateEventsIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/ddd/event/TestEventHandler.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/services/AbstractServicePersistenceIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/services/FooServicePersistenceIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/services/JpaMultipleDBIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/services/SpringDataJPABarAuditIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/com/baeldung/util/IDUtil.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/java/org/baeldung/SpringContextIntegrationTest.java (100%) rename {spring-data-jpa => persistence-modules/spring-data-jpa}/src/test/resources/import_entities.sql (100%) rename {spring-data-keyvalue => persistence-modules/spring-data-keyvalue}/README.md (100%) rename {spring-data-keyvalue => persistence-modules/spring-data-keyvalue}/pom.xml (94%) rename {spring-data-keyvalue => persistence-modules/spring-data-keyvalue}/src/main/java/com/baeldung/spring/data/keyvalue/Configurations.java (100%) rename {spring-data-keyvalue => persistence-modules/spring-data-keyvalue}/src/main/java/com/baeldung/spring/data/keyvalue/SpringDataKeyValueApplication.java (100%) rename {spring-data-keyvalue => persistence-modules/spring-data-keyvalue}/src/main/java/com/baeldung/spring/data/keyvalue/repositories/EmployeeRepository.java (100%) rename {spring-data-keyvalue => persistence-modules/spring-data-keyvalue}/src/main/java/com/baeldung/spring/data/keyvalue/services/EmployeeService.java (100%) rename {spring-data-keyvalue => persistence-modules/spring-data-keyvalue}/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java (100%) rename {spring-data-keyvalue => persistence-modules/spring-data-keyvalue}/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithRepository.java (100%) rename {spring-data-keyvalue => persistence-modules/spring-data-keyvalue}/src/main/java/com/baeldung/spring/data/keyvalue/vo/Employee.java (100%) rename {spring-data-keyvalue => persistence-modules/spring-data-keyvalue}/src/main/resources/logback.xml (100%) rename {spring-data-keyvalue => persistence-modules/spring-data-keyvalue}/src/test/java/com/baeldung/spring/data/keyvalue/services/test/EmployeeServicesWithKeyValueRepositoryIntegrationTest.java (100%) rename {spring-data-keyvalue => persistence-modules/spring-data-keyvalue}/src/test/java/com/baeldung/spring/data/keyvalue/services/test/EmployeeServicesWithRepositoryIntegrationTest.java (100%) rename {spring-data-keyvalue => persistence-modules/spring-data-keyvalue}/src/test/java/org/baeldung/SpringContextIntegrationTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/README.md (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/pom.xml (98%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/java/com/baeldung/annotation/CascadeSave.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/java/com/baeldung/config/MongoConfig.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/java/com/baeldung/config/MongoReactiveConfig.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/java/com/baeldung/config/SimpleMongoConfig.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/java/com/baeldung/converter/UserWriterConverter.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/java/com/baeldung/event/CascadeCallback.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/java/com/baeldung/event/CascadeSaveMongoEventListener.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/java/com/baeldung/event/FieldCallback.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/java/com/baeldung/event/UserCascadeSaveMongoEventListener.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/java/com/baeldung/model/EmailAddress.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/java/com/baeldung/model/User.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/java/com/baeldung/reactive/repository/UserRepository.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/java/com/baeldung/repository/UserRepository.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/resources/logback.xml (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/resources/mongoConfig.xml (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/main/resources/test.png (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/aggregation/ZipsAggregationLiveTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/aggregation/model/StatePopulation.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/gridfs/GridFSLiveTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/mongotemplate/DocumentQueryLiveTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/mongotemplate/MongoTemplateProjectionLiveTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/mongotemplate/MongoTemplateQueryLiveTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/repository/BaseQueryLiveTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/repository/DSLQueryLiveTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/repository/JSONQueryLiveTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/repository/QueryMethodsLiveTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/repository/UserRepositoryLiveTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/repository/UserRepositoryProjectionLiveTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/transaction/MongoTransactionReactiveIntegrationTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/transaction/MongoTransactionTemplateIntegrationTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/com/baeldung/transaction/MongoTransactionalIntegrationTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/java/org/baeldung/SpringContextIntegrationTest.java (100%) rename {spring-data-mongodb => persistence-modules/spring-data-mongodb}/src/test/resources/zips.json (100%) rename {spring-hibernate3 => persistence-modules/spring-hibernate3}/README.md (100%) rename {spring-hibernate3 => persistence-modules/spring-hibernate3}/src/main/java/org/baeldung/spring/PersistenceConfigHibernate3.java (97%) rename {spring-hibernate3 => persistence-modules/spring-hibernate3}/src/main/resources/logback.xml (100%) rename {spring-hibernate3 => persistence-modules/spring-hibernate3}/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen1MainIntegrationTest.java (97%) rename {spring-hibernate3 => persistence-modules/spring-hibernate3}/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen2MainIntegrationTest.java (97%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/.gitignore (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/README.md (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/pom.xml (99%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/hibernate/criteria/model/Item.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/hibernate/fetching/model/OrderDetail.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/hibernate/fetching/model/UserEager.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/hibernate/fetching/model/UserLazy.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/hibernate/fetching/util/HibernateUtil.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/hibernate/fetching/view/FetchingAppView.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/hibernate/oneToMany/config/HibernateAnnotationUtil.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMain.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/hibernate/oneToMany/model/Cart.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/hibernate/oneToMany/model/Items.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/IBarAuditableDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/IBarCrudRepository.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/IBarDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/IChildDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/IFooAuditableDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/IFooDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/IParentDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/common/AbstractDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/common/AbstractHibernateAuditableDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/common/AbstractHibernateDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/common/AbstractJpaDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/common/GenericHibernateDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/common/IAuditOperations.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/common/IGenericDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/common/IOperations.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/impl/BarAuditableDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/impl/BarDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/impl/BarJpaDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/impl/ChildDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/impl/FooAuditableDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/impl/FooDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/dao/impl/ParentDao.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/model/Bar.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/model/Child.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/model/Foo.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/model/Parent.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/model/Person.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/IBarAuditableService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/IBarService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/IChildService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/IFooAuditableService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/IFooService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/IParentService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/common/AbstractHibernateAuditableService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/common/AbstractHibernateService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/common/AbstractJpaService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/common/AbstractService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/common/AbstractSpringDataJpaService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/impl/BarAuditableService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/impl/BarJpaService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/impl/BarService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/impl/BarSpringDataJpaService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/impl/ChildService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/impl/FooAuditableService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/impl/FooService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/persistence/service/impl/ParentService.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/spring/PersistenceConfig.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/java/com/baeldung/spring/PersistenceXmlConfig.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/resources/fetching.cfg.xml (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/resources/fetchingLazy.cfg.xml (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/resources/fetching_create_queries.sql (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/resources/hibernate-annotation.cfg.xml (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/resources/hibernate4Config.xml (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/resources/immutable.cfg.xml (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/resources/insert_statements.sql (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/resources/logback.xml (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/resources/one_to_many.sql (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/resources/persistence-mysql.properties (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/resources/stored_procedure.sql (95%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/main/resources/webSecurityConfig.xml (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/hibernate/fetching/HibernateFetchingIntegrationTest.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMainIntegrationTest.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/persistence/IntegrationTestSuite.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/persistence/audit/AuditTestSuite.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/persistence/audit/EnversFooBarAuditIntegrationTest.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/persistence/audit/JPABarAuditIntegrationTest.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/persistence/audit/SpringDataJPABarAuditIntegrationTest.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/persistence/hibernate/FooFixtures.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/persistence/hibernate/FooPaginationPersistenceIntegrationTest.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/persistence/hibernate/FooSortingPersistenceIntegrationTest.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/persistence/save/SaveMethodsIntegrationTest.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/persistence/service/FooServiceBasicPersistenceIntegrationTest.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/persistence/service/FooServicePersistenceIntegrationTest.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/persistence/service/FooStoredProceduresLiveTest.java (97%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/persistence/service/ParentServicePersistenceIntegrationTest.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/com/baeldung/spring/config/PersistenceTestConfig.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/java/org/baeldung/SpringContextIntegrationTest.java (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/resources/.gitignore (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/resources/fetching.cfg.xml (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/resources/fetchingLazy.cfg.xml (100%) rename {spring-hibernate4 => persistence-modules/spring-hibernate4}/src/test/resources/persistence-h2.properties (100%) diff --git a/core-java-persistence/README.md b/persistence-modules/core-java-persistence/README.md similarity index 100% rename from core-java-persistence/README.md rename to persistence-modules/core-java-persistence/README.md diff --git a/core-java-persistence/pom.xml b/persistence-modules/core-java-persistence/pom.xml similarity index 95% rename from core-java-persistence/pom.xml rename to persistence-modules/core-java-persistence/pom.xml index 7279fd763b..f012d60ee6 100644 --- a/core-java-persistence/pom.xml +++ b/persistence-modules/core-java-persistence/pom.xml @@ -1,71 +1,71 @@ - - 4.0.0 - com.baeldung.core-java-persistence - core-java-persistence - 0.1.0-SNAPSHOT - jar - core-java-persistence - - com.baeldung - parent-java - 0.0.1-SNAPSHOT - ../parent-java - - - - org.assertj - assertj-core - ${assertj-core.version} - test - - - com.h2database - h2 - ${h2database.version} - - - org.apache.commons - commons-dbcp2 - ${commons-dbcp2.version} - - - com.zaxxer - HikariCP - ${HikariCP.version} - - - com.mchange - c3p0 - ${c3p0.version} - - - org.springframework - spring-web - ${springframework.spring-web.version} - - - org.springframework.boot - spring-boot-starter - ${springframework.boot.spring-boot-starter.version} - - - - core-java-persistence - - - src/main/resources - true - - - - - 3.10.0 - 1.4.197 - 2.4.0 - 3.2.0 - 0.9.5.2 - 1.5.8.RELEASE - 4.3.4.RELEASE - + + 4.0.0 + com.baeldung.core-java-persistence + core-java-persistence + 0.1.0-SNAPSHOT + jar + core-java-persistence + + com.baeldung + parent-java + 0.0.1-SNAPSHOT + ../../parent-java + + + + org.assertj + assertj-core + ${assertj-core.version} + test + + + com.h2database + h2 + ${h2database.version} + + + org.apache.commons + commons-dbcp2 + ${commons-dbcp2.version} + + + com.zaxxer + HikariCP + ${HikariCP.version} + + + com.mchange + c3p0 + ${c3p0.version} + + + org.springframework + spring-web + ${springframework.spring-web.version} + + + org.springframework.boot + spring-boot-starter + ${springframework.boot.spring-boot-starter.version} + + + + core-java-persistence + + + src/main/resources + true + + + + + 3.10.0 + 1.4.197 + 2.4.0 + 3.2.0 + 0.9.5.2 + 1.5.8.RELEASE + 4.3.4.RELEASE + \ No newline at end of file diff --git a/core-java-persistence/src/main/java/com/baeldung/connectionpool/BasicConnectionPool.java b/persistence-modules/core-java-persistence/src/main/java/com/baeldung/connectionpool/BasicConnectionPool.java similarity index 100% rename from core-java-persistence/src/main/java/com/baeldung/connectionpool/BasicConnectionPool.java rename to persistence-modules/core-java-persistence/src/main/java/com/baeldung/connectionpool/BasicConnectionPool.java diff --git a/core-java-persistence/src/main/java/com/baeldung/connectionpool/C3poDataSource.java b/persistence-modules/core-java-persistence/src/main/java/com/baeldung/connectionpool/C3poDataSource.java similarity index 100% rename from core-java-persistence/src/main/java/com/baeldung/connectionpool/C3poDataSource.java rename to persistence-modules/core-java-persistence/src/main/java/com/baeldung/connectionpool/C3poDataSource.java diff --git a/core-java-persistence/src/main/java/com/baeldung/connectionpool/ConnectionPool.java b/persistence-modules/core-java-persistence/src/main/java/com/baeldung/connectionpool/ConnectionPool.java similarity index 100% rename from core-java-persistence/src/main/java/com/baeldung/connectionpool/ConnectionPool.java rename to persistence-modules/core-java-persistence/src/main/java/com/baeldung/connectionpool/ConnectionPool.java diff --git a/core-java-persistence/src/main/java/com/baeldung/connectionpool/DBCPDataSource.java b/persistence-modules/core-java-persistence/src/main/java/com/baeldung/connectionpool/DBCPDataSource.java similarity index 100% rename from core-java-persistence/src/main/java/com/baeldung/connectionpool/DBCPDataSource.java rename to persistence-modules/core-java-persistence/src/main/java/com/baeldung/connectionpool/DBCPDataSource.java diff --git a/core-java-persistence/src/main/java/com/baeldung/connectionpool/HikariCPDataSource.java b/persistence-modules/core-java-persistence/src/main/java/com/baeldung/connectionpool/HikariCPDataSource.java similarity index 100% rename from core-java-persistence/src/main/java/com/baeldung/connectionpool/HikariCPDataSource.java rename to persistence-modules/core-java-persistence/src/main/java/com/baeldung/connectionpool/HikariCPDataSource.java diff --git a/core-java-persistence/src/main/java/com/baeldung/jdbc/BatchProcessing.java b/persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbc/BatchProcessing.java similarity index 100% rename from core-java-persistence/src/main/java/com/baeldung/jdbc/BatchProcessing.java rename to persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbc/BatchProcessing.java diff --git a/core-java-persistence/src/main/java/com/baeldung/jdbc/Employee.java b/persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbc/Employee.java similarity index 100% rename from core-java-persistence/src/main/java/com/baeldung/jdbc/Employee.java rename to persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbc/Employee.java diff --git a/core-java-persistence/src/main/java/com/baeldung/jdbcrowset/DatabaseConfiguration.java b/persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbcrowset/DatabaseConfiguration.java similarity index 100% rename from core-java-persistence/src/main/java/com/baeldung/jdbcrowset/DatabaseConfiguration.java rename to persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbcrowset/DatabaseConfiguration.java diff --git a/core-java-persistence/src/main/java/com/baeldung/jdbcrowset/ExampleListener.java b/persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbcrowset/ExampleListener.java similarity index 100% rename from core-java-persistence/src/main/java/com/baeldung/jdbcrowset/ExampleListener.java rename to persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbcrowset/ExampleListener.java diff --git a/core-java-persistence/src/main/java/com/baeldung/jdbcrowset/FilterExample.java b/persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbcrowset/FilterExample.java similarity index 100% rename from core-java-persistence/src/main/java/com/baeldung/jdbcrowset/FilterExample.java rename to persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbcrowset/FilterExample.java diff --git a/core-java-persistence/src/main/java/com/baeldung/jdbcrowset/JdbcRowsetApplication.java b/persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbcrowset/JdbcRowsetApplication.java similarity index 100% rename from core-java-persistence/src/main/java/com/baeldung/jdbcrowset/JdbcRowsetApplication.java rename to persistence-modules/core-java-persistence/src/main/java/com/baeldung/jdbcrowset/JdbcRowsetApplication.java diff --git a/core-java-persistence/src/main/resources/logback.xml b/persistence-modules/core-java-persistence/src/main/resources/logback.xml similarity index 100% rename from core-java-persistence/src/main/resources/logback.xml rename to persistence-modules/core-java-persistence/src/main/resources/logback.xml diff --git a/core-java-persistence/src/test/java/com/baeldung/connectionpool/BasicConnectionPoolUnitTest.java b/persistence-modules/core-java-persistence/src/test/java/com/baeldung/connectionpool/BasicConnectionPoolUnitTest.java similarity index 97% rename from core-java-persistence/src/test/java/com/baeldung/connectionpool/BasicConnectionPoolUnitTest.java rename to persistence-modules/core-java-persistence/src/test/java/com/baeldung/connectionpool/BasicConnectionPoolUnitTest.java index 479cd0db25..3b3c9870fb 100644 --- a/core-java-persistence/src/test/java/com/baeldung/connectionpool/BasicConnectionPoolUnitTest.java +++ b/persistence-modules/core-java-persistence/src/test/java/com/baeldung/connectionpool/BasicConnectionPoolUnitTest.java @@ -1,67 +1,67 @@ -package com.baeldung.connectionpool; - -import java.sql.Connection; -import java.sql.SQLException; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import org.junit.BeforeClass; -import org.junit.Test; - -public class BasicConnectionPoolUnitTest { - - private static ConnectionPool connectionPool; - - @BeforeClass - public static void setUpBasicConnectionPoolInstance() throws SQLException { - connectionPool = BasicConnectionPool.create("jdbc:h2:mem:test", "user", "password"); - } - - @Test - public void givenBasicConnectionPoolInstance_whenCalledgetConnection_thenCorrect() throws Exception { - assertTrue(connectionPool.getConnection().isValid(1)); - } - - @Test - public void givenBasicConnectionPoolInstance_whenCalledreleaseConnection_thenCorrect() throws Exception { - Connection connection = connectionPool.getConnection(); - assertThat(connectionPool.releaseConnection(connection)).isTrue(); - } - - @Test - public void givenBasicConnectionPoolInstance_whenCalledgetUrl_thenCorrect() { - assertThat(connectionPool.getUrl()).isEqualTo("jdbc:h2:mem:test"); - } - - @Test - public void givenBasicConnectionPoolInstance_whenCalledgetUser_thenCorrect() { - assertThat(connectionPool.getUser()).isEqualTo("user"); - } - - @Test - public void givenBasicConnectionPoolInstance_whenCalledgetPassword_thenCorrect() { - assertThat(connectionPool.getPassword()).isEqualTo("password"); - } - - @Test(expected = RuntimeException.class) - public void givenBasicConnectionPoolInstance_whenAskedForMoreThanMax_thenError() throws Exception { - // this test needs to be independent so it doesn't share the same connection pool as other tests - ConnectionPool cp = BasicConnectionPool.create("jdbc:h2:mem:test", "user", "password"); - final int MAX_POOL_SIZE = 20; - for (int i = 0; i < MAX_POOL_SIZE + 1; i++) { - cp.getConnection(); - } - fail(); - } - - @Test - public void givenBasicConnectionPoolInstance_whenSutdown_thenEmpty() throws Exception { - ConnectionPool cp = BasicConnectionPool.create("jdbc:h2:mem:test", "user", "password"); - assertThat(((BasicConnectionPool)cp).getSize()).isEqualTo(10); - - ((BasicConnectionPool) cp).shutdown(); - assertThat(((BasicConnectionPool)cp).getSize()).isEqualTo(0); - } -} +package com.baeldung.connectionpool; + +import java.sql.Connection; +import java.sql.SQLException; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import org.junit.BeforeClass; +import org.junit.Test; + +public class BasicConnectionPoolUnitTest { + + private static ConnectionPool connectionPool; + + @BeforeClass + public static void setUpBasicConnectionPoolInstance() throws SQLException { + connectionPool = BasicConnectionPool.create("jdbc:h2:mem:test", "user", "password"); + } + + @Test + public void givenBasicConnectionPoolInstance_whenCalledgetConnection_thenCorrect() throws Exception { + assertTrue(connectionPool.getConnection().isValid(1)); + } + + @Test + public void givenBasicConnectionPoolInstance_whenCalledreleaseConnection_thenCorrect() throws Exception { + Connection connection = connectionPool.getConnection(); + assertThat(connectionPool.releaseConnection(connection)).isTrue(); + } + + @Test + public void givenBasicConnectionPoolInstance_whenCalledgetUrl_thenCorrect() { + assertThat(connectionPool.getUrl()).isEqualTo("jdbc:h2:mem:test"); + } + + @Test + public void givenBasicConnectionPoolInstance_whenCalledgetUser_thenCorrect() { + assertThat(connectionPool.getUser()).isEqualTo("user"); + } + + @Test + public void givenBasicConnectionPoolInstance_whenCalledgetPassword_thenCorrect() { + assertThat(connectionPool.getPassword()).isEqualTo("password"); + } + + @Test(expected = RuntimeException.class) + public void givenBasicConnectionPoolInstance_whenAskedForMoreThanMax_thenError() throws Exception { + // this test needs to be independent so it doesn't share the same connection pool as other tests + ConnectionPool cp = BasicConnectionPool.create("jdbc:h2:mem:test", "user", "password"); + final int MAX_POOL_SIZE = 20; + for (int i = 0; i < MAX_POOL_SIZE + 1; i++) { + cp.getConnection(); + } + fail(); + } + + @Test + public void givenBasicConnectionPoolInstance_whenSutdown_thenEmpty() throws Exception { + ConnectionPool cp = BasicConnectionPool.create("jdbc:h2:mem:test", "user", "password"); + assertThat(((BasicConnectionPool)cp).getSize()).isEqualTo(10); + + ((BasicConnectionPool) cp).shutdown(); + assertThat(((BasicConnectionPool)cp).getSize()).isEqualTo(0); + } +} diff --git a/core-java-persistence/src/test/java/com/baeldung/connectionpool/C3poDataSourceUnitTest.java b/persistence-modules/core-java-persistence/src/test/java/com/baeldung/connectionpool/C3poDataSourceUnitTest.java similarity index 96% rename from core-java-persistence/src/test/java/com/baeldung/connectionpool/C3poDataSourceUnitTest.java rename to persistence-modules/core-java-persistence/src/test/java/com/baeldung/connectionpool/C3poDataSourceUnitTest.java index a07fa9e74b..acad9fe5e4 100644 --- a/core-java-persistence/src/test/java/com/baeldung/connectionpool/C3poDataSourceUnitTest.java +++ b/persistence-modules/core-java-persistence/src/test/java/com/baeldung/connectionpool/C3poDataSourceUnitTest.java @@ -1,13 +1,13 @@ -package com.baeldung.connectionpool; - -import java.sql.SQLException; -import static org.junit.Assert.assertTrue; -import org.junit.Test; - -public class C3poDataSourceUnitTest { - - @Test - public void givenC3poDataSourceClass_whenCalledgetConnection_thenCorrect() throws SQLException { - assertTrue(C3poDataSource.getConnection().isValid(1)); - } +package com.baeldung.connectionpool; + +import java.sql.SQLException; +import static org.junit.Assert.assertTrue; +import org.junit.Test; + +public class C3poDataSourceUnitTest { + + @Test + public void givenC3poDataSourceClass_whenCalledgetConnection_thenCorrect() throws SQLException { + assertTrue(C3poDataSource.getConnection().isValid(1)); + } } \ No newline at end of file diff --git a/core-java-persistence/src/test/java/com/baeldung/connectionpool/DBCPDataSourceUnitTest.java b/persistence-modules/core-java-persistence/src/test/java/com/baeldung/connectionpool/DBCPDataSourceUnitTest.java similarity index 96% rename from core-java-persistence/src/test/java/com/baeldung/connectionpool/DBCPDataSourceUnitTest.java rename to persistence-modules/core-java-persistence/src/test/java/com/baeldung/connectionpool/DBCPDataSourceUnitTest.java index 43aaf330b6..4882d2af73 100644 --- a/core-java-persistence/src/test/java/com/baeldung/connectionpool/DBCPDataSourceUnitTest.java +++ b/persistence-modules/core-java-persistence/src/test/java/com/baeldung/connectionpool/DBCPDataSourceUnitTest.java @@ -1,13 +1,13 @@ -package com.baeldung.connectionpool; - -import java.sql.SQLException; -import static org.junit.Assert.assertTrue; -import org.junit.Test; - -public class DBCPDataSourceUnitTest { - - @Test - public void givenDBCPDataSourceClass_whenCalledgetConnection_thenCorrect() throws SQLException { - assertTrue(DBCPDataSource.getConnection().isValid(1)); - } +package com.baeldung.connectionpool; + +import java.sql.SQLException; +import static org.junit.Assert.assertTrue; +import org.junit.Test; + +public class DBCPDataSourceUnitTest { + + @Test + public void givenDBCPDataSourceClass_whenCalledgetConnection_thenCorrect() throws SQLException { + assertTrue(DBCPDataSource.getConnection().isValid(1)); + } } \ No newline at end of file diff --git a/core-java-persistence/src/test/java/com/baeldung/connectionpool/HikariCPDataSourceUnitTest.java b/persistence-modules/core-java-persistence/src/test/java/com/baeldung/connectionpool/HikariCPDataSourceUnitTest.java similarity index 96% rename from core-java-persistence/src/test/java/com/baeldung/connectionpool/HikariCPDataSourceUnitTest.java rename to persistence-modules/core-java-persistence/src/test/java/com/baeldung/connectionpool/HikariCPDataSourceUnitTest.java index b20ce70efd..885743ab2b 100644 --- a/core-java-persistence/src/test/java/com/baeldung/connectionpool/HikariCPDataSourceUnitTest.java +++ b/persistence-modules/core-java-persistence/src/test/java/com/baeldung/connectionpool/HikariCPDataSourceUnitTest.java @@ -1,13 +1,13 @@ -package com.baeldung.connectionpool; - -import java.sql.SQLException; -import static org.junit.Assert.assertTrue; -import org.junit.Test; - -public class HikariCPDataSourceUnitTest { - - @Test - public void givenHikariDataSourceClass_whenCalledgetConnection_thenCorrect() throws SQLException { - assertTrue(HikariCPDataSource.getConnection().isValid(1)); - } +package com.baeldung.connectionpool; + +import java.sql.SQLException; +import static org.junit.Assert.assertTrue; +import org.junit.Test; + +public class HikariCPDataSourceUnitTest { + + @Test + public void givenHikariDataSourceClass_whenCalledgetConnection_thenCorrect() throws SQLException { + assertTrue(HikariCPDataSource.getConnection().isValid(1)); + } } \ No newline at end of file diff --git a/core-java-persistence/src/test/java/com/baeldung/jdbc/BatchProcessingLiveTest.java b/persistence-modules/core-java-persistence/src/test/java/com/baeldung/jdbc/BatchProcessingLiveTest.java similarity index 100% rename from core-java-persistence/src/test/java/com/baeldung/jdbc/BatchProcessingLiveTest.java rename to persistence-modules/core-java-persistence/src/test/java/com/baeldung/jdbc/BatchProcessingLiveTest.java diff --git a/core-java-persistence/src/test/java/com/baeldung/jdbc/JdbcLiveTest.java b/persistence-modules/core-java-persistence/src/test/java/com/baeldung/jdbc/JdbcLiveTest.java similarity index 100% rename from core-java-persistence/src/test/java/com/baeldung/jdbc/JdbcLiveTest.java rename to persistence-modules/core-java-persistence/src/test/java/com/baeldung/jdbc/JdbcLiveTest.java diff --git a/core-java-persistence/src/test/java/com/baeldung/jdbcrowset/JdbcRowSetLiveTest.java b/persistence-modules/core-java-persistence/src/test/java/com/baeldung/jdbcrowset/JdbcRowSetLiveTest.java similarity index 100% rename from core-java-persistence/src/test/java/com/baeldung/jdbcrowset/JdbcRowSetLiveTest.java rename to persistence-modules/core-java-persistence/src/test/java/com/baeldung/jdbcrowset/JdbcRowSetLiveTest.java diff --git a/deltaspike/.gitignore b/persistence-modules/deltaspike/.gitignore similarity index 100% rename from deltaspike/.gitignore rename to persistence-modules/deltaspike/.gitignore diff --git a/deltaspike/README.md b/persistence-modules/deltaspike/README.md similarity index 100% rename from deltaspike/README.md rename to persistence-modules/deltaspike/README.md diff --git a/deltaspike/pom.xml b/persistence-modules/deltaspike/pom.xml similarity index 99% rename from deltaspike/pom.xml rename to persistence-modules/deltaspike/pom.xml index 8ab3e3fd80..b798d2f39e 100644 --- a/deltaspike/pom.xml +++ b/persistence-modules/deltaspike/pom.xml @@ -14,6 +14,7 @@ com.baeldung parent-modules 1.0.0-SNAPSHOT + ../../ diff --git a/deltaspike/src/main/java/baeldung/controller/MemberController.java b/persistence-modules/deltaspike/src/main/java/baeldung/controller/MemberController.java similarity index 100% rename from deltaspike/src/main/java/baeldung/controller/MemberController.java rename to persistence-modules/deltaspike/src/main/java/baeldung/controller/MemberController.java diff --git a/deltaspike/src/main/java/baeldung/data/EntityManagerProducer.java b/persistence-modules/deltaspike/src/main/java/baeldung/data/EntityManagerProducer.java similarity index 100% rename from deltaspike/src/main/java/baeldung/data/EntityManagerProducer.java rename to persistence-modules/deltaspike/src/main/java/baeldung/data/EntityManagerProducer.java diff --git a/deltaspike/src/main/java/baeldung/data/MemberListProducer.java b/persistence-modules/deltaspike/src/main/java/baeldung/data/MemberListProducer.java similarity index 100% rename from deltaspike/src/main/java/baeldung/data/MemberListProducer.java rename to persistence-modules/deltaspike/src/main/java/baeldung/data/MemberListProducer.java diff --git a/deltaspike/src/main/java/baeldung/data/MemberRepository.java b/persistence-modules/deltaspike/src/main/java/baeldung/data/MemberRepository.java similarity index 100% rename from deltaspike/src/main/java/baeldung/data/MemberRepository.java rename to persistence-modules/deltaspike/src/main/java/baeldung/data/MemberRepository.java diff --git a/deltaspike/src/main/java/baeldung/data/QueryDslRepositoryExtension.java b/persistence-modules/deltaspike/src/main/java/baeldung/data/QueryDslRepositoryExtension.java similarity index 100% rename from deltaspike/src/main/java/baeldung/data/QueryDslRepositoryExtension.java rename to persistence-modules/deltaspike/src/main/java/baeldung/data/QueryDslRepositoryExtension.java diff --git a/deltaspike/src/main/java/baeldung/data/QueryDslSupport.java b/persistence-modules/deltaspike/src/main/java/baeldung/data/QueryDslSupport.java similarity index 100% rename from deltaspike/src/main/java/baeldung/data/QueryDslSupport.java rename to persistence-modules/deltaspike/src/main/java/baeldung/data/QueryDslSupport.java diff --git a/deltaspike/src/main/java/baeldung/data/SecondaryEntityManagerProducer.java b/persistence-modules/deltaspike/src/main/java/baeldung/data/SecondaryEntityManagerProducer.java similarity index 100% rename from deltaspike/src/main/java/baeldung/data/SecondaryEntityManagerProducer.java rename to persistence-modules/deltaspike/src/main/java/baeldung/data/SecondaryEntityManagerProducer.java diff --git a/deltaspike/src/main/java/baeldung/data/SecondaryEntityManagerResolver.java b/persistence-modules/deltaspike/src/main/java/baeldung/data/SecondaryEntityManagerResolver.java similarity index 100% rename from deltaspike/src/main/java/baeldung/data/SecondaryEntityManagerResolver.java rename to persistence-modules/deltaspike/src/main/java/baeldung/data/SecondaryEntityManagerResolver.java diff --git a/deltaspike/src/main/java/baeldung/data/SecondaryPersistenceUnit.java b/persistence-modules/deltaspike/src/main/java/baeldung/data/SecondaryPersistenceUnit.java similarity index 100% rename from deltaspike/src/main/java/baeldung/data/SecondaryPersistenceUnit.java rename to persistence-modules/deltaspike/src/main/java/baeldung/data/SecondaryPersistenceUnit.java diff --git a/deltaspike/src/main/java/baeldung/data/SimpleUserRepository.java b/persistence-modules/deltaspike/src/main/java/baeldung/data/SimpleUserRepository.java similarity index 100% rename from deltaspike/src/main/java/baeldung/data/SimpleUserRepository.java rename to persistence-modules/deltaspike/src/main/java/baeldung/data/SimpleUserRepository.java diff --git a/deltaspike/src/main/java/baeldung/data/UserRepository.java b/persistence-modules/deltaspike/src/main/java/baeldung/data/UserRepository.java similarity index 100% rename from deltaspike/src/main/java/baeldung/data/UserRepository.java rename to persistence-modules/deltaspike/src/main/java/baeldung/data/UserRepository.java diff --git a/deltaspike/src/main/java/baeldung/model/Address.java b/persistence-modules/deltaspike/src/main/java/baeldung/model/Address.java similarity index 100% rename from deltaspike/src/main/java/baeldung/model/Address.java rename to persistence-modules/deltaspike/src/main/java/baeldung/model/Address.java diff --git a/deltaspike/src/main/java/baeldung/model/Member.java b/persistence-modules/deltaspike/src/main/java/baeldung/model/Member.java similarity index 100% rename from deltaspike/src/main/java/baeldung/model/Member.java rename to persistence-modules/deltaspike/src/main/java/baeldung/model/Member.java diff --git a/deltaspike/src/main/java/baeldung/model/User.java b/persistence-modules/deltaspike/src/main/java/baeldung/model/User.java similarity index 100% rename from deltaspike/src/main/java/baeldung/model/User.java rename to persistence-modules/deltaspike/src/main/java/baeldung/model/User.java diff --git a/deltaspike/src/main/java/baeldung/rest/JaxRsActivator.java b/persistence-modules/deltaspike/src/main/java/baeldung/rest/JaxRsActivator.java similarity index 100% rename from deltaspike/src/main/java/baeldung/rest/JaxRsActivator.java rename to persistence-modules/deltaspike/src/main/java/baeldung/rest/JaxRsActivator.java diff --git a/deltaspike/src/main/java/baeldung/rest/MemberResourceRESTService.java b/persistence-modules/deltaspike/src/main/java/baeldung/rest/MemberResourceRESTService.java similarity index 100% rename from deltaspike/src/main/java/baeldung/rest/MemberResourceRESTService.java rename to persistence-modules/deltaspike/src/main/java/baeldung/rest/MemberResourceRESTService.java diff --git a/deltaspike/src/main/java/baeldung/service/MemberRegistration.java b/persistence-modules/deltaspike/src/main/java/baeldung/service/MemberRegistration.java similarity index 100% rename from deltaspike/src/main/java/baeldung/service/MemberRegistration.java rename to persistence-modules/deltaspike/src/main/java/baeldung/service/MemberRegistration.java diff --git a/deltaspike/src/main/java/baeldung/util/Resources.java b/persistence-modules/deltaspike/src/main/java/baeldung/util/Resources.java similarity index 100% rename from deltaspike/src/main/java/baeldung/util/Resources.java rename to persistence-modules/deltaspike/src/main/java/baeldung/util/Resources.java diff --git a/deltaspike/src/main/resources/META-INF/apache-deltaspike.properties b/persistence-modules/deltaspike/src/main/resources/META-INF/apache-deltaspike.properties similarity index 100% rename from deltaspike/src/main/resources/META-INF/apache-deltaspike.properties rename to persistence-modules/deltaspike/src/main/resources/META-INF/apache-deltaspike.properties diff --git a/deltaspike/src/main/resources/META-INF/beans.xml b/persistence-modules/deltaspike/src/main/resources/META-INF/beans.xml similarity index 100% rename from deltaspike/src/main/resources/META-INF/beans.xml rename to persistence-modules/deltaspike/src/main/resources/META-INF/beans.xml diff --git a/deltaspike/src/main/resources/META-INF/persistence.xml b/persistence-modules/deltaspike/src/main/resources/META-INF/persistence.xml similarity index 100% rename from deltaspike/src/main/resources/META-INF/persistence.xml rename to persistence-modules/deltaspike/src/main/resources/META-INF/persistence.xml diff --git a/deltaspike/src/main/resources/import.sql b/persistence-modules/deltaspike/src/main/resources/import.sql similarity index 100% rename from deltaspike/src/main/resources/import.sql rename to persistence-modules/deltaspike/src/main/resources/import.sql diff --git a/deltaspike/src/main/resources/logback.xml b/persistence-modules/deltaspike/src/main/resources/logback.xml similarity index 100% rename from deltaspike/src/main/resources/logback.xml rename to persistence-modules/deltaspike/src/main/resources/logback.xml diff --git a/deltaspike/src/main/webapp/WEB-INF/baeldung-jee7-seed-ds.xml b/persistence-modules/deltaspike/src/main/webapp/WEB-INF/baeldung-jee7-seed-ds.xml similarity index 100% rename from deltaspike/src/main/webapp/WEB-INF/baeldung-jee7-seed-ds.xml rename to persistence-modules/deltaspike/src/main/webapp/WEB-INF/baeldung-jee7-seed-ds.xml diff --git a/deltaspike/src/main/webapp/WEB-INF/baeldung-jee7-seed-secondary-ds.xml b/persistence-modules/deltaspike/src/main/webapp/WEB-INF/baeldung-jee7-seed-secondary-ds.xml similarity index 100% rename from deltaspike/src/main/webapp/WEB-INF/baeldung-jee7-seed-secondary-ds.xml rename to persistence-modules/deltaspike/src/main/webapp/WEB-INF/baeldung-jee7-seed-secondary-ds.xml diff --git a/deltaspike/src/main/webapp/WEB-INF/beans.xml b/persistence-modules/deltaspike/src/main/webapp/WEB-INF/beans.xml similarity index 100% rename from deltaspike/src/main/webapp/WEB-INF/beans.xml rename to persistence-modules/deltaspike/src/main/webapp/WEB-INF/beans.xml diff --git a/deltaspike/src/main/webapp/WEB-INF/faces-config.xml b/persistence-modules/deltaspike/src/main/webapp/WEB-INF/faces-config.xml similarity index 100% rename from deltaspike/src/main/webapp/WEB-INF/faces-config.xml rename to persistence-modules/deltaspike/src/main/webapp/WEB-INF/faces-config.xml diff --git a/deltaspike/src/main/webapp/WEB-INF/templates/default.xhtml b/persistence-modules/deltaspike/src/main/webapp/WEB-INF/templates/default.xhtml similarity index 100% rename from deltaspike/src/main/webapp/WEB-INF/templates/default.xhtml rename to persistence-modules/deltaspike/src/main/webapp/WEB-INF/templates/default.xhtml diff --git a/deltaspike/src/main/webapp/index.html b/persistence-modules/deltaspike/src/main/webapp/index.html similarity index 100% rename from deltaspike/src/main/webapp/index.html rename to persistence-modules/deltaspike/src/main/webapp/index.html diff --git a/deltaspike/src/main/webapp/index.xhtml b/persistence-modules/deltaspike/src/main/webapp/index.xhtml similarity index 100% rename from deltaspike/src/main/webapp/index.xhtml rename to persistence-modules/deltaspike/src/main/webapp/index.xhtml diff --git a/deltaspike/src/main/webapp/resources/css/screen.css b/persistence-modules/deltaspike/src/main/webapp/resources/css/screen.css similarity index 100% rename from deltaspike/src/main/webapp/resources/css/screen.css rename to persistence-modules/deltaspike/src/main/webapp/resources/css/screen.css diff --git a/deltaspike/src/main/webapp/resources/gfx/asidebkg.png b/persistence-modules/deltaspike/src/main/webapp/resources/gfx/asidebkg.png similarity index 100% rename from deltaspike/src/main/webapp/resources/gfx/asidebkg.png rename to persistence-modules/deltaspike/src/main/webapp/resources/gfx/asidebkg.png diff --git a/deltaspike/src/main/webapp/resources/gfx/bkg-blkheader.png b/persistence-modules/deltaspike/src/main/webapp/resources/gfx/bkg-blkheader.png similarity index 100% rename from deltaspike/src/main/webapp/resources/gfx/bkg-blkheader.png rename to persistence-modules/deltaspike/src/main/webapp/resources/gfx/bkg-blkheader.png diff --git a/deltaspike/src/main/webapp/resources/gfx/dualbrand_logo.png b/persistence-modules/deltaspike/src/main/webapp/resources/gfx/dualbrand_logo.png similarity index 100% rename from deltaspike/src/main/webapp/resources/gfx/dualbrand_logo.png rename to persistence-modules/deltaspike/src/main/webapp/resources/gfx/dualbrand_logo.png diff --git a/deltaspike/src/main/webapp/resources/gfx/headerbkg.png b/persistence-modules/deltaspike/src/main/webapp/resources/gfx/headerbkg.png similarity index 100% rename from deltaspike/src/main/webapp/resources/gfx/headerbkg.png rename to persistence-modules/deltaspike/src/main/webapp/resources/gfx/headerbkg.png diff --git a/deltaspike/src/main/webapp/resources/gfx/wildfly_400x130.jpg b/persistence-modules/deltaspike/src/main/webapp/resources/gfx/wildfly_400x130.jpg similarity index 100% rename from deltaspike/src/main/webapp/resources/gfx/wildfly_400x130.jpg rename to persistence-modules/deltaspike/src/main/webapp/resources/gfx/wildfly_400x130.jpg diff --git a/deltaspike/src/test/java/baeldung/ValidatorProducer.java b/persistence-modules/deltaspike/src/test/java/baeldung/ValidatorProducer.java similarity index 100% rename from deltaspike/src/test/java/baeldung/ValidatorProducer.java rename to persistence-modules/deltaspike/src/test/java/baeldung/ValidatorProducer.java diff --git a/deltaspike/src/test/java/baeldung/data/TestEntityManagerProducer.java b/persistence-modules/deltaspike/src/test/java/baeldung/data/TestEntityManagerProducer.java similarity index 100% rename from deltaspike/src/test/java/baeldung/data/TestEntityManagerProducer.java rename to persistence-modules/deltaspike/src/test/java/baeldung/data/TestEntityManagerProducer.java diff --git a/deltaspike/src/test/java/baeldung/test/MemberRegistrationLiveTest.java b/persistence-modules/deltaspike/src/test/java/baeldung/test/MemberRegistrationLiveTest.java similarity index 100% rename from deltaspike/src/test/java/baeldung/test/MemberRegistrationLiveTest.java rename to persistence-modules/deltaspike/src/test/java/baeldung/test/MemberRegistrationLiveTest.java diff --git a/deltaspike/src/test/java/baeldung/test/SimpleUserRepositoryUnitTest.java b/persistence-modules/deltaspike/src/test/java/baeldung/test/SimpleUserRepositoryUnitTest.java similarity index 100% rename from deltaspike/src/test/java/baeldung/test/SimpleUserRepositoryUnitTest.java rename to persistence-modules/deltaspike/src/test/java/baeldung/test/SimpleUserRepositoryUnitTest.java diff --git a/deltaspike/src/test/java/baeldung/test/UserRepositoryUnitTest.java b/persistence-modules/deltaspike/src/test/java/baeldung/test/UserRepositoryUnitTest.java similarity index 100% rename from deltaspike/src/test/java/baeldung/test/UserRepositoryUnitTest.java rename to persistence-modules/deltaspike/src/test/java/baeldung/test/UserRepositoryUnitTest.java diff --git a/deltaspike/src/test/resources/META-INF/apache-deltaspike.properties b/persistence-modules/deltaspike/src/test/resources/META-INF/apache-deltaspike.properties similarity index 100% rename from deltaspike/src/test/resources/META-INF/apache-deltaspike.properties rename to persistence-modules/deltaspike/src/test/resources/META-INF/apache-deltaspike.properties diff --git a/deltaspike/src/test/resources/META-INF/beans.xml b/persistence-modules/deltaspike/src/test/resources/META-INF/beans.xml similarity index 100% rename from deltaspike/src/test/resources/META-INF/beans.xml rename to persistence-modules/deltaspike/src/test/resources/META-INF/beans.xml diff --git a/deltaspike/src/test/resources/META-INF/persistence.xml b/persistence-modules/deltaspike/src/test/resources/META-INF/persistence.xml similarity index 100% rename from deltaspike/src/test/resources/META-INF/persistence.xml rename to persistence-modules/deltaspike/src/test/resources/META-INF/persistence.xml diff --git a/deltaspike/src/test/resources/arquillian.xml b/persistence-modules/deltaspike/src/test/resources/arquillian.xml similarity index 100% rename from deltaspike/src/test/resources/arquillian.xml rename to persistence-modules/deltaspike/src/test/resources/arquillian.xml diff --git a/deltaspike/src/test/resources/import.sql b/persistence-modules/deltaspike/src/test/resources/import.sql similarity index 100% rename from deltaspike/src/test/resources/import.sql rename to persistence-modules/deltaspike/src/test/resources/import.sql diff --git a/deltaspike/src/test/resources/test-ds.xml b/persistence-modules/deltaspike/src/test/resources/test-ds.xml similarity index 100% rename from deltaspike/src/test/resources/test-ds.xml rename to persistence-modules/deltaspike/src/test/resources/test-ds.xml diff --git a/deltaspike/src/test/resources/test-secondary-ds.xml b/persistence-modules/deltaspike/src/test/resources/test-secondary-ds.xml similarity index 100% rename from deltaspike/src/test/resources/test-secondary-ds.xml rename to persistence-modules/deltaspike/src/test/resources/test-secondary-ds.xml diff --git a/influxdb/README.md b/persistence-modules/influxdb/README.md similarity index 100% rename from influxdb/README.md rename to persistence-modules/influxdb/README.md diff --git a/influxdb/pom.xml b/persistence-modules/influxdb/pom.xml similarity index 96% rename from influxdb/pom.xml rename to persistence-modules/influxdb/pom.xml index 5bb94bb6e2..5043d61897 100644 --- a/influxdb/pom.xml +++ b/persistence-modules/influxdb/pom.xml @@ -12,6 +12,7 @@ com.baeldung parent-modules 1.0.0-SNAPSHOT + ../../ diff --git a/influxdb/src/main/java/com/baeldung/influxdb/MemoryPoint.java b/persistence-modules/influxdb/src/main/java/com/baeldung/influxdb/MemoryPoint.java similarity index 100% rename from influxdb/src/main/java/com/baeldung/influxdb/MemoryPoint.java rename to persistence-modules/influxdb/src/main/java/com/baeldung/influxdb/MemoryPoint.java diff --git a/influxdb/src/main/resources/logback.xml b/persistence-modules/influxdb/src/main/resources/logback.xml similarity index 100% rename from influxdb/src/main/resources/logback.xml rename to persistence-modules/influxdb/src/main/resources/logback.xml diff --git a/influxdb/src/test/java/com/baeldung/influxdb/InfluxDBConnectionLiveTest.java b/persistence-modules/influxdb/src/test/java/com/baeldung/influxdb/InfluxDBConnectionLiveTest.java similarity index 100% rename from influxdb/src/test/java/com/baeldung/influxdb/InfluxDBConnectionLiveTest.java rename to persistence-modules/influxdb/src/test/java/com/baeldung/influxdb/InfluxDBConnectionLiveTest.java diff --git a/influxdb/src/test/resources/logback.xml b/persistence-modules/influxdb/src/test/resources/logback.xml similarity index 100% rename from influxdb/src/test/resources/logback.xml rename to persistence-modules/influxdb/src/test/resources/logback.xml diff --git a/orientdb/.gitignore b/persistence-modules/orientdb/.gitignore similarity index 100% rename from orientdb/.gitignore rename to persistence-modules/orientdb/.gitignore diff --git a/orientdb/.mvn/wrapper/maven-wrapper.jar b/persistence-modules/orientdb/.mvn/wrapper/maven-wrapper.jar similarity index 100% rename from orientdb/.mvn/wrapper/maven-wrapper.jar rename to persistence-modules/orientdb/.mvn/wrapper/maven-wrapper.jar diff --git a/orientdb/.mvn/wrapper/maven-wrapper.properties b/persistence-modules/orientdb/.mvn/wrapper/maven-wrapper.properties similarity index 100% rename from orientdb/.mvn/wrapper/maven-wrapper.properties rename to persistence-modules/orientdb/.mvn/wrapper/maven-wrapper.properties diff --git a/orientdb/README.md b/persistence-modules/orientdb/README.md similarity index 100% rename from orientdb/README.md rename to persistence-modules/orientdb/README.md diff --git a/orientdb/mvnw b/persistence-modules/orientdb/mvnw old mode 100755 new mode 100644 similarity index 100% rename from orientdb/mvnw rename to persistence-modules/orientdb/mvnw diff --git a/orientdb/mvnw.cmd b/persistence-modules/orientdb/mvnw.cmd similarity index 100% rename from orientdb/mvnw.cmd rename to persistence-modules/orientdb/mvnw.cmd diff --git a/orientdb/pom.xml b/persistence-modules/orientdb/pom.xml similarity index 97% rename from orientdb/pom.xml rename to persistence-modules/orientdb/pom.xml index e1c7ac42bb..e4bc9a0585 100644 --- a/orientdb/pom.xml +++ b/persistence-modules/orientdb/pom.xml @@ -12,6 +12,7 @@ com.baeldung parent-modules 1.0.0-SNAPSHOT + ../../ diff --git a/orientdb/src/main/java/com/baeldung/orientdb/Author.java b/persistence-modules/orientdb/src/main/java/com/baeldung/orientdb/Author.java similarity index 100% rename from orientdb/src/main/java/com/baeldung/orientdb/Author.java rename to persistence-modules/orientdb/src/main/java/com/baeldung/orientdb/Author.java diff --git a/orientdb/src/main/resources/logback.xml b/persistence-modules/orientdb/src/main/resources/logback.xml similarity index 100% rename from orientdb/src/main/resources/logback.xml rename to persistence-modules/orientdb/src/main/resources/logback.xml diff --git a/orientdb/src/test/java/com/baeldung/orientdb/OrientDBDocumentAPILiveTest.java b/persistence-modules/orientdb/src/test/java/com/baeldung/orientdb/OrientDBDocumentAPILiveTest.java similarity index 100% rename from orientdb/src/test/java/com/baeldung/orientdb/OrientDBDocumentAPILiveTest.java rename to persistence-modules/orientdb/src/test/java/com/baeldung/orientdb/OrientDBDocumentAPILiveTest.java diff --git a/orientdb/src/test/java/com/baeldung/orientdb/OrientDBGraphAPILiveTest.java b/persistence-modules/orientdb/src/test/java/com/baeldung/orientdb/OrientDBGraphAPILiveTest.java similarity index 100% rename from orientdb/src/test/java/com/baeldung/orientdb/OrientDBGraphAPILiveTest.java rename to persistence-modules/orientdb/src/test/java/com/baeldung/orientdb/OrientDBGraphAPILiveTest.java diff --git a/orientdb/src/test/java/com/baeldung/orientdb/OrientDBObjectAPILiveTest.java b/persistence-modules/orientdb/src/test/java/com/baeldung/orientdb/OrientDBObjectAPILiveTest.java similarity index 100% rename from orientdb/src/test/java/com/baeldung/orientdb/OrientDBObjectAPILiveTest.java rename to persistence-modules/orientdb/src/test/java/com/baeldung/orientdb/OrientDBObjectAPILiveTest.java diff --git a/spring-boot-persistence/.gitignore b/persistence-modules/spring-boot-persistence/.gitignore similarity index 89% rename from spring-boot-persistence/.gitignore rename to persistence-modules/spring-boot-persistence/.gitignore index 88e3308e9d..da7c2c5c0a 100644 --- a/spring-boot-persistence/.gitignore +++ b/persistence-modules/spring-boot-persistence/.gitignore @@ -1,5 +1,5 @@ -/target/ -.settings/ -.classpath -.project - +/target/ +.settings/ +.classpath +.project + diff --git a/spring-boot-persistence/.mvn/wrapper/maven-wrapper.properties b/persistence-modules/spring-boot-persistence/.mvn/wrapper/maven-wrapper.properties old mode 100755 new mode 100644 similarity index 100% rename from spring-boot-persistence/.mvn/wrapper/maven-wrapper.properties rename to persistence-modules/spring-boot-persistence/.mvn/wrapper/maven-wrapper.properties diff --git a/spring-boot-persistence/README.MD b/persistence-modules/spring-boot-persistence/README.MD similarity index 100% rename from spring-boot-persistence/README.MD rename to persistence-modules/spring-boot-persistence/README.MD diff --git a/spring-boot-persistence/mvnw b/persistence-modules/spring-boot-persistence/mvnw old mode 100755 new mode 100644 similarity index 100% rename from spring-boot-persistence/mvnw rename to persistence-modules/spring-boot-persistence/mvnw diff --git a/spring-boot-persistence/mvnw.cmd b/persistence-modules/spring-boot-persistence/mvnw.cmd old mode 100755 new mode 100644 similarity index 97% rename from spring-boot-persistence/mvnw.cmd rename to persistence-modules/spring-boot-persistence/mvnw.cmd index 4f0b068a03..6a6eec39ba --- a/spring-boot-persistence/mvnw.cmd +++ b/persistence-modules/spring-boot-persistence/mvnw.cmd @@ -1,145 +1,145 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Maven2 Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" -if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" - -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" -if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%" == "on" pause - -if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% - -exit /B %ERROR_CODE% +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" + +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/spring-boot-persistence/pom.xml b/persistence-modules/spring-boot-persistence/pom.xml similarity index 93% rename from spring-boot-persistence/pom.xml rename to persistence-modules/spring-boot-persistence/pom.xml index 08989edfa9..b34e33e38a 100644 --- a/spring-boot-persistence/pom.xml +++ b/persistence-modules/spring-boot-persistence/pom.xml @@ -1,75 +1,75 @@ - - - 4.0.0 - - com.baeldung - spring-boot-persistence - 0.1.0 - - - parent-boot-2 - com.baeldung - 0.0.1-SNAPSHOT - ../parent-boot-2 - - - - - org.springframework.boot - spring-boot-starter-data-jpa - - - com.zaxxer - HikariCP - - - - - org.springframework.boot - spring-boot-starter-test - test - - - org.apache.tomcat - tomcat-jdbc - ${tomcat-jdbc.version} - - - mysql - mysql-connector-java - ${mysql-connector-java.version} - - - com.h2database - h2 - ${h2database.version} - runtime - - - - - UTF-8 - 1.8 - 8.0.12 - 9.0.10 - 1.4.197 - - - - spring-boot-persistence - - - src/main/resources - true - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - + + + 4.0.0 + + com.baeldung + spring-boot-persistence + 0.1.0 + + + parent-boot-2 + com.baeldung + 0.0.1-SNAPSHOT + ../../parent-boot-2 + + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + com.zaxxer + HikariCP + + + + + org.springframework.boot + spring-boot-starter-test + test + + + org.apache.tomcat + tomcat-jdbc + ${tomcat-jdbc.version} + + + mysql + mysql-connector-java + ${mysql-connector-java.version} + + + com.h2database + h2 + ${h2database.version} + runtime + + + + + UTF-8 + 1.8 + 8.0.12 + 9.0.10 + 1.4.197 + + + + spring-boot-persistence + + + src/main/resources + true + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + diff --git a/spring-boot-persistence/src/main/java/com/baeldung/Application.java b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/Application.java similarity index 100% rename from spring-boot-persistence/src/main/java/com/baeldung/Application.java rename to persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/Application.java diff --git a/spring-boot-persistence/src/main/java/com/baeldung/boot/config/H2JpaConfig.java b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/boot/config/H2JpaConfig.java similarity index 100% rename from spring-boot-persistence/src/main/java/com/baeldung/boot/config/H2JpaConfig.java rename to persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/boot/config/H2JpaConfig.java diff --git a/spring-boot-persistence/src/main/java/com/baeldung/domain/Country.java b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/domain/Country.java similarity index 100% rename from spring-boot-persistence/src/main/java/com/baeldung/domain/Country.java rename to persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/domain/Country.java diff --git a/spring-boot-persistence/src/main/java/com/baeldung/domain/User.java b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/domain/User.java similarity index 100% rename from spring-boot-persistence/src/main/java/com/baeldung/domain/User.java rename to persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/domain/User.java diff --git a/spring-boot-persistence/src/main/java/com/baeldung/repository/UserRepository.java b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/repository/UserRepository.java similarity index 100% rename from spring-boot-persistence/src/main/java/com/baeldung/repository/UserRepository.java rename to persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/repository/UserRepository.java diff --git a/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/SpringBootConsoleApplication.java b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/SpringBootConsoleApplication.java similarity index 97% rename from spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/SpringBootConsoleApplication.java rename to persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/SpringBootConsoleApplication.java index ff37442cd4..5be61b972f 100644 --- a/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/SpringBootConsoleApplication.java +++ b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/SpringBootConsoleApplication.java @@ -1,22 +1,22 @@ -package com.baeldung.tomcatconnectionpool.application; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.domain.EntityScan; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -@SpringBootApplication -@EnableAutoConfiguration -@ComponentScan(basePackages={"com.baeldung.tomcatconnectionpool.application"}) -@EnableJpaRepositories(basePackages="com.baeldung.tomcatconnectionpool.application.repositories") -@EnableTransactionManagement -@EntityScan(basePackages="com.baeldung.tomcatconnectionpool.application.entities") -public class SpringBootConsoleApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootConsoleApplication.class); - } -} +package com.baeldung.tomcatconnectionpool.application; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.domain.EntityScan; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +@SpringBootApplication +@EnableAutoConfiguration +@ComponentScan(basePackages={"com.baeldung.tomcatconnectionpool.application"}) +@EnableJpaRepositories(basePackages="com.baeldung.tomcatconnectionpool.application.repositories") +@EnableTransactionManagement +@EntityScan(basePackages="com.baeldung.tomcatconnectionpool.application.entities") +public class SpringBootConsoleApplication { + + public static void main(String[] args) { + SpringApplication.run(SpringBootConsoleApplication.class); + } +} diff --git a/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/entities/Customer.java b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/entities/Customer.java similarity index 95% rename from spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/entities/Customer.java rename to persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/entities/Customer.java index 4003d5aca9..712506eb98 100644 --- a/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/entities/Customer.java +++ b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/entities/Customer.java @@ -1,53 +1,53 @@ -package com.baeldung.tomcatconnectionpool.application.entities; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; - -@Entity -@Table(name = "customers") -public class Customer { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private long id; - @Column(name = "first_name") - private String firstName; - @Column(name = "last_name") - private String lastName; - - public Customer() {} - - public Customer(String firstName, String lastName) { - this.firstName = firstName; - this.lastName = lastName; - } - - public long getId() { - return id; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - @Override - public String toString() { - return "Customer{" + "id=" + id + ", firstName=" + firstName + ", lastName=" + lastName + '}'; - } -} +package com.baeldung.tomcatconnectionpool.application.entities; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +@Entity +@Table(name = "customers") +public class Customer { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private long id; + @Column(name = "first_name") + private String firstName; + @Column(name = "last_name") + private String lastName; + + public Customer() {} + + public Customer(String firstName, String lastName) { + this.firstName = firstName; + this.lastName = lastName; + } + + public long getId() { + return id; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + @Override + public String toString() { + return "Customer{" + "id=" + id + ", firstName=" + firstName + ", lastName=" + lastName + '}'; + } +} diff --git a/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/repositories/CustomerRepository.java b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/repositories/CustomerRepository.java similarity index 97% rename from spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/repositories/CustomerRepository.java rename to persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/repositories/CustomerRepository.java index 770906439c..c461243cf8 100644 --- a/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/repositories/CustomerRepository.java +++ b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/repositories/CustomerRepository.java @@ -1,12 +1,12 @@ -package com.baeldung.tomcatconnectionpool.application.repositories; - -import com.baeldung.tomcatconnectionpool.application.entities.Customer; -import java.util.List; -import org.springframework.data.repository.CrudRepository; -import org.springframework.stereotype.Repository; - -@Repository -public interface CustomerRepository extends CrudRepository { - - List findByLastName(String lastName); -} +package com.baeldung.tomcatconnectionpool.application.repositories; + +import com.baeldung.tomcatconnectionpool.application.entities.Customer; +import java.util.List; +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface CustomerRepository extends CrudRepository { + + List findByLastName(String lastName); +} diff --git a/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/runners/CommandLineCrudRunner.java b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/runners/CommandLineCrudRunner.java similarity index 97% rename from spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/runners/CommandLineCrudRunner.java rename to persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/runners/CommandLineCrudRunner.java index 9666bac5a5..722c7582a1 100644 --- a/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/runners/CommandLineCrudRunner.java +++ b/persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/tomcatconnectionpool/application/runners/CommandLineCrudRunner.java @@ -1,37 +1,37 @@ -package com.baeldung.tomcatconnectionpool.application.runners; - -import com.baeldung.tomcatconnectionpool.application.entities.Customer; -import com.baeldung.tomcatconnectionpool.application.repositories.CustomerRepository; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.CommandLineRunner; -import org.springframework.stereotype.Component; - -@Component -public class CommandLineCrudRunner implements CommandLineRunner { - - private static final Logger logger = LoggerFactory.getLogger(CommandLineCrudRunner.class); - - @Autowired - private CustomerRepository customerRepository; - - @Override - public void run(String... args) throws Exception { - customerRepository.save(new Customer("John", "Doe")); - customerRepository.save(new Customer("Jennifer", "Wilson")); - - logger.info("Customers found with findAll():"); - customerRepository.findAll().forEach(c -> logger.info(c.toString())); - - logger.info("Customer found with findById(1L):"); - Customer customer = customerRepository.findById(1L) - .orElseGet(() -> new Customer("Non-existing customer", "")); - logger.info(customer.toString()); - - logger.info("Customer found with findByLastName('Wilson'):"); - customerRepository.findByLastName("Wilson").forEach(c -> { - logger.info(c.toString()); - }); - } -} +package com.baeldung.tomcatconnectionpool.application.runners; + +import com.baeldung.tomcatconnectionpool.application.entities.Customer; +import com.baeldung.tomcatconnectionpool.application.repositories.CustomerRepository; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.CommandLineRunner; +import org.springframework.stereotype.Component; + +@Component +public class CommandLineCrudRunner implements CommandLineRunner { + + private static final Logger logger = LoggerFactory.getLogger(CommandLineCrudRunner.class); + + @Autowired + private CustomerRepository customerRepository; + + @Override + public void run(String... args) throws Exception { + customerRepository.save(new Customer("John", "Doe")); + customerRepository.save(new Customer("Jennifer", "Wilson")); + + logger.info("Customers found with findAll():"); + customerRepository.findAll().forEach(c -> logger.info(c.toString())); + + logger.info("Customer found with findById(1L):"); + Customer customer = customerRepository.findById(1L) + .orElseGet(() -> new Customer("Non-existing customer", "")); + logger.info(customer.toString()); + + logger.info("Customer found with findByLastName('Wilson'):"); + customerRepository.findByLastName("Wilson").forEach(c -> { + logger.info(c.toString()); + }); + } +} diff --git a/spring-boot-persistence/src/main/java/org/baeldung/boot/domain/GenericEntity.java b/persistence-modules/spring-boot-persistence/src/main/java/org/baeldung/boot/domain/GenericEntity.java similarity index 100% rename from spring-boot-persistence/src/main/java/org/baeldung/boot/domain/GenericEntity.java rename to persistence-modules/spring-boot-persistence/src/main/java/org/baeldung/boot/domain/GenericEntity.java diff --git a/spring-boot-persistence/src/main/java/org/baeldung/boot/repository/GenericEntityRepository.java b/persistence-modules/spring-boot-persistence/src/main/java/org/baeldung/boot/repository/GenericEntityRepository.java similarity index 100% rename from spring-boot-persistence/src/main/java/org/baeldung/boot/repository/GenericEntityRepository.java rename to persistence-modules/spring-boot-persistence/src/main/java/org/baeldung/boot/repository/GenericEntityRepository.java diff --git a/spring-boot-persistence/src/main/resources/application.properties b/persistence-modules/spring-boot-persistence/src/main/resources/application.properties similarity index 100% rename from spring-boot-persistence/src/main/resources/application.properties rename to persistence-modules/spring-boot-persistence/src/main/resources/application.properties diff --git a/spring-boot-persistence/src/main/resources/data.sql b/persistence-modules/spring-boot-persistence/src/main/resources/data.sql similarity index 100% rename from spring-boot-persistence/src/main/resources/data.sql rename to persistence-modules/spring-boot-persistence/src/main/resources/data.sql diff --git a/spring-boot-persistence/src/main/resources/logback.xml b/persistence-modules/spring-boot-persistence/src/main/resources/logback.xml similarity index 100% rename from spring-boot-persistence/src/main/resources/logback.xml rename to persistence-modules/spring-boot-persistence/src/main/resources/logback.xml diff --git a/spring-boot-persistence/src/main/resources/persistence-generic-entity.properties b/persistence-modules/spring-boot-persistence/src/main/resources/persistence-generic-entity.properties similarity index 100% rename from spring-boot-persistence/src/main/resources/persistence-generic-entity.properties rename to persistence-modules/spring-boot-persistence/src/main/resources/persistence-generic-entity.properties diff --git a/spring-boot-persistence/src/main/resources/schema.sql b/persistence-modules/spring-boot-persistence/src/main/resources/schema.sql similarity index 100% rename from spring-boot-persistence/src/main/resources/schema.sql rename to persistence-modules/spring-boot-persistence/src/main/resources/schema.sql diff --git a/spring-boot-persistence/src/test/java/com/baeldung/SpringBootH2IntegrationTest.java b/persistence-modules/spring-boot-persistence/src/test/java/com/baeldung/SpringBootH2IntegrationTest.java similarity index 100% rename from spring-boot-persistence/src/test/java/com/baeldung/SpringBootH2IntegrationTest.java rename to persistence-modules/spring-boot-persistence/src/test/java/com/baeldung/SpringBootH2IntegrationTest.java diff --git a/spring-boot-persistence/src/test/java/com/baeldung/SpringBootJPAIntegrationTest.java b/persistence-modules/spring-boot-persistence/src/test/java/com/baeldung/SpringBootJPAIntegrationTest.java similarity index 100% rename from spring-boot-persistence/src/test/java/com/baeldung/SpringBootJPAIntegrationTest.java rename to persistence-modules/spring-boot-persistence/src/test/java/com/baeldung/SpringBootJPAIntegrationTest.java diff --git a/spring-boot-persistence/src/test/java/com/baeldung/SpringBootProfileIntegrationTest.java b/persistence-modules/spring-boot-persistence/src/test/java/com/baeldung/SpringBootProfileIntegrationTest.java similarity index 100% rename from spring-boot-persistence/src/test/java/com/baeldung/SpringBootProfileIntegrationTest.java rename to persistence-modules/spring-boot-persistence/src/test/java/com/baeldung/SpringBootProfileIntegrationTest.java diff --git a/spring-boot-persistence/src/test/java/com/baeldung/repository/UserRepositoryIntegrationTest.java b/persistence-modules/spring-boot-persistence/src/test/java/com/baeldung/repository/UserRepositoryIntegrationTest.java similarity index 100% rename from spring-boot-persistence/src/test/java/com/baeldung/repository/UserRepositoryIntegrationTest.java rename to persistence-modules/spring-boot-persistence/src/test/java/com/baeldung/repository/UserRepositoryIntegrationTest.java diff --git a/spring-boot-persistence/src/test/java/com/baeldung/tomcatconnectionpool/test/application/SpringBootTomcatConnectionPoolIntegrationTest.java b/persistence-modules/spring-boot-persistence/src/test/java/com/baeldung/tomcatconnectionpool/test/application/SpringBootTomcatConnectionPoolIntegrationTest.java similarity index 97% rename from spring-boot-persistence/src/test/java/com/baeldung/tomcatconnectionpool/test/application/SpringBootTomcatConnectionPoolIntegrationTest.java rename to persistence-modules/spring-boot-persistence/src/test/java/com/baeldung/tomcatconnectionpool/test/application/SpringBootTomcatConnectionPoolIntegrationTest.java index c68e137fb0..eb000bbc09 100644 --- a/spring-boot-persistence/src/test/java/com/baeldung/tomcatconnectionpool/test/application/SpringBootTomcatConnectionPoolIntegrationTest.java +++ b/persistence-modules/spring-boot-persistence/src/test/java/com/baeldung/tomcatconnectionpool/test/application/SpringBootTomcatConnectionPoolIntegrationTest.java @@ -1,22 +1,22 @@ -package com.baeldung.tomcatconnectionpool.test.application; - -import javax.sql.DataSource; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.junit4.SpringRunner; -import static org.assertj.core.api.Assertions.*; -import org.springframework.boot.test.context.SpringBootTest; - -@RunWith(SpringRunner.class) -@SpringBootTest -public class SpringBootTomcatConnectionPoolIntegrationTest { - - @Autowired - private DataSource dataSource; - - @Test - public void givenTomcatConnectionPoolInstance_whenCheckedPoolClassName_thenCorrect() { - assertThat(dataSource.getClass().getName()).isEqualTo("org.apache.tomcat.jdbc.pool.DataSource"); - } -} +package com.baeldung.tomcatconnectionpool.test.application; + +import javax.sql.DataSource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.junit4.SpringRunner; +import static org.assertj.core.api.Assertions.*; +import org.springframework.boot.test.context.SpringBootTest; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class SpringBootTomcatConnectionPoolIntegrationTest { + + @Autowired + private DataSource dataSource; + + @Test + public void givenTomcatConnectionPoolInstance_whenCheckedPoolClassName_thenCorrect() { + assertThat(dataSource.getClass().getName()).isEqualTo("org.apache.tomcat.jdbc.pool.DataSource"); + } +} diff --git a/spring-boot-persistence/src/test/java/org/baeldung/config/H2TestProfileJPAConfig.java b/persistence-modules/spring-boot-persistence/src/test/java/org/baeldung/config/H2TestProfileJPAConfig.java similarity index 100% rename from spring-boot-persistence/src/test/java/org/baeldung/config/H2TestProfileJPAConfig.java rename to persistence-modules/spring-boot-persistence/src/test/java/org/baeldung/config/H2TestProfileJPAConfig.java diff --git a/spring-boot-persistence/src/test/resources/application.properties b/persistence-modules/spring-boot-persistence/src/test/resources/application.properties similarity index 100% rename from spring-boot-persistence/src/test/resources/application.properties rename to persistence-modules/spring-boot-persistence/src/test/resources/application.properties diff --git a/spring-boot-persistence/src/test/resources/import_active_users.sql b/persistence-modules/spring-boot-persistence/src/test/resources/import_active_users.sql similarity index 100% rename from spring-boot-persistence/src/test/resources/import_active_users.sql rename to persistence-modules/spring-boot-persistence/src/test/resources/import_active_users.sql diff --git a/spring-boot-persistence/src/test/resources/import_inactive_users.sql b/persistence-modules/spring-boot-persistence/src/test/resources/import_inactive_users.sql similarity index 100% rename from spring-boot-persistence/src/test/resources/import_inactive_users.sql rename to persistence-modules/spring-boot-persistence/src/test/resources/import_inactive_users.sql diff --git a/spring-boot-persistence/src/test/resources/migrated_users.sql b/persistence-modules/spring-boot-persistence/src/test/resources/migrated_users.sql similarity index 100% rename from spring-boot-persistence/src/test/resources/migrated_users.sql rename to persistence-modules/spring-boot-persistence/src/test/resources/migrated_users.sql diff --git a/spring-data-elasticsearch/README.md b/persistence-modules/spring-data-elasticsearch/README.md similarity index 100% rename from spring-data-elasticsearch/README.md rename to persistence-modules/spring-data-elasticsearch/README.md diff --git a/spring-data-elasticsearch/pom.xml b/persistence-modules/spring-data-elasticsearch/pom.xml similarity index 98% rename from spring-data-elasticsearch/pom.xml rename to persistence-modules/spring-data-elasticsearch/pom.xml index 99d8a70807..ee9e71a1cb 100644 --- a/spring-data-elasticsearch/pom.xml +++ b/persistence-modules/spring-data-elasticsearch/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-spring-5 0.0.1-SNAPSHOT - ../parent-spring-5 + ../../parent-spring-5 diff --git a/spring-data-elasticsearch/src/main/java/com/baeldung/elasticsearch/Person.java b/persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/elasticsearch/Person.java similarity index 100% rename from spring-data-elasticsearch/src/main/java/com/baeldung/elasticsearch/Person.java rename to persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/elasticsearch/Person.java diff --git a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/config/Config.java b/persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/config/Config.java similarity index 100% rename from spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/config/Config.java rename to persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/config/Config.java diff --git a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/model/Article.java b/persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/model/Article.java similarity index 100% rename from spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/model/Article.java rename to persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/model/Article.java diff --git a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/model/Author.java b/persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/model/Author.java similarity index 100% rename from spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/model/Author.java rename to persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/model/Author.java diff --git a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/repository/ArticleRepository.java b/persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/repository/ArticleRepository.java similarity index 100% rename from spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/repository/ArticleRepository.java rename to persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/repository/ArticleRepository.java diff --git a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/service/ArticleService.java b/persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/service/ArticleService.java similarity index 100% rename from spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/service/ArticleService.java rename to persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/service/ArticleService.java diff --git a/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/service/ArticleServiceImpl.java b/persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/service/ArticleServiceImpl.java similarity index 100% rename from spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/service/ArticleServiceImpl.java rename to persistence-modules/spring-data-elasticsearch/src/main/java/com/baeldung/spring/data/es/service/ArticleServiceImpl.java diff --git a/spring-data-elasticsearch/src/main/resources/log4j2.properties b/persistence-modules/spring-data-elasticsearch/src/main/resources/log4j2.properties similarity index 100% rename from spring-data-elasticsearch/src/main/resources/log4j2.properties rename to persistence-modules/spring-data-elasticsearch/src/main/resources/log4j2.properties diff --git a/spring-data-elasticsearch/src/test/java/com/baeldung/elasticsearch/ElasticSearchManualTest.java b/persistence-modules/spring-data-elasticsearch/src/test/java/com/baeldung/elasticsearch/ElasticSearchManualTest.java similarity index 100% rename from spring-data-elasticsearch/src/test/java/com/baeldung/elasticsearch/ElasticSearchManualTest.java rename to persistence-modules/spring-data-elasticsearch/src/test/java/com/baeldung/elasticsearch/ElasticSearchManualTest.java diff --git a/spring-data-elasticsearch/src/test/java/com/baeldung/elasticsearch/GeoQueriesIntegrationTest.java b/persistence-modules/spring-data-elasticsearch/src/test/java/com/baeldung/elasticsearch/GeoQueriesIntegrationTest.java similarity index 100% rename from spring-data-elasticsearch/src/test/java/com/baeldung/elasticsearch/GeoQueriesIntegrationTest.java rename to persistence-modules/spring-data-elasticsearch/src/test/java/com/baeldung/elasticsearch/GeoQueriesIntegrationTest.java diff --git a/spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchIntegrationTest.java b/persistence-modules/spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchIntegrationTest.java similarity index 100% rename from spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchIntegrationTest.java rename to persistence-modules/spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchIntegrationTest.java diff --git a/spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchQueryIntegrationTest.java b/persistence-modules/spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchQueryIntegrationTest.java similarity index 100% rename from spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchQueryIntegrationTest.java rename to persistence-modules/spring-data-elasticsearch/src/test/java/com/baeldung/spring/data/es/ElasticSearchQueryIntegrationTest.java diff --git a/spring-data-elasticsearch/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/persistence-modules/spring-data-elasticsearch/src/test/java/org/baeldung/SpringContextIntegrationTest.java similarity index 100% rename from spring-data-elasticsearch/src/test/java/org/baeldung/SpringContextIntegrationTest.java rename to persistence-modules/spring-data-elasticsearch/src/test/java/org/baeldung/SpringContextIntegrationTest.java diff --git a/spring-data-jpa/README.md b/persistence-modules/spring-data-jpa/README.md similarity index 100% rename from spring-data-jpa/README.md rename to persistence-modules/spring-data-jpa/README.md diff --git a/spring-data-jpa/pom.xml b/persistence-modules/spring-data-jpa/pom.xml similarity index 96% rename from spring-data-jpa/pom.xml rename to persistence-modules/spring-data-jpa/pom.xml index 8691ce1f09..643210ab89 100644 --- a/spring-data-jpa/pom.xml +++ b/persistence-modules/spring-data-jpa/pom.xml @@ -2,15 +2,16 @@ + 4.0.0 + com.baeldung + spring-data-jpa + parent-boot-2 com.baeldung 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 - 4.0.0 - - spring-data-jpa diff --git a/spring-data-jpa/src/main/java/com/baeldung/Application.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/Application.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/Application.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/Application.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/config/PersistenceConfiguration.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/config/PersistenceConfiguration.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/config/PersistenceConfiguration.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/config/PersistenceConfiguration.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/config/PersistenceProductConfiguration.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/config/PersistenceProductConfiguration.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/config/PersistenceProductConfiguration.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/config/PersistenceProductConfiguration.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/config/PersistenceUserConfiguration.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/config/PersistenceUserConfiguration.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/config/PersistenceUserConfiguration.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/config/PersistenceUserConfiguration.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/IFooDao.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/IFooDao.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/IFooDao.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/IFooDao.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ArticleRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ArticleRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ArticleRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ArticleRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/CustomItemRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/CustomItemRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/CustomItemRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/CustomItemRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/CustomItemTypeRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/CustomItemTypeRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/CustomItemTypeRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/CustomItemTypeRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ExtendedRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ExtendedRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ExtendedRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ExtendedRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ExtendedStudentRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ExtendedStudentRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ExtendedStudentRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ExtendedStudentRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/IBarCrudRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/IBarCrudRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/IBarCrudRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/IBarCrudRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/InventoryRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/InventoryRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/InventoryRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/InventoryRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ItemTypeRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ItemTypeRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ItemTypeRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ItemTypeRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/LocationRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/LocationRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/LocationRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/LocationRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ReadOnlyLocationRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ReadOnlyLocationRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ReadOnlyLocationRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/ReadOnlyLocationRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/StoreRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/StoreRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/StoreRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/StoreRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/impl/CustomItemRepositoryImpl.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/impl/CustomItemRepositoryImpl.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/impl/CustomItemRepositoryImpl.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/impl/CustomItemRepositoryImpl.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/impl/CustomItemTypeRepositoryImpl.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/impl/CustomItemTypeRepositoryImpl.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/impl/CustomItemTypeRepositoryImpl.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/impl/CustomItemTypeRepositoryImpl.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/impl/ExtendedRepositoryImpl.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/impl/ExtendedRepositoryImpl.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/impl/ExtendedRepositoryImpl.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/impl/ExtendedRepositoryImpl.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/product/ProductRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/product/ProductRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/product/ProductRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/product/ProductRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/user/PossessionRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/user/PossessionRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/user/PossessionRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/user/PossessionRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/user/UserRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/user/UserRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/dao/repositories/user/UserRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/dao/repositories/user/UserRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate2.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate2.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate2.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate2.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate2Repository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate2Repository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate2Repository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate2Repository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate3.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate3.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate3.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate3.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate3Repository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate3Repository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate3Repository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/Aggregate3Repository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/ddd/event/AggregateRepository.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/AggregateRepository.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/ddd/event/AggregateRepository.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/AggregateRepository.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/ddd/event/DddConfig.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/DddConfig.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/ddd/event/DddConfig.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/DddConfig.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/ddd/event/DomainEvent.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/DomainEvent.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/ddd/event/DomainEvent.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/DomainEvent.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/ddd/event/DomainService.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/DomainService.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/ddd/event/DomainService.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/ddd/event/DomainService.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/Article.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Article.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/domain/Article.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Article.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/Bar.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Bar.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/domain/Bar.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Bar.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/Foo.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Foo.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/domain/Foo.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Foo.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/Item.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Item.java similarity index 94% rename from spring-data-jpa/src/main/java/com/baeldung/domain/Item.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Item.java index 97ce14d92d..1e58fb25ba 100644 --- a/spring-data-jpa/src/main/java/com/baeldung/domain/Item.java +++ b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Item.java @@ -1,81 +1,81 @@ -package com.baeldung.domain; - -import java.math.BigDecimal; - -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.ManyToOne; - -@Entity -public class Item { - - private String color; - private String grade; - - @Id - private Long id; - - @ManyToOne - private ItemType itemType; - - private String name; - private BigDecimal price; - @ManyToOne - private Store store; - - public String getColor() { - return color; - } - - public String getGrade() { - return grade; - } - - public Long getId() { - return id; - } - - public ItemType getItemType() { - return itemType; - } - - public String getName() { - return name; - } - - public BigDecimal getPrice() { - return price; - } - - public Store getStore() { - return store; - } - - public void setColor(String color) { - this.color = color; - } - - public void setGrade(String grade) { - this.grade = grade; - } - - public void setId(Long id) { - this.id = id; - } - - public void setItemType(ItemType itemType) { - this.itemType = itemType; - } - - public void setName(String name) { - this.name = name; - } - - public void setPrice(BigDecimal price) { - this.price = price; - } - - public void setStore(Store store) { - this.store = store; - } -} +package com.baeldung.domain; + +import java.math.BigDecimal; + +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.ManyToOne; + +@Entity +public class Item { + + private String color; + private String grade; + + @Id + private Long id; + + @ManyToOne + private ItemType itemType; + + private String name; + private BigDecimal price; + @ManyToOne + private Store store; + + public String getColor() { + return color; + } + + public String getGrade() { + return grade; + } + + public Long getId() { + return id; + } + + public ItemType getItemType() { + return itemType; + } + + public String getName() { + return name; + } + + public BigDecimal getPrice() { + return price; + } + + public Store getStore() { + return store; + } + + public void setColor(String color) { + this.color = color; + } + + public void setGrade(String grade) { + this.grade = grade; + } + + public void setId(Long id) { + this.id = id; + } + + public void setItemType(ItemType itemType) { + this.itemType = itemType; + } + + public void setName(String name) { + this.name = name; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + + public void setStore(Store store) { + this.store = store; + } +} diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/ItemType.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/ItemType.java similarity index 94% rename from spring-data-jpa/src/main/java/com/baeldung/domain/ItemType.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/ItemType.java index 412079c2ae..b0349e0471 100644 --- a/spring-data-jpa/src/main/java/com/baeldung/domain/ItemType.java +++ b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/ItemType.java @@ -1,46 +1,46 @@ -package com.baeldung.domain; - -import java.util.ArrayList; -import java.util.List; - -import javax.persistence.CascadeType; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.OneToMany; - -@Entity -public class ItemType { - - @Id - private Long id; - @OneToMany(cascade = CascadeType.ALL) - @JoinColumn(name = "ITEM_TYPE_ID") - private List items = new ArrayList<>(); - - private String name; - - public Long getId() { - return id; - } - - public List getItems() { - return items; - } - - public String getName() { - return name; - } - - public void setId(Long id) { - this.id = id; - } - - public void setItems(List items) { - this.items = items; - } - - public void setName(String name) { - this.name = name; - } -} +package com.baeldung.domain; + +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToMany; + +@Entity +public class ItemType { + + @Id + private Long id; + @OneToMany(cascade = CascadeType.ALL) + @JoinColumn(name = "ITEM_TYPE_ID") + private List items = new ArrayList<>(); + + private String name; + + public Long getId() { + return id; + } + + public List getItems() { + return items; + } + + public String getName() { + return name; + } + + public void setId(Long id) { + this.id = id; + } + + public void setItems(List items) { + this.items = items; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/KVTag.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/KVTag.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/domain/KVTag.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/KVTag.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/Location.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Location.java similarity index 95% rename from spring-data-jpa/src/main/java/com/baeldung/domain/Location.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Location.java index 2178d378eb..4ca7295986 100644 --- a/spring-data-jpa/src/main/java/com/baeldung/domain/Location.java +++ b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Location.java @@ -1,55 +1,55 @@ -package com.baeldung.domain; - -import java.util.ArrayList; -import java.util.List; - -import javax.persistence.CascadeType; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.OneToMany; - -@Entity -public class Location { - - private String city; - private String country; - @Id - private Long id; - - @OneToMany(cascade = CascadeType.ALL) - @JoinColumn(name = "LOCATION_ID") - private List stores = new ArrayList<>(); - - public String getCity() { - return city; - } - - public String getCountry() { - return country; - } - - public Long getId() { - return id; - } - - public List getStores() { - return stores; - } - - public void setCity(String city) { - this.city = city; - } - - public void setCountry(String country) { - this.country = country; - } - - public void setId(Long id) { - this.id = id; - } - - public void setStores(List stores) { - this.stores = stores; - } -} +package com.baeldung.domain; + +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToMany; + +@Entity +public class Location { + + private String city; + private String country; + @Id + private Long id; + + @OneToMany(cascade = CascadeType.ALL) + @JoinColumn(name = "LOCATION_ID") + private List stores = new ArrayList<>(); + + public String getCity() { + return city; + } + + public String getCountry() { + return country; + } + + public Long getId() { + return id; + } + + public List getStores() { + return stores; + } + + public void setCity(String city) { + this.city = city; + } + + public void setCountry(String country) { + this.country = country; + } + + public void setId(Long id) { + this.id = id; + } + + public void setStores(List stores) { + this.stores = stores; + } +} diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/MerchandiseEntity.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/MerchandiseEntity.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/domain/MerchandiseEntity.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/MerchandiseEntity.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/SkillTag.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/SkillTag.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/domain/SkillTag.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/SkillTag.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/Store.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Store.java similarity index 95% rename from spring-data-jpa/src/main/java/com/baeldung/domain/Store.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Store.java index e04684c479..4172051c71 100644 --- a/spring-data-jpa/src/main/java/com/baeldung/domain/Store.java +++ b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Store.java @@ -1,76 +1,76 @@ -package com.baeldung.domain; - -import java.util.ArrayList; -import java.util.List; - -import javax.persistence.CascadeType; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; - -@Entity -public class Store { - - private Boolean active; - @Id - private Long id; - @OneToMany(cascade = CascadeType.ALL) - @JoinColumn(name = "STORE_ID") - private List items = new ArrayList<>(); - private Long itemsSold; - - @ManyToOne - private Location location; - - private String name; - - public Boolean getActive() { - return active; - } - - public Long getId() { - return id; - } - - public List getItems() { - return items; - } - - public Long getItemsSold() { - return itemsSold; - } - - public Location getLocation() { - return location; - } - - public String getName() { - return name; - } - - public void setActive(Boolean active) { - this.active = active; - } - - public void setId(Long id) { - this.id = id; - } - - public void setItems(List items) { - this.items = items; - } - - public void setItemsSold(Long itemsSold) { - this.itemsSold = itemsSold; - } - - public void setLocation(Location location) { - this.location = location; - } - - public void setName(String name) { - this.name = name; - } -} +package com.baeldung.domain; + +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; + +@Entity +public class Store { + + private Boolean active; + @Id + private Long id; + @OneToMany(cascade = CascadeType.ALL) + @JoinColumn(name = "STORE_ID") + private List items = new ArrayList<>(); + private Long itemsSold; + + @ManyToOne + private Location location; + + private String name; + + public Boolean getActive() { + return active; + } + + public Long getId() { + return id; + } + + public List getItems() { + return items; + } + + public Long getItemsSold() { + return itemsSold; + } + + public Location getLocation() { + return location; + } + + public String getName() { + return name; + } + + public void setActive(Boolean active) { + this.active = active; + } + + public void setId(Long id) { + this.id = id; + } + + public void setItems(List items) { + this.items = items; + } + + public void setItemsSold(Long itemsSold) { + this.itemsSold = itemsSold; + } + + public void setLocation(Location location) { + this.location = location; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/Student.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Student.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/domain/Student.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/Student.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/product/Product.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/product/Product.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/domain/product/Product.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/product/Product.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/user/Possession.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/user/Possession.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/domain/user/Possession.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/user/Possession.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/domain/user/User.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/user/User.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/domain/user/User.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/domain/user/User.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/services/IBarService.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/IBarService.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/services/IBarService.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/IBarService.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/services/IFooService.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/IFooService.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/services/IFooService.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/IFooService.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/services/IOperations.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/IOperations.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/services/IOperations.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/IOperations.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/services/impl/AbstractService.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/impl/AbstractService.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/services/impl/AbstractService.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/impl/AbstractService.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/services/impl/AbstractSpringDataJpaService.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/impl/AbstractSpringDataJpaService.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/services/impl/AbstractSpringDataJpaService.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/impl/AbstractSpringDataJpaService.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/services/impl/BarSpringDataJpaService.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/impl/BarSpringDataJpaService.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/services/impl/BarSpringDataJpaService.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/impl/BarSpringDataJpaService.java diff --git a/spring-data-jpa/src/main/java/com/baeldung/services/impl/FooService.java b/persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/impl/FooService.java similarity index 100% rename from spring-data-jpa/src/main/java/com/baeldung/services/impl/FooService.java rename to persistence-modules/spring-data-jpa/src/main/java/com/baeldung/services/impl/FooService.java diff --git a/spring-data-jpa/src/main/resources/application.properties b/persistence-modules/spring-data-jpa/src/main/resources/application.properties similarity index 100% rename from spring-data-jpa/src/main/resources/application.properties rename to persistence-modules/spring-data-jpa/src/main/resources/application.properties diff --git a/spring-data-jpa/src/main/resources/ddd.properties b/persistence-modules/spring-data-jpa/src/main/resources/ddd.properties similarity index 100% rename from spring-data-jpa/src/main/resources/ddd.properties rename to persistence-modules/spring-data-jpa/src/main/resources/ddd.properties diff --git a/spring-data-jpa/src/main/resources/logback.xml b/persistence-modules/spring-data-jpa/src/main/resources/logback.xml similarity index 100% rename from spring-data-jpa/src/main/resources/logback.xml rename to persistence-modules/spring-data-jpa/src/main/resources/logback.xml diff --git a/spring-data-jpa/src/main/resources/persistence-multiple-db.properties b/persistence-modules/spring-data-jpa/src/main/resources/persistence-multiple-db.properties similarity index 100% rename from spring-data-jpa/src/main/resources/persistence-multiple-db.properties rename to persistence-modules/spring-data-jpa/src/main/resources/persistence-multiple-db.properties diff --git a/spring-data-jpa/src/main/resources/persistence.properties b/persistence-modules/spring-data-jpa/src/main/resources/persistence.properties similarity index 100% rename from spring-data-jpa/src/main/resources/persistence.properties rename to persistence-modules/spring-data-jpa/src/main/resources/persistence.properties diff --git a/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/ArticleRepositoryIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/ArticleRepositoryIntegrationTest.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/dao/repositories/ArticleRepositoryIntegrationTest.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/ArticleRepositoryIntegrationTest.java diff --git a/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/ExtendedStudentRepositoryIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/ExtendedStudentRepositoryIntegrationTest.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/dao/repositories/ExtendedStudentRepositoryIntegrationTest.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/ExtendedStudentRepositoryIntegrationTest.java diff --git a/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/InventoryRepositoryIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/InventoryRepositoryIntegrationTest.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/dao/repositories/InventoryRepositoryIntegrationTest.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/InventoryRepositoryIntegrationTest.java diff --git a/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/JpaRepositoriesIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/JpaRepositoriesIntegrationTest.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/dao/repositories/JpaRepositoriesIntegrationTest.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/JpaRepositoriesIntegrationTest.java diff --git a/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/UserRepositoryIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/UserRepositoryIntegrationTest.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/dao/repositories/UserRepositoryIntegrationTest.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/dao/repositories/UserRepositoryIntegrationTest.java diff --git a/spring-data-jpa/src/test/java/com/baeldung/ddd/event/Aggregate2EventsIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/ddd/event/Aggregate2EventsIntegrationTest.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/ddd/event/Aggregate2EventsIntegrationTest.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/ddd/event/Aggregate2EventsIntegrationTest.java diff --git a/spring-data-jpa/src/test/java/com/baeldung/ddd/event/Aggregate3EventsIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/ddd/event/Aggregate3EventsIntegrationTest.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/ddd/event/Aggregate3EventsIntegrationTest.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/ddd/event/Aggregate3EventsIntegrationTest.java diff --git a/spring-data-jpa/src/test/java/com/baeldung/ddd/event/AggregateEventsIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/ddd/event/AggregateEventsIntegrationTest.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/ddd/event/AggregateEventsIntegrationTest.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/ddd/event/AggregateEventsIntegrationTest.java diff --git a/spring-data-jpa/src/test/java/com/baeldung/ddd/event/TestEventHandler.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/ddd/event/TestEventHandler.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/ddd/event/TestEventHandler.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/ddd/event/TestEventHandler.java diff --git a/spring-data-jpa/src/test/java/com/baeldung/services/AbstractServicePersistenceIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/services/AbstractServicePersistenceIntegrationTest.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/services/AbstractServicePersistenceIntegrationTest.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/services/AbstractServicePersistenceIntegrationTest.java diff --git a/spring-data-jpa/src/test/java/com/baeldung/services/FooServicePersistenceIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/services/FooServicePersistenceIntegrationTest.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/services/FooServicePersistenceIntegrationTest.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/services/FooServicePersistenceIntegrationTest.java diff --git a/spring-data-jpa/src/test/java/com/baeldung/services/JpaMultipleDBIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/services/JpaMultipleDBIntegrationTest.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/services/JpaMultipleDBIntegrationTest.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/services/JpaMultipleDBIntegrationTest.java diff --git a/spring-data-jpa/src/test/java/com/baeldung/services/SpringDataJPABarAuditIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/services/SpringDataJPABarAuditIntegrationTest.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/services/SpringDataJPABarAuditIntegrationTest.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/services/SpringDataJPABarAuditIntegrationTest.java diff --git a/spring-data-jpa/src/test/java/com/baeldung/util/IDUtil.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/util/IDUtil.java similarity index 100% rename from spring-data-jpa/src/test/java/com/baeldung/util/IDUtil.java rename to persistence-modules/spring-data-jpa/src/test/java/com/baeldung/util/IDUtil.java diff --git a/spring-data-jpa/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/persistence-modules/spring-data-jpa/src/test/java/org/baeldung/SpringContextIntegrationTest.java similarity index 100% rename from spring-data-jpa/src/test/java/org/baeldung/SpringContextIntegrationTest.java rename to persistence-modules/spring-data-jpa/src/test/java/org/baeldung/SpringContextIntegrationTest.java diff --git a/spring-data-jpa/src/test/resources/import_entities.sql b/persistence-modules/spring-data-jpa/src/test/resources/import_entities.sql similarity index 100% rename from spring-data-jpa/src/test/resources/import_entities.sql rename to persistence-modules/spring-data-jpa/src/test/resources/import_entities.sql diff --git a/spring-data-keyvalue/README.md b/persistence-modules/spring-data-keyvalue/README.md similarity index 100% rename from spring-data-keyvalue/README.md rename to persistence-modules/spring-data-keyvalue/README.md diff --git a/spring-data-keyvalue/pom.xml b/persistence-modules/spring-data-keyvalue/pom.xml similarity index 94% rename from spring-data-keyvalue/pom.xml rename to persistence-modules/spring-data-keyvalue/pom.xml index edd8967b97..6675595f2b 100644 --- a/spring-data-keyvalue/pom.xml +++ b/persistence-modules/spring-data-keyvalue/pom.xml @@ -7,7 +7,7 @@ parent-boot-2 com.baeldung 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/Configurations.java b/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/Configurations.java similarity index 100% rename from spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/Configurations.java rename to persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/Configurations.java diff --git a/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/SpringDataKeyValueApplication.java b/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/SpringDataKeyValueApplication.java similarity index 100% rename from spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/SpringDataKeyValueApplication.java rename to persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/SpringDataKeyValueApplication.java diff --git a/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/repositories/EmployeeRepository.java b/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/repositories/EmployeeRepository.java similarity index 100% rename from spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/repositories/EmployeeRepository.java rename to persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/repositories/EmployeeRepository.java diff --git a/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/EmployeeService.java b/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/EmployeeService.java similarity index 100% rename from spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/EmployeeService.java rename to persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/EmployeeService.java diff --git a/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java b/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java similarity index 100% rename from spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java rename to persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java diff --git a/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithRepository.java b/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithRepository.java similarity index 100% rename from spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithRepository.java rename to persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithRepository.java diff --git a/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/vo/Employee.java b/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/vo/Employee.java similarity index 100% rename from spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/vo/Employee.java rename to persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/vo/Employee.java diff --git a/spring-data-keyvalue/src/main/resources/logback.xml b/persistence-modules/spring-data-keyvalue/src/main/resources/logback.xml similarity index 100% rename from spring-data-keyvalue/src/main/resources/logback.xml rename to persistence-modules/spring-data-keyvalue/src/main/resources/logback.xml diff --git a/spring-data-keyvalue/src/test/java/com/baeldung/spring/data/keyvalue/services/test/EmployeeServicesWithKeyValueRepositoryIntegrationTest.java b/persistence-modules/spring-data-keyvalue/src/test/java/com/baeldung/spring/data/keyvalue/services/test/EmployeeServicesWithKeyValueRepositoryIntegrationTest.java similarity index 100% rename from spring-data-keyvalue/src/test/java/com/baeldung/spring/data/keyvalue/services/test/EmployeeServicesWithKeyValueRepositoryIntegrationTest.java rename to persistence-modules/spring-data-keyvalue/src/test/java/com/baeldung/spring/data/keyvalue/services/test/EmployeeServicesWithKeyValueRepositoryIntegrationTest.java diff --git a/spring-data-keyvalue/src/test/java/com/baeldung/spring/data/keyvalue/services/test/EmployeeServicesWithRepositoryIntegrationTest.java b/persistence-modules/spring-data-keyvalue/src/test/java/com/baeldung/spring/data/keyvalue/services/test/EmployeeServicesWithRepositoryIntegrationTest.java similarity index 100% rename from spring-data-keyvalue/src/test/java/com/baeldung/spring/data/keyvalue/services/test/EmployeeServicesWithRepositoryIntegrationTest.java rename to persistence-modules/spring-data-keyvalue/src/test/java/com/baeldung/spring/data/keyvalue/services/test/EmployeeServicesWithRepositoryIntegrationTest.java diff --git a/spring-data-keyvalue/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/persistence-modules/spring-data-keyvalue/src/test/java/org/baeldung/SpringContextIntegrationTest.java similarity index 100% rename from spring-data-keyvalue/src/test/java/org/baeldung/SpringContextIntegrationTest.java rename to persistence-modules/spring-data-keyvalue/src/test/java/org/baeldung/SpringContextIntegrationTest.java diff --git a/spring-data-mongodb/README.md b/persistence-modules/spring-data-mongodb/README.md similarity index 100% rename from spring-data-mongodb/README.md rename to persistence-modules/spring-data-mongodb/README.md diff --git a/spring-data-mongodb/pom.xml b/persistence-modules/spring-data-mongodb/pom.xml similarity index 98% rename from spring-data-mongodb/pom.xml rename to persistence-modules/spring-data-mongodb/pom.xml index 072ed7a2ac..466acf5a43 100644 --- a/spring-data-mongodb/pom.xml +++ b/persistence-modules/spring-data-mongodb/pom.xml @@ -10,7 +10,7 @@ com.baeldung parent-spring-5 0.0.1-SNAPSHOT - ../parent-spring-5 + ../../parent-spring-5 diff --git a/spring-data-mongodb/src/main/java/com/baeldung/annotation/CascadeSave.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/annotation/CascadeSave.java similarity index 100% rename from spring-data-mongodb/src/main/java/com/baeldung/annotation/CascadeSave.java rename to persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/annotation/CascadeSave.java diff --git a/spring-data-mongodb/src/main/java/com/baeldung/config/MongoConfig.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/config/MongoConfig.java similarity index 100% rename from spring-data-mongodb/src/main/java/com/baeldung/config/MongoConfig.java rename to persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/config/MongoConfig.java diff --git a/spring-data-mongodb/src/main/java/com/baeldung/config/MongoReactiveConfig.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/config/MongoReactiveConfig.java similarity index 100% rename from spring-data-mongodb/src/main/java/com/baeldung/config/MongoReactiveConfig.java rename to persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/config/MongoReactiveConfig.java diff --git a/spring-data-mongodb/src/main/java/com/baeldung/config/SimpleMongoConfig.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/config/SimpleMongoConfig.java similarity index 100% rename from spring-data-mongodb/src/main/java/com/baeldung/config/SimpleMongoConfig.java rename to persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/config/SimpleMongoConfig.java diff --git a/spring-data-mongodb/src/main/java/com/baeldung/converter/UserWriterConverter.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/converter/UserWriterConverter.java similarity index 100% rename from spring-data-mongodb/src/main/java/com/baeldung/converter/UserWriterConverter.java rename to persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/converter/UserWriterConverter.java diff --git a/spring-data-mongodb/src/main/java/com/baeldung/event/CascadeCallback.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/event/CascadeCallback.java similarity index 100% rename from spring-data-mongodb/src/main/java/com/baeldung/event/CascadeCallback.java rename to persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/event/CascadeCallback.java diff --git a/spring-data-mongodb/src/main/java/com/baeldung/event/CascadeSaveMongoEventListener.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/event/CascadeSaveMongoEventListener.java similarity index 100% rename from spring-data-mongodb/src/main/java/com/baeldung/event/CascadeSaveMongoEventListener.java rename to persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/event/CascadeSaveMongoEventListener.java diff --git a/spring-data-mongodb/src/main/java/com/baeldung/event/FieldCallback.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/event/FieldCallback.java similarity index 100% rename from spring-data-mongodb/src/main/java/com/baeldung/event/FieldCallback.java rename to persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/event/FieldCallback.java diff --git a/spring-data-mongodb/src/main/java/com/baeldung/event/UserCascadeSaveMongoEventListener.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/event/UserCascadeSaveMongoEventListener.java similarity index 100% rename from spring-data-mongodb/src/main/java/com/baeldung/event/UserCascadeSaveMongoEventListener.java rename to persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/event/UserCascadeSaveMongoEventListener.java diff --git a/spring-data-mongodb/src/main/java/com/baeldung/model/EmailAddress.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/model/EmailAddress.java similarity index 100% rename from spring-data-mongodb/src/main/java/com/baeldung/model/EmailAddress.java rename to persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/model/EmailAddress.java diff --git a/spring-data-mongodb/src/main/java/com/baeldung/model/User.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/model/User.java similarity index 100% rename from spring-data-mongodb/src/main/java/com/baeldung/model/User.java rename to persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/model/User.java diff --git a/spring-data-mongodb/src/main/java/com/baeldung/reactive/repository/UserRepository.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/reactive/repository/UserRepository.java similarity index 100% rename from spring-data-mongodb/src/main/java/com/baeldung/reactive/repository/UserRepository.java rename to persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/reactive/repository/UserRepository.java diff --git a/spring-data-mongodb/src/main/java/com/baeldung/repository/UserRepository.java b/persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/repository/UserRepository.java similarity index 100% rename from spring-data-mongodb/src/main/java/com/baeldung/repository/UserRepository.java rename to persistence-modules/spring-data-mongodb/src/main/java/com/baeldung/repository/UserRepository.java diff --git a/spring-data-mongodb/src/main/resources/logback.xml b/persistence-modules/spring-data-mongodb/src/main/resources/logback.xml similarity index 100% rename from spring-data-mongodb/src/main/resources/logback.xml rename to persistence-modules/spring-data-mongodb/src/main/resources/logback.xml diff --git a/spring-data-mongodb/src/main/resources/mongoConfig.xml b/persistence-modules/spring-data-mongodb/src/main/resources/mongoConfig.xml similarity index 100% rename from spring-data-mongodb/src/main/resources/mongoConfig.xml rename to persistence-modules/spring-data-mongodb/src/main/resources/mongoConfig.xml diff --git a/spring-data-mongodb/src/main/resources/test.png b/persistence-modules/spring-data-mongodb/src/main/resources/test.png similarity index 100% rename from spring-data-mongodb/src/main/resources/test.png rename to persistence-modules/spring-data-mongodb/src/main/resources/test.png diff --git a/spring-data-mongodb/src/test/java/com/baeldung/aggregation/ZipsAggregationLiveTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/aggregation/ZipsAggregationLiveTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/aggregation/ZipsAggregationLiveTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/aggregation/ZipsAggregationLiveTest.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/aggregation/model/StatePopulation.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/aggregation/model/StatePopulation.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/aggregation/model/StatePopulation.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/aggregation/model/StatePopulation.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/gridfs/GridFSLiveTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/gridfs/GridFSLiveTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/gridfs/GridFSLiveTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/gridfs/GridFSLiveTest.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/mongotemplate/DocumentQueryLiveTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/mongotemplate/DocumentQueryLiveTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/mongotemplate/DocumentQueryLiveTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/mongotemplate/DocumentQueryLiveTest.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/mongotemplate/MongoTemplateProjectionLiveTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/mongotemplate/MongoTemplateProjectionLiveTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/mongotemplate/MongoTemplateProjectionLiveTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/mongotemplate/MongoTemplateProjectionLiveTest.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/mongotemplate/MongoTemplateQueryLiveTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/mongotemplate/MongoTemplateQueryLiveTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/mongotemplate/MongoTemplateQueryLiveTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/mongotemplate/MongoTemplateQueryLiveTest.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/repository/BaseQueryLiveTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/BaseQueryLiveTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/repository/BaseQueryLiveTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/BaseQueryLiveTest.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/repository/DSLQueryLiveTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/DSLQueryLiveTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/repository/DSLQueryLiveTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/DSLQueryLiveTest.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/repository/JSONQueryLiveTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/JSONQueryLiveTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/repository/JSONQueryLiveTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/JSONQueryLiveTest.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/repository/QueryMethodsLiveTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/QueryMethodsLiveTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/repository/QueryMethodsLiveTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/QueryMethodsLiveTest.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/repository/UserRepositoryLiveTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/UserRepositoryLiveTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/repository/UserRepositoryLiveTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/UserRepositoryLiveTest.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/repository/UserRepositoryProjectionLiveTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/UserRepositoryProjectionLiveTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/repository/UserRepositoryProjectionLiveTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/repository/UserRepositoryProjectionLiveTest.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/transaction/MongoTransactionReactiveIntegrationTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/transaction/MongoTransactionReactiveIntegrationTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/transaction/MongoTransactionReactiveIntegrationTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/transaction/MongoTransactionReactiveIntegrationTest.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/transaction/MongoTransactionTemplateIntegrationTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/transaction/MongoTransactionTemplateIntegrationTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/transaction/MongoTransactionTemplateIntegrationTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/transaction/MongoTransactionTemplateIntegrationTest.java diff --git a/spring-data-mongodb/src/test/java/com/baeldung/transaction/MongoTransactionalIntegrationTest.java b/persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/transaction/MongoTransactionalIntegrationTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/com/baeldung/transaction/MongoTransactionalIntegrationTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/com/baeldung/transaction/MongoTransactionalIntegrationTest.java diff --git a/spring-data-mongodb/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/persistence-modules/spring-data-mongodb/src/test/java/org/baeldung/SpringContextIntegrationTest.java similarity index 100% rename from spring-data-mongodb/src/test/java/org/baeldung/SpringContextIntegrationTest.java rename to persistence-modules/spring-data-mongodb/src/test/java/org/baeldung/SpringContextIntegrationTest.java diff --git a/spring-data-mongodb/src/test/resources/zips.json b/persistence-modules/spring-data-mongodb/src/test/resources/zips.json similarity index 100% rename from spring-data-mongodb/src/test/resources/zips.json rename to persistence-modules/spring-data-mongodb/src/test/resources/zips.json diff --git a/spring-hibernate3/README.md b/persistence-modules/spring-hibernate3/README.md similarity index 100% rename from spring-hibernate3/README.md rename to persistence-modules/spring-hibernate3/README.md diff --git a/spring-hibernate3/src/main/java/org/baeldung/spring/PersistenceConfigHibernate3.java b/persistence-modules/spring-hibernate3/src/main/java/org/baeldung/spring/PersistenceConfigHibernate3.java similarity index 97% rename from spring-hibernate3/src/main/java/org/baeldung/spring/PersistenceConfigHibernate3.java rename to persistence-modules/spring-hibernate3/src/main/java/org/baeldung/spring/PersistenceConfigHibernate3.java index a128d8848c..f38da21dc0 100644 --- a/spring-hibernate3/src/main/java/org/baeldung/spring/PersistenceConfigHibernate3.java +++ b/persistence-modules/spring-hibernate3/src/main/java/org/baeldung/spring/PersistenceConfigHibernate3.java @@ -1,81 +1,81 @@ -package org.baeldung.spring; - -import java.util.Properties; - -import javax.sql.DataSource; - -import org.apache.tomcat.dbcp.dbcp2.BasicDataSource; -import org.hibernate.SessionFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.core.env.Environment; -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.Resource; -import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; -import org.springframework.orm.hibernate3.HibernateTransactionManager; -import org.springframework.orm.hibernate3.LocalSessionFactoryBean; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -import com.google.common.base.Preconditions; - -@Configuration -@EnableTransactionManagement -@PropertySource({ "classpath:persistence-h2.properties" }) -@ComponentScan({ "org.baeldung.persistence.dao", "org.baeldung.persistence.service" }) -public class PersistenceConfigHibernate3 { - - @Autowired - private Environment env; - - public PersistenceConfigHibernate3() { - super(); - } - - @Bean - public LocalSessionFactoryBean sessionFactory() { - final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean(); - Resource config = new ClassPathResource("exceptionDemo.cfg.xml"); - sessionFactory.setDataSource(dataSource()); - sessionFactory.setConfigLocation(config); - sessionFactory.setHibernateProperties(hibernateProperties()); - - return sessionFactory; - } - - @Bean - public DataSource dataSource() { - final BasicDataSource dataSource = new BasicDataSource(); - dataSource.setDriverClassName(Preconditions.checkNotNull(env.getProperty("jdbc.driverClassName"))); - dataSource.setUrl(Preconditions.checkNotNull(env.getProperty("jdbc.url"))); - dataSource.setUsername(Preconditions.checkNotNull(env.getProperty("jdbc.user"))); - dataSource.setPassword(Preconditions.checkNotNull(env.getProperty("jdbc.pass"))); - - return dataSource; - } - - @Bean - @Autowired - public HibernateTransactionManager transactionManager(final SessionFactory sessionFactory) { - final HibernateTransactionManager txManager = new HibernateTransactionManager(); - txManager.setSessionFactory(sessionFactory); - - return txManager; - } - - @Bean - public PersistenceExceptionTranslationPostProcessor exceptionTranslation() { - return new PersistenceExceptionTranslationPostProcessor(); - } - - final Properties hibernateProperties() { - final Properties hibernateProperties = new Properties(); - hibernateProperties.setProperty("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto")); - hibernateProperties.setProperty("hibernate.dialect", env.getProperty("hibernate.dialect")); - // hibernateProperties.setProperty("hibernate.globally_quoted_identifiers", "true"); - return hibernateProperties; - } - -} +package org.baeldung.spring; + +import java.util.Properties; + +import javax.sql.DataSource; + +import org.apache.tomcat.dbcp.dbcp2.BasicDataSource; +import org.hibernate.SessionFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.core.env.Environment; +import org.springframework.core.io.ClassPathResource; +import org.springframework.core.io.Resource; +import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; +import org.springframework.orm.hibernate3.HibernateTransactionManager; +import org.springframework.orm.hibernate3.LocalSessionFactoryBean; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +import com.google.common.base.Preconditions; + +@Configuration +@EnableTransactionManagement +@PropertySource({ "classpath:persistence-h2.properties" }) +@ComponentScan({ "org.baeldung.persistence.dao", "org.baeldung.persistence.service" }) +public class PersistenceConfigHibernate3 { + + @Autowired + private Environment env; + + public PersistenceConfigHibernate3() { + super(); + } + + @Bean + public LocalSessionFactoryBean sessionFactory() { + final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean(); + Resource config = new ClassPathResource("exceptionDemo.cfg.xml"); + sessionFactory.setDataSource(dataSource()); + sessionFactory.setConfigLocation(config); + sessionFactory.setHibernateProperties(hibernateProperties()); + + return sessionFactory; + } + + @Bean + public DataSource dataSource() { + final BasicDataSource dataSource = new BasicDataSource(); + dataSource.setDriverClassName(Preconditions.checkNotNull(env.getProperty("jdbc.driverClassName"))); + dataSource.setUrl(Preconditions.checkNotNull(env.getProperty("jdbc.url"))); + dataSource.setUsername(Preconditions.checkNotNull(env.getProperty("jdbc.user"))); + dataSource.setPassword(Preconditions.checkNotNull(env.getProperty("jdbc.pass"))); + + return dataSource; + } + + @Bean + @Autowired + public HibernateTransactionManager transactionManager(final SessionFactory sessionFactory) { + final HibernateTransactionManager txManager = new HibernateTransactionManager(); + txManager.setSessionFactory(sessionFactory); + + return txManager; + } + + @Bean + public PersistenceExceptionTranslationPostProcessor exceptionTranslation() { + return new PersistenceExceptionTranslationPostProcessor(); + } + + final Properties hibernateProperties() { + final Properties hibernateProperties = new Properties(); + hibernateProperties.setProperty("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto")); + hibernateProperties.setProperty("hibernate.dialect", env.getProperty("hibernate.dialect")); + // hibernateProperties.setProperty("hibernate.globally_quoted_identifiers", "true"); + return hibernateProperties; + } + +} diff --git a/spring-hibernate3/src/main/resources/logback.xml b/persistence-modules/spring-hibernate3/src/main/resources/logback.xml similarity index 100% rename from spring-hibernate3/src/main/resources/logback.xml rename to persistence-modules/spring-hibernate3/src/main/resources/logback.xml diff --git a/spring-hibernate3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen1MainIntegrationTest.java b/persistence-modules/spring-hibernate3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen1MainIntegrationTest.java similarity index 97% rename from spring-hibernate3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen1MainIntegrationTest.java rename to persistence-modules/spring-hibernate3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen1MainIntegrationTest.java index d53c4445a8..bbbf074c1a 100644 --- a/spring-hibernate3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen1MainIntegrationTest.java +++ b/persistence-modules/spring-hibernate3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen1MainIntegrationTest.java @@ -1,43 +1,43 @@ -package org.baeldung.persistence.service; - -import java.util.List; - -import org.baeldung.persistence.model.Event; -import org.baeldung.spring.PersistenceConfigHibernate3; -import org.hamcrest.core.IsInstanceOf; -import org.hibernate.HibernateException; -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.support.AnnotationConfigContextLoader; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = { PersistenceConfigHibernate3.class }, loader = AnnotationConfigContextLoader.class) -public class HibernateExceptionScen1MainIntegrationTest { - - @Autowired - EventService service; - - @Rule - public ExpectedException expectedEx = ExpectedException.none(); - - @Test - public final void whenEntityIsCreated_thenNoExceptions() { - service.create(new Event("from LocalSessionFactoryBean")); - } - - @Test - @Ignore - public final void whenNoTransBoundToSession_thenException() { - expectedEx.expectCause(IsInstanceOf.instanceOf(HibernateException.class)); - expectedEx.expectMessage("No Hibernate Session bound to thread, " - + "and configuration does not allow creation " - + "of non-transactional one here"); - service.create(new Event("from LocalSessionFactoryBean")); - } -} +package org.baeldung.persistence.service; + +import java.util.List; + +import org.baeldung.persistence.model.Event; +import org.baeldung.spring.PersistenceConfigHibernate3; +import org.hamcrest.core.IsInstanceOf; +import org.hibernate.HibernateException; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.support.AnnotationConfigContextLoader; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = { PersistenceConfigHibernate3.class }, loader = AnnotationConfigContextLoader.class) +public class HibernateExceptionScen1MainIntegrationTest { + + @Autowired + EventService service; + + @Rule + public ExpectedException expectedEx = ExpectedException.none(); + + @Test + public final void whenEntityIsCreated_thenNoExceptions() { + service.create(new Event("from LocalSessionFactoryBean")); + } + + @Test + @Ignore + public final void whenNoTransBoundToSession_thenException() { + expectedEx.expectCause(IsInstanceOf.instanceOf(HibernateException.class)); + expectedEx.expectMessage("No Hibernate Session bound to thread, " + + "and configuration does not allow creation " + + "of non-transactional one here"); + service.create(new Event("from LocalSessionFactoryBean")); + } +} diff --git a/spring-hibernate3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen2MainIntegrationTest.java b/persistence-modules/spring-hibernate3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen2MainIntegrationTest.java similarity index 97% rename from spring-hibernate3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen2MainIntegrationTest.java rename to persistence-modules/spring-hibernate3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen2MainIntegrationTest.java index 84cafe0536..d8810f0e90 100644 --- a/spring-hibernate3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen2MainIntegrationTest.java +++ b/persistence-modules/spring-hibernate3/src/test/java/org/baeldung/persistence/service/HibernateExceptionScen2MainIntegrationTest.java @@ -1,45 +1,45 @@ -package org.baeldung.persistence.service; - -import java.util.List; - -import org.baeldung.persistence.model.Event; -import org.baeldung.spring.PersistenceConfig; -import org.hamcrest.core.IsInstanceOf; -import org.hibernate.HibernateException; -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.support.AnnotationConfigContextLoader; - - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = { PersistenceConfig.class }, loader = AnnotationConfigContextLoader.class) -public class HibernateExceptionScen2MainIntegrationTest { - - @Autowired - EventService service; - - @Rule - public ExpectedException expectedEx = ExpectedException.none(); - - @Test - public final void whenEntityIsCreated_thenNoExceptions() { - service.create(new Event("from AnnotationSessionFactoryBean")); - } - - @Test - @Ignore - public final void whenNoTransBoundToSession_thenException() { - expectedEx.expectCause(IsInstanceOf.instanceOf(HibernateException.class)); - expectedEx.expectMessage("No Hibernate Session bound to thread, " - + "and configuration does not allow creation " - + "of non-transactional one here"); - service.create(new Event("from AnnotationSessionFactoryBean")); - } - -} +package org.baeldung.persistence.service; + +import java.util.List; + +import org.baeldung.persistence.model.Event; +import org.baeldung.spring.PersistenceConfig; +import org.hamcrest.core.IsInstanceOf; +import org.hibernate.HibernateException; +import org.junit.Ignore; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.support.AnnotationConfigContextLoader; + + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = { PersistenceConfig.class }, loader = AnnotationConfigContextLoader.class) +public class HibernateExceptionScen2MainIntegrationTest { + + @Autowired + EventService service; + + @Rule + public ExpectedException expectedEx = ExpectedException.none(); + + @Test + public final void whenEntityIsCreated_thenNoExceptions() { + service.create(new Event("from AnnotationSessionFactoryBean")); + } + + @Test + @Ignore + public final void whenNoTransBoundToSession_thenException() { + expectedEx.expectCause(IsInstanceOf.instanceOf(HibernateException.class)); + expectedEx.expectMessage("No Hibernate Session bound to thread, " + + "and configuration does not allow creation " + + "of non-transactional one here"); + service.create(new Event("from AnnotationSessionFactoryBean")); + } + +} diff --git a/spring-hibernate4/.gitignore b/persistence-modules/spring-hibernate4/.gitignore similarity index 100% rename from spring-hibernate4/.gitignore rename to persistence-modules/spring-hibernate4/.gitignore diff --git a/spring-hibernate4/README.md b/persistence-modules/spring-hibernate4/README.md similarity index 100% rename from spring-hibernate4/README.md rename to persistence-modules/spring-hibernate4/README.md diff --git a/spring-hibernate4/pom.xml b/persistence-modules/spring-hibernate4/pom.xml similarity index 99% rename from spring-hibernate4/pom.xml rename to persistence-modules/spring-hibernate4/pom.xml index 505a218a94..fad84870df 100644 --- a/spring-hibernate4/pom.xml +++ b/persistence-modules/spring-hibernate4/pom.xml @@ -10,6 +10,7 @@ com.baeldung parent-modules 1.0.0-SNAPSHOT + ../../ diff --git a/spring-hibernate4/src/main/java/com/baeldung/hibernate/criteria/model/Item.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/criteria/model/Item.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/hibernate/criteria/model/Item.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/criteria/model/Item.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/model/OrderDetail.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/model/OrderDetail.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/model/OrderDetail.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/model/OrderDetail.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/model/UserEager.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/model/UserEager.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/model/UserEager.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/model/UserEager.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/model/UserLazy.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/model/UserLazy.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/model/UserLazy.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/model/UserLazy.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/util/HibernateUtil.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/util/HibernateUtil.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/util/HibernateUtil.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/util/HibernateUtil.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/view/FetchingAppView.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/view/FetchingAppView.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/view/FetchingAppView.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/fetching/view/FetchingAppView.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/config/HibernateAnnotationUtil.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/config/HibernateAnnotationUtil.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/config/HibernateAnnotationUtil.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/config/HibernateAnnotationUtil.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMain.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMain.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMain.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMain.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/model/Cart.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/model/Cart.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/model/Cart.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/model/Cart.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/model/Items.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/model/Items.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/model/Items.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/hibernate/oneToMany/model/Items.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IBarAuditableDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IBarAuditableDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IBarAuditableDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IBarAuditableDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IBarCrudRepository.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IBarCrudRepository.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IBarCrudRepository.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IBarCrudRepository.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IBarDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IBarDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IBarDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IBarDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IChildDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IChildDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IChildDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IChildDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IFooAuditableDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IFooAuditableDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IFooAuditableDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IFooAuditableDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IFooDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IFooDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IFooDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IFooDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IParentDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IParentDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IParentDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/IParentDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractHibernateAuditableDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractHibernateAuditableDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractHibernateAuditableDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractHibernateAuditableDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractHibernateDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractHibernateDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractHibernateDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractHibernateDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractJpaDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractJpaDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractJpaDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/AbstractJpaDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/GenericHibernateDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/GenericHibernateDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/GenericHibernateDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/GenericHibernateDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/IAuditOperations.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/IAuditOperations.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/IAuditOperations.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/IAuditOperations.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/IGenericDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/IGenericDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/IGenericDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/IGenericDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/IOperations.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/IOperations.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/IOperations.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/common/IOperations.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/BarAuditableDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/BarAuditableDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/BarAuditableDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/BarAuditableDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/BarDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/BarDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/BarDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/BarDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/BarJpaDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/BarJpaDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/BarJpaDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/BarJpaDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/ChildDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/ChildDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/ChildDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/ChildDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/FooAuditableDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/FooAuditableDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/FooAuditableDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/FooAuditableDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/FooDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/FooDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/FooDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/FooDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/ParentDao.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/ParentDao.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/ParentDao.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/dao/impl/ParentDao.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Bar.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Bar.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/model/Bar.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Bar.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Child.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Child.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/model/Child.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Child.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Foo.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Foo.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/model/Foo.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Foo.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Parent.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Parent.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/model/Parent.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Parent.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Person.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Person.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/model/Person.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/model/Person.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IBarAuditableService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IBarAuditableService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/IBarAuditableService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IBarAuditableService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IBarService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IBarService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/IBarService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IBarService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IChildService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IChildService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/IChildService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IChildService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IFooAuditableService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IFooAuditableService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/IFooAuditableService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IFooAuditableService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IFooService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IFooService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/IFooService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IFooService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IParentService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IParentService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/IParentService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/IParentService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractHibernateAuditableService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractHibernateAuditableService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractHibernateAuditableService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractHibernateAuditableService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractHibernateService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractHibernateService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractHibernateService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractHibernateService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractJpaService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractJpaService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractJpaService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractJpaService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractSpringDataJpaService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractSpringDataJpaService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractSpringDataJpaService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/common/AbstractSpringDataJpaService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarAuditableService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarAuditableService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarAuditableService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarAuditableService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarJpaService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarJpaService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarJpaService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarJpaService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarSpringDataJpaService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarSpringDataJpaService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarSpringDataJpaService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/BarSpringDataJpaService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/ChildService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/ChildService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/ChildService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/ChildService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/FooAuditableService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/FooAuditableService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/FooAuditableService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/FooAuditableService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/FooService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/FooService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/FooService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/FooService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/ParentService.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/ParentService.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/ParentService.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/persistence/service/impl/ParentService.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/spring/PersistenceConfig.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/spring/PersistenceConfig.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/spring/PersistenceConfig.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/spring/PersistenceConfig.java diff --git a/spring-hibernate4/src/main/java/com/baeldung/spring/PersistenceXmlConfig.java b/persistence-modules/spring-hibernate4/src/main/java/com/baeldung/spring/PersistenceXmlConfig.java similarity index 100% rename from spring-hibernate4/src/main/java/com/baeldung/spring/PersistenceXmlConfig.java rename to persistence-modules/spring-hibernate4/src/main/java/com/baeldung/spring/PersistenceXmlConfig.java diff --git a/spring-hibernate4/src/main/resources/fetching.cfg.xml b/persistence-modules/spring-hibernate4/src/main/resources/fetching.cfg.xml similarity index 100% rename from spring-hibernate4/src/main/resources/fetching.cfg.xml rename to persistence-modules/spring-hibernate4/src/main/resources/fetching.cfg.xml diff --git a/spring-hibernate4/src/main/resources/fetchingLazy.cfg.xml b/persistence-modules/spring-hibernate4/src/main/resources/fetchingLazy.cfg.xml similarity index 100% rename from spring-hibernate4/src/main/resources/fetchingLazy.cfg.xml rename to persistence-modules/spring-hibernate4/src/main/resources/fetchingLazy.cfg.xml diff --git a/spring-hibernate4/src/main/resources/fetching_create_queries.sql b/persistence-modules/spring-hibernate4/src/main/resources/fetching_create_queries.sql similarity index 100% rename from spring-hibernate4/src/main/resources/fetching_create_queries.sql rename to persistence-modules/spring-hibernate4/src/main/resources/fetching_create_queries.sql diff --git a/spring-hibernate4/src/main/resources/hibernate-annotation.cfg.xml b/persistence-modules/spring-hibernate4/src/main/resources/hibernate-annotation.cfg.xml similarity index 100% rename from spring-hibernate4/src/main/resources/hibernate-annotation.cfg.xml rename to persistence-modules/spring-hibernate4/src/main/resources/hibernate-annotation.cfg.xml diff --git a/spring-hibernate4/src/main/resources/hibernate4Config.xml b/persistence-modules/spring-hibernate4/src/main/resources/hibernate4Config.xml similarity index 100% rename from spring-hibernate4/src/main/resources/hibernate4Config.xml rename to persistence-modules/spring-hibernate4/src/main/resources/hibernate4Config.xml diff --git a/spring-hibernate4/src/main/resources/immutable.cfg.xml b/persistence-modules/spring-hibernate4/src/main/resources/immutable.cfg.xml similarity index 100% rename from spring-hibernate4/src/main/resources/immutable.cfg.xml rename to persistence-modules/spring-hibernate4/src/main/resources/immutable.cfg.xml diff --git a/spring-hibernate4/src/main/resources/insert_statements.sql b/persistence-modules/spring-hibernate4/src/main/resources/insert_statements.sql similarity index 100% rename from spring-hibernate4/src/main/resources/insert_statements.sql rename to persistence-modules/spring-hibernate4/src/main/resources/insert_statements.sql diff --git a/spring-hibernate4/src/main/resources/logback.xml b/persistence-modules/spring-hibernate4/src/main/resources/logback.xml similarity index 100% rename from spring-hibernate4/src/main/resources/logback.xml rename to persistence-modules/spring-hibernate4/src/main/resources/logback.xml diff --git a/spring-hibernate4/src/main/resources/one_to_many.sql b/persistence-modules/spring-hibernate4/src/main/resources/one_to_many.sql similarity index 100% rename from spring-hibernate4/src/main/resources/one_to_many.sql rename to persistence-modules/spring-hibernate4/src/main/resources/one_to_many.sql diff --git a/spring-hibernate4/src/main/resources/persistence-mysql.properties b/persistence-modules/spring-hibernate4/src/main/resources/persistence-mysql.properties similarity index 100% rename from spring-hibernate4/src/main/resources/persistence-mysql.properties rename to persistence-modules/spring-hibernate4/src/main/resources/persistence-mysql.properties diff --git a/spring-hibernate4/src/main/resources/stored_procedure.sql b/persistence-modules/spring-hibernate4/src/main/resources/stored_procedure.sql similarity index 95% rename from spring-hibernate4/src/main/resources/stored_procedure.sql rename to persistence-modules/spring-hibernate4/src/main/resources/stored_procedure.sql index 8e1bdf57dd..9cedb75c37 100644 --- a/spring-hibernate4/src/main/resources/stored_procedure.sql +++ b/persistence-modules/spring-hibernate4/src/main/resources/stored_procedure.sql @@ -1,20 +1,20 @@ -DELIMITER // - CREATE PROCEDURE GetFoosByName(IN fooName VARCHAR(255)) - LANGUAGE SQL - DETERMINISTIC - SQL SECURITY DEFINER - BEGIN - SELECT * FROM foo WHERE name = fooName; - END // -DELIMITER ; - - -DELIMITER // - CREATE PROCEDURE GetAllFoos() - LANGUAGE SQL - DETERMINISTIC - SQL SECURITY DEFINER - BEGIN - SELECT * FROM foo; - END // +DELIMITER // + CREATE PROCEDURE GetFoosByName(IN fooName VARCHAR(255)) + LANGUAGE SQL + DETERMINISTIC + SQL SECURITY DEFINER + BEGIN + SELECT * FROM foo WHERE name = fooName; + END // +DELIMITER ; + + +DELIMITER // + CREATE PROCEDURE GetAllFoos() + LANGUAGE SQL + DETERMINISTIC + SQL SECURITY DEFINER + BEGIN + SELECT * FROM foo; + END // DELIMITER ; \ No newline at end of file diff --git a/spring-hibernate4/src/main/resources/webSecurityConfig.xml b/persistence-modules/spring-hibernate4/src/main/resources/webSecurityConfig.xml similarity index 100% rename from spring-hibernate4/src/main/resources/webSecurityConfig.xml rename to persistence-modules/spring-hibernate4/src/main/resources/webSecurityConfig.xml diff --git a/spring-hibernate4/src/test/java/com/baeldung/hibernate/fetching/HibernateFetchingIntegrationTest.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/hibernate/fetching/HibernateFetchingIntegrationTest.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/hibernate/fetching/HibernateFetchingIntegrationTest.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/hibernate/fetching/HibernateFetchingIntegrationTest.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMainIntegrationTest.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMainIntegrationTest.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMainIntegrationTest.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/hibernate/oneToMany/main/HibernateOneToManyAnnotationMainIntegrationTest.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/persistence/IntegrationTestSuite.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/IntegrationTestSuite.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/persistence/IntegrationTestSuite.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/IntegrationTestSuite.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/persistence/audit/AuditTestSuite.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/audit/AuditTestSuite.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/persistence/audit/AuditTestSuite.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/audit/AuditTestSuite.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/persistence/audit/EnversFooBarAuditIntegrationTest.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/audit/EnversFooBarAuditIntegrationTest.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/persistence/audit/EnversFooBarAuditIntegrationTest.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/audit/EnversFooBarAuditIntegrationTest.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/persistence/audit/JPABarAuditIntegrationTest.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/audit/JPABarAuditIntegrationTest.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/persistence/audit/JPABarAuditIntegrationTest.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/audit/JPABarAuditIntegrationTest.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/persistence/audit/SpringDataJPABarAuditIntegrationTest.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/audit/SpringDataJPABarAuditIntegrationTest.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/persistence/audit/SpringDataJPABarAuditIntegrationTest.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/audit/SpringDataJPABarAuditIntegrationTest.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/persistence/hibernate/FooFixtures.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/hibernate/FooFixtures.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/persistence/hibernate/FooFixtures.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/hibernate/FooFixtures.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/persistence/hibernate/FooPaginationPersistenceIntegrationTest.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/hibernate/FooPaginationPersistenceIntegrationTest.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/persistence/hibernate/FooPaginationPersistenceIntegrationTest.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/hibernate/FooPaginationPersistenceIntegrationTest.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/persistence/hibernate/FooSortingPersistenceIntegrationTest.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/hibernate/FooSortingPersistenceIntegrationTest.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/persistence/hibernate/FooSortingPersistenceIntegrationTest.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/hibernate/FooSortingPersistenceIntegrationTest.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/persistence/save/SaveMethodsIntegrationTest.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/save/SaveMethodsIntegrationTest.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/persistence/save/SaveMethodsIntegrationTest.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/save/SaveMethodsIntegrationTest.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooServiceBasicPersistenceIntegrationTest.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooServiceBasicPersistenceIntegrationTest.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooServiceBasicPersistenceIntegrationTest.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooServiceBasicPersistenceIntegrationTest.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooServicePersistenceIntegrationTest.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooServicePersistenceIntegrationTest.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooServicePersistenceIntegrationTest.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooServicePersistenceIntegrationTest.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooStoredProceduresLiveTest.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooStoredProceduresLiveTest.java similarity index 97% rename from spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooStoredProceduresLiveTest.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooStoredProceduresLiveTest.java index 9ec04d297c..d9353f1ad1 100644 --- a/spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooStoredProceduresLiveTest.java +++ b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/service/FooStoredProceduresLiveTest.java @@ -1,121 +1,121 @@ -package com.baeldung.persistence.service; - -import java.util.List; - -import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; -import static org.junit.Assert.assertEquals; - -import org.hibernate.Query; -import org.hibernate.Session; -import org.hibernate.SessionFactory; -import org.hibernate.exception.SQLGrammarException; -import org.junit.After; -import org.junit.Assume; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.support.AnnotationConfigContextLoader; - -import com.baeldung.persistence.model.Foo; -import com.baeldung.spring.PersistenceConfig; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = { PersistenceConfig.class }, loader = AnnotationConfigContextLoader.class) -public class FooStoredProceduresLiveTest { - - private static final Logger LOGGER = LoggerFactory.getLogger(FooStoredProceduresLiveTest.class); - - @Autowired - private SessionFactory sessionFactory; - - @Autowired - private IFooService fooService; - - private Session session; - - @Before - public final void before() { - session = sessionFactory.openSession(); - Assume.assumeTrue(getAllFoosExists()); - Assume.assumeTrue(getFoosByNameExists()); - } - - private boolean getFoosByNameExists() { - try { - Query sqlQuery = session.createSQLQuery("CALL GetAllFoos()").addEntity(Foo.class); - sqlQuery.list(); - return true; - } catch (SQLGrammarException e) { - LOGGER.error("WARNING : GetFoosByName() Procedure is may be missing ", e); - return false; - } - } - - private boolean getAllFoosExists() { - try { - Query sqlQuery = session.createSQLQuery("CALL GetAllFoos()").addEntity(Foo.class); - sqlQuery.list(); - return true; - } catch (SQLGrammarException e) { - LOGGER.error("WARNING : GetAllFoos() Procedure is may be missing ", e); - return false; - } - } - - @After - public final void after() { - session.close(); - } - - @Test - public final void getAllFoosUsingStoredProcedures() { - - fooService.create(new Foo(randomAlphabetic(6))); - - // Stored procedure getAllFoos using createSQLQuery - Query sqlQuery = session.createSQLQuery("CALL GetAllFoos()").addEntity(Foo.class); - @SuppressWarnings("unchecked") - List allFoos = sqlQuery.list(); - for (Foo foo : allFoos) { - LOGGER.info("getAllFoos() SQL Query result : {}", foo.getName()); - } - assertEquals(allFoos.size(), fooService.findAll().size()); - - // Stored procedure getAllFoos using a Named Query - Query namedQuery = session.getNamedQuery("callGetAllFoos"); - @SuppressWarnings("unchecked") - List allFoos2 = namedQuery.list(); - for (Foo foo : allFoos2) { - LOGGER.info("getAllFoos() NamedQuery result : {}", foo.getName()); - } - assertEquals(allFoos2.size(), fooService.findAll().size()); - } - - @Test - public final void getFoosByNameUsingStoredProcedures() { - - fooService.create(new Foo("NewFooName")); - - // Stored procedure getFoosByName using createSQLQuery() - Query sqlQuery = session.createSQLQuery("CALL GetFoosByName(:fooName)").addEntity(Foo.class).setParameter("fooName", "NewFooName"); - @SuppressWarnings("unchecked") - List allFoosByName = sqlQuery.list(); - for (Foo foo : allFoosByName) { - LOGGER.info("getFoosByName() using SQL Query : found => {}", foo.toString()); - } - - // Stored procedure getFoosByName using getNamedQuery() - Query namedQuery = session.getNamedQuery("callGetFoosByName").setParameter("fooName", "NewFooName"); - @SuppressWarnings("unchecked") - List allFoosByName2 = namedQuery.list(); - for (Foo foo : allFoosByName2) { - LOGGER.info("getFoosByName() using Native Query : found => {}", foo.toString()); - } - - } -} +package com.baeldung.persistence.service; + +import java.util.List; + +import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic; +import static org.junit.Assert.assertEquals; + +import org.hibernate.Query; +import org.hibernate.Session; +import org.hibernate.SessionFactory; +import org.hibernate.exception.SQLGrammarException; +import org.junit.After; +import org.junit.Assume; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.support.AnnotationConfigContextLoader; + +import com.baeldung.persistence.model.Foo; +import com.baeldung.spring.PersistenceConfig; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(classes = { PersistenceConfig.class }, loader = AnnotationConfigContextLoader.class) +public class FooStoredProceduresLiveTest { + + private static final Logger LOGGER = LoggerFactory.getLogger(FooStoredProceduresLiveTest.class); + + @Autowired + private SessionFactory sessionFactory; + + @Autowired + private IFooService fooService; + + private Session session; + + @Before + public final void before() { + session = sessionFactory.openSession(); + Assume.assumeTrue(getAllFoosExists()); + Assume.assumeTrue(getFoosByNameExists()); + } + + private boolean getFoosByNameExists() { + try { + Query sqlQuery = session.createSQLQuery("CALL GetAllFoos()").addEntity(Foo.class); + sqlQuery.list(); + return true; + } catch (SQLGrammarException e) { + LOGGER.error("WARNING : GetFoosByName() Procedure is may be missing ", e); + return false; + } + } + + private boolean getAllFoosExists() { + try { + Query sqlQuery = session.createSQLQuery("CALL GetAllFoos()").addEntity(Foo.class); + sqlQuery.list(); + return true; + } catch (SQLGrammarException e) { + LOGGER.error("WARNING : GetAllFoos() Procedure is may be missing ", e); + return false; + } + } + + @After + public final void after() { + session.close(); + } + + @Test + public final void getAllFoosUsingStoredProcedures() { + + fooService.create(new Foo(randomAlphabetic(6))); + + // Stored procedure getAllFoos using createSQLQuery + Query sqlQuery = session.createSQLQuery("CALL GetAllFoos()").addEntity(Foo.class); + @SuppressWarnings("unchecked") + List allFoos = sqlQuery.list(); + for (Foo foo : allFoos) { + LOGGER.info("getAllFoos() SQL Query result : {}", foo.getName()); + } + assertEquals(allFoos.size(), fooService.findAll().size()); + + // Stored procedure getAllFoos using a Named Query + Query namedQuery = session.getNamedQuery("callGetAllFoos"); + @SuppressWarnings("unchecked") + List allFoos2 = namedQuery.list(); + for (Foo foo : allFoos2) { + LOGGER.info("getAllFoos() NamedQuery result : {}", foo.getName()); + } + assertEquals(allFoos2.size(), fooService.findAll().size()); + } + + @Test + public final void getFoosByNameUsingStoredProcedures() { + + fooService.create(new Foo("NewFooName")); + + // Stored procedure getFoosByName using createSQLQuery() + Query sqlQuery = session.createSQLQuery("CALL GetFoosByName(:fooName)").addEntity(Foo.class).setParameter("fooName", "NewFooName"); + @SuppressWarnings("unchecked") + List allFoosByName = sqlQuery.list(); + for (Foo foo : allFoosByName) { + LOGGER.info("getFoosByName() using SQL Query : found => {}", foo.toString()); + } + + // Stored procedure getFoosByName using getNamedQuery() + Query namedQuery = session.getNamedQuery("callGetFoosByName").setParameter("fooName", "NewFooName"); + @SuppressWarnings("unchecked") + List allFoosByName2 = namedQuery.list(); + for (Foo foo : allFoosByName2) { + LOGGER.info("getFoosByName() using Native Query : found => {}", foo.toString()); + } + + } +} diff --git a/spring-hibernate4/src/test/java/com/baeldung/persistence/service/ParentServicePersistenceIntegrationTest.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/service/ParentServicePersistenceIntegrationTest.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/persistence/service/ParentServicePersistenceIntegrationTest.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/persistence/service/ParentServicePersistenceIntegrationTest.java diff --git a/spring-hibernate4/src/test/java/com/baeldung/spring/config/PersistenceTestConfig.java b/persistence-modules/spring-hibernate4/src/test/java/com/baeldung/spring/config/PersistenceTestConfig.java similarity index 100% rename from spring-hibernate4/src/test/java/com/baeldung/spring/config/PersistenceTestConfig.java rename to persistence-modules/spring-hibernate4/src/test/java/com/baeldung/spring/config/PersistenceTestConfig.java diff --git a/spring-hibernate4/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/persistence-modules/spring-hibernate4/src/test/java/org/baeldung/SpringContextIntegrationTest.java similarity index 100% rename from spring-hibernate4/src/test/java/org/baeldung/SpringContextIntegrationTest.java rename to persistence-modules/spring-hibernate4/src/test/java/org/baeldung/SpringContextIntegrationTest.java diff --git a/spring-hibernate4/src/test/resources/.gitignore b/persistence-modules/spring-hibernate4/src/test/resources/.gitignore similarity index 100% rename from spring-hibernate4/src/test/resources/.gitignore rename to persistence-modules/spring-hibernate4/src/test/resources/.gitignore diff --git a/spring-hibernate4/src/test/resources/fetching.cfg.xml b/persistence-modules/spring-hibernate4/src/test/resources/fetching.cfg.xml similarity index 100% rename from spring-hibernate4/src/test/resources/fetching.cfg.xml rename to persistence-modules/spring-hibernate4/src/test/resources/fetching.cfg.xml diff --git a/spring-hibernate4/src/test/resources/fetchingLazy.cfg.xml b/persistence-modules/spring-hibernate4/src/test/resources/fetchingLazy.cfg.xml similarity index 100% rename from spring-hibernate4/src/test/resources/fetchingLazy.cfg.xml rename to persistence-modules/spring-hibernate4/src/test/resources/fetchingLazy.cfg.xml diff --git a/spring-hibernate4/src/test/resources/persistence-h2.properties b/persistence-modules/spring-hibernate4/src/test/resources/persistence-h2.properties similarity index 100% rename from spring-hibernate4/src/test/resources/persistence-h2.properties rename to persistence-modules/spring-hibernate4/src/test/resources/persistence-h2.properties diff --git a/pom.xml b/pom.xml index ed7ca7d6d3..5ba509798d 100644 --- a/pom.xml +++ b/pom.xml @@ -357,14 +357,14 @@ core-java-io core-java-8 java-streams - core-java-persistence + persistence-modules/core-java-persistence core-kotlin kotlin-libraries core-groovy core-java-concurrency core-java-concurrency-collections couchbase - deltaspike + persistence-modules/deltaspike dozer ethereum ejb @@ -392,7 +392,7 @@ hystrix image-processing immutables - influxdb + persistence-modules/influxdb jackson persistence-modules/java-cassandra vavr @@ -436,7 +436,7 @@ mustache mvn-wrapper noexception - orientdb + persistence-modules/orientdb osgi orika patterns @@ -477,7 +477,7 @@ spring-boot-admin spring-boot-camel spring-boot-ops - spring-boot-persistence + persistence-modules/spring-boot-persistence spring-boot-security spring-boot-mvc spring-boot-vue @@ -494,10 +494,10 @@ persistence-modules/spring-data-cassandra spring-data-couchbase-2 persistence-modules/spring-data-dynamodb - spring-data-elasticsearch - spring-data-jpa - spring-data-keyvalue - spring-data-mongodb + persistence-modules/spring-data-elasticsearch + persistence-modules/spring-data-jpa + persistence-modules/spring-data-keyvalue + persistence-modules/spring-data-mongodb persistence-modules/spring-data-neo4j persistence-modules/spring-data-redis spring-data-rest @@ -506,7 +506,7 @@ spring-exceptions spring-freemarker persistence-modules/spring-hibernate-3 - spring-hibernate4 + persistence-modules/spring-hibernate4 persistence-modules/spring-hibernate-5 persistence-modules/spring-data-eclipselink spring-integration @@ -806,13 +806,13 @@ spring-cloud/spring-cloud-data-flow/time-processor spring-cloud/spring-cloud-data-flow/time-source spring-cucumber - spring-data-keyvalue + persistence-modules/spring-data-keyvalue spring-data-rest spring-dispatcher-servlet spring-drools spring-freemarker - spring-hibernate-3 - spring-hibernate4 + persistence-modules/spring-hibernate-3 + persistence-modules/spring-hibernate4 spring-integration spring-jenkins-pipeline spring-jersey @@ -941,7 +941,7 @@ azure bootique cdi core-java core-java-collections core-java-io core-java-8 core-kotlin core-groovy core-java-concurrency - couchbase deltaspike dozer + couchbase persistence-modules/deltaspike dozer ethereum ejb feign flips geotools testing-modules/groovy-spock testing-modules/gatling google-cloud google-web-toolkit gson @@ -949,7 +949,7 @@ guava-modules/guava-21 guice disruptor spring-static-resources hazelcast hbase hibernate5 httpclient hystrix - image-processing immutables influxdb + image-processing immutables persistence-modules/influxdb jackson persistence-modules/java-cassandra vavr java-lite java-numbers java-rmi java-vavr-stream javax-servlets @@ -974,7 +974,7 @@ mustache mvn-wrapper noexception - orientdb + persistence-modules/orientdb osgi orika patterns @@ -1021,7 +1021,7 @@ spring-boot-admin spring-boot-camel spring-boot-ops - spring-boot-persistence + persistence-modules/spring-boot-persistence spring-boot-security spring-boot-mvc spring-boot-logging-log4j2 @@ -1037,10 +1037,10 @@ persistence-modules/spring-data-cassandra spring-data-couchbase-2 persistence-modules/spring-data-dynamodb - spring-data-elasticsearch - spring-data-keyvalue - spring-data-mongodb - spring-data-jpa + persistence-modules/spring-data-elasticsearch + persistence-modules/spring-data-keyvalue + persistence-modules/spring-data-mongodb + persistence-modules/spring-data-jpa persistence-modules/spring-data-neo4j persistence-modules/spring-data-redis spring-data-rest @@ -1055,7 +1055,7 @@ spring-exceptions spring-freemarker persistence-modules/spring-hibernate-3 - spring-hibernate4 + persistence-modules/spring-hibernate4 persistence-modules/spring-hibernate-5 persistence-modules/spring-data-eclipselink spring-integration @@ -1278,7 +1278,7 @@ core-groovy couchbase - deltaspike + persistence-modules/deltaspike dozer ethereum feign @@ -1300,7 +1300,7 @@ hystrix image-processing immutables - influxdb + persistence-modules/influxdb jackson vavr java-lite @@ -1341,7 +1341,7 @@ mustache mvn-wrapper noexception - orientdb + persistence-modules/orientdb osgi orika patterns @@ -1378,7 +1378,7 @@ spring-boot-bootstrap spring-boot-admin spring-boot-camel - spring-boot-persistence + persistence-modules/spring-boot-persistence spring-boot-security spring-boot-mvc spring-boot-logging-log4j2 @@ -1393,8 +1393,8 @@ spring-aop persistence-modules/spring-data-dynamodb - spring-data-keyvalue - spring-data-mongodb + persistence-modules/spring-data-keyvalue + persistence-modules/spring-data-mongodb persistence-modules/spring-data-neo4j spring-data-rest @@ -1509,7 +1509,7 @@ maven-archetype apache-meecrowave - spring-hibernate4 + persistence-modules/spring-hibernate4 xml vertx metrics @@ -1603,7 +1603,7 @@ google-web-toolkit spring-security-mvc-custom hibernate5 - spring-data-elasticsearch + persistence-modules/spring-data-elasticsearch core-java-concurrency core-java-concurrency-collections From b79874af3b590128e65006980b01bfef7413ef3f Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Sat, 20 Oct 2018 10:18:28 +0300 Subject: [PATCH 13/37] Update pom.xml --- parent-boot-1/pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/parent-boot-1/pom.xml b/parent-boot-1/pom.xml index 0f1086fa31..a5c38f277f 100644 --- a/parent-boot-1/pom.xml +++ b/parent-boot-1/pom.xml @@ -52,5 +52,4 @@ 3.1.0 1.5.16.RELEASE - - \ No newline at end of file + From dc9b1354171f75cd60474040ae76029e1a14106c Mon Sep 17 00:00:00 2001 From: amit2103 Date: Sat, 20 Oct 2018 15:22:59 +0530 Subject: [PATCH 14/37] [BAEL-9517] - Upgraded parent-spring-4 to the latest version of Spring 4.3.20 --- parent-spring-4/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent-spring-4/pom.xml b/parent-spring-4/pom.xml index d1b1298013..9b3c42599b 100644 --- a/parent-spring-4/pom.xml +++ b/parent-spring-4/pom.xml @@ -29,7 +29,7 @@ - 4.3.17.RELEASE + 4.3.20.RELEASE 5.0.2 From d639ab24957ec7f796c43d7578f5b1b866760712 Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Sat, 20 Oct 2018 15:10:00 +0300 Subject: [PATCH 15/37] Update README.md --- java-collections-maps/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java-collections-maps/README.md b/java-collections-maps/README.md index 4883e0e1b6..ca7fee1d21 100644 --- a/java-collections-maps/README.md +++ b/java-collections-maps/README.md @@ -14,4 +14,5 @@ - [Initialize a HashMap in Java](https://www.baeldung.com/java-initialize-hashmap) - [Get the Key for a Value from a Java Map](https://www.baeldung.com/java-map-key-from-value) - [Sort a HashMap in Java](https://www.baeldung.com/java-hashmap-sort) -- [Finding the Highest Value in a Java Map](https://www.baeldung.com/java-find-map-max) \ No newline at end of file +- [Finding the Highest Value in a Java Map](https://www.baeldung.com/java-find-map-max) +- [Merging Two Maps with Java 8](https://www.baeldung.com/java-merge-maps) From 6be1833b3d54b296bc053109f9c78f6de926ab44 Mon Sep 17 00:00:00 2001 From: amit2103 Date: Sat, 20 Oct 2018 23:11:32 +0530 Subject: [PATCH 16/37] [BAEL-9550] - Moved GuavaBiMapUnitTest from core-java to java-collections-map module --- .../src/test/java/com/baeldung/guava/GuavaBiMapUnitTest.java | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {core-java => java-collections-maps}/src/test/java/com/baeldung/guava/GuavaBiMapUnitTest.java (100%) diff --git a/core-java/src/test/java/com/baeldung/guava/GuavaBiMapUnitTest.java b/java-collections-maps/src/test/java/com/baeldung/guava/GuavaBiMapUnitTest.java similarity index 100% rename from core-java/src/test/java/com/baeldung/guava/GuavaBiMapUnitTest.java rename to java-collections-maps/src/test/java/com/baeldung/guava/GuavaBiMapUnitTest.java From 294d52e7e45773dbfa7d9bd061bae0bbdb4c072a Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Sat, 20 Oct 2018 20:41:36 +0300 Subject: [PATCH 17/37] change setup of spring-ejb-client --- spring-ejb/pom.xml | 1 + spring-ejb/spring-ejb-client/pom.xml | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/spring-ejb/pom.xml b/spring-ejb/pom.xml index 31cde720f9..055df9ea04 100755 --- a/spring-ejb/pom.xml +++ b/spring-ejb/pom.xml @@ -73,6 +73,7 @@ ejb-remote-for-spring ejb-beans + spring-ejb-client diff --git a/spring-ejb/spring-ejb-client/pom.xml b/spring-ejb/spring-ejb-client/pom.xml index c935e1f14a..50337e8b21 100644 --- a/spring-ejb/spring-ejb-client/pom.xml +++ b/spring-ejb/spring-ejb-client/pom.xml @@ -10,11 +10,22 @@ Spring EJB Client - com.baeldung - parent-boot-2 - 0.0.1-SNAPSHOT - ../../parent-boot-2 + com.baeldung.spring.ejb + spring-ejb + 1.0.1 + + + + + org.springframework.boot + spring-boot-dependencies + 2.0.4.RELEASE + pom + import + + + @@ -54,6 +65,7 @@ org.springframework.boot spring-boot-maven-plugin + 2.0.4.RELEASE From f8a7e1a29185adfdf61f1a46c3c50fb6ab225795 Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Sat, 20 Oct 2018 20:48:22 +0300 Subject: [PATCH 18/37] remove from main pom --- pom.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pom.xml b/pom.xml index ed7ca7d6d3..0952a9f8e2 100644 --- a/pom.xml +++ b/pom.xml @@ -489,7 +489,6 @@ spring-core spring-cucumber spring-ejb - spring-ejb/spring-ejb-client spring-aop persistence-modules/spring-data-cassandra spring-data-couchbase-2 @@ -1032,7 +1031,6 @@ spring-core spring-cucumber spring-ejb - spring-ejb/spring-ejb-client spring-aop persistence-modules/spring-data-cassandra spring-data-couchbase-2 @@ -1389,7 +1387,6 @@ spring-core spring-cucumber spring-ejb - spring-ejb/spring-ejb-client spring-aop persistence-modules/spring-data-dynamodb From bb380406b286eb578f7ddbbaa14ef90983847cb2 Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Sat, 20 Oct 2018 21:53:54 +0300 Subject: [PATCH 19/37] Update pom.xml --- parent-boot-2/pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/parent-boot-2/pom.xml b/parent-boot-2/pom.xml index ba98898987..bcfcfdec44 100644 --- a/parent-boot-2/pom.xml +++ b/parent-boot-2/pom.xml @@ -75,5 +75,4 @@ 1.0.11.RELEASE 2.0.5.RELEASE - - \ No newline at end of file + From cf56156f338c69af789b5eb5be76d1a821546c05 Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Sat, 20 Oct 2018 22:02:24 +0300 Subject: [PATCH 20/37] fix custom starter setup --- .../greeter-spring-boot-sample-app/pom.xml | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml b/spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml index 4eac7eba19..88c5d1caf5 100644 --- a/spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml +++ b/spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml @@ -7,11 +7,23 @@ 0.0.1-SNAPSHOT - parent-boot-1 + spring-boot-custom-starter com.baeldung 0.0.1-SNAPSHOT - ../../parent-boot-1 + ../../spring-boot-custom-starter + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + @@ -19,9 +31,27 @@ greeter-spring-boot-starter ${greeter-starter.version} + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + + + + 1.5.15.RELEASE 0.0.1-SNAPSHOT From d10f6b56ed57e159f1c503028c1d34e73fb625a4 Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Sat, 20 Oct 2018 22:08:41 +0300 Subject: [PATCH 21/37] trigger parent build --- spring-boot-custom-starter/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-custom-starter/pom.xml b/spring-boot-custom-starter/pom.xml index b8ad8fa12c..97b33ce2b8 100644 --- a/spring-boot-custom-starter/pom.xml +++ b/spring-boot-custom-starter/pom.xml @@ -18,5 +18,6 @@ greeter-spring-boot-starter greeter-spring-boot-sample-app + \ No newline at end of file From d166c0bb2e8c3b71dc4fb504de31ae94692257ab Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Sat, 20 Oct 2018 22:26:50 +0300 Subject: [PATCH 22/37] Update pom.xml --- parent-boot-1/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/parent-boot-1/pom.xml b/parent-boot-1/pom.xml index a5c38f277f..c61b791ef3 100644 --- a/parent-boot-1/pom.xml +++ b/parent-boot-1/pom.xml @@ -52,4 +52,5 @@ 3.1.0 1.5.16.RELEASE + From a658ab4834f80817d16b8a915c4f1ad2b2863c83 Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Sun, 21 Oct 2018 10:20:13 +0300 Subject: [PATCH 23/37] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d896ac0715..f3fe5e3bf0 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,4 @@ To run a Spring Boot module run the command: `mvn spring-boot:run -Dgib.enabled= + From 5bfec51157b2b478eb5f961f84034e9c651bb8a1 Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Sun, 21 Oct 2018 10:53:15 +0300 Subject: [PATCH 24/37] fix main class of activiti boot --- spring-activiti/pom.xml | 14 +++++++++++++- .../activitiwithspring/ActivitiController.java | 2 +- .../ActivitiWithSpringApplication.java | 2 +- .../activitiwithspring/TaskRepresentation.java | 2 +- .../servicetasks/SendEmailServiceTask.java | 2 +- .../baeldung/SpringContextIntegrationTest.java | 4 ++-- .../ActivitiControllerIntegrationTest.java | 3 ++- .../ActivitiSpringSecurityIntegrationTest.java | 2 +- ...tivitiWithSpringApplicationIntegrationTest.java | 2 +- .../ProcessEngineCreationIntegrationTest.java | 2 +- .../ProcessExecutionIntegrationTest.java | 2 +- 11 files changed, 25 insertions(+), 12 deletions(-) rename spring-activiti/src/main/java/com/{example => baeldung}/activitiwithspring/ActivitiController.java (97%) rename spring-activiti/src/main/java/com/{example => baeldung}/activitiwithspring/ActivitiWithSpringApplication.java (91%) rename spring-activiti/src/main/java/com/{example => baeldung}/activitiwithspring/TaskRepresentation.java (90%) rename spring-activiti/src/main/java/com/{example => baeldung}/activitiwithspring/servicetasks/SendEmailServiceTask.java (83%) rename spring-activiti/src/test/java/{org => com}/baeldung/SpringContextIntegrationTest.java (81%) rename spring-activiti/src/test/java/com/{example => baeldung}/activitiwithspring/ActivitiControllerIntegrationTest.java (97%) rename spring-activiti/src/test/java/com/{example => baeldung}/activitiwithspring/ActivitiSpringSecurityIntegrationTest.java (96%) rename spring-activiti/src/test/java/com/{example => baeldung}/activitiwithspring/ActivitiWithSpringApplicationIntegrationTest.java (89%) rename spring-activiti/src/test/java/com/{example => baeldung}/activitiwithspring/ProcessEngineCreationIntegrationTest.java (98%) rename spring-activiti/src/test/java/com/{example => baeldung}/activitiwithspring/ProcessExecutionIntegrationTest.java (99%) diff --git a/spring-activiti/pom.xml b/spring-activiti/pom.xml index 0a19f483c1..4e21c5b032 100644 --- a/spring-activiti/pom.xml +++ b/spring-activiti/pom.xml @@ -41,9 +41,21 @@ test + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + com.baeldung.activitiwithspring.ActivitiWithSpringApplication + + + + - com.example.activitiwithspring.ActivitiWithSpringApplication UTF-8 UTF-8 6.0.0 diff --git a/spring-activiti/src/main/java/com/example/activitiwithspring/ActivitiController.java b/spring-activiti/src/main/java/com/baeldung/activitiwithspring/ActivitiController.java similarity index 97% rename from spring-activiti/src/main/java/com/example/activitiwithspring/ActivitiController.java rename to spring-activiti/src/main/java/com/baeldung/activitiwithspring/ActivitiController.java index 96b551c03c..54dd4670f0 100644 --- a/spring-activiti/src/main/java/com/example/activitiwithspring/ActivitiController.java +++ b/spring-activiti/src/main/java/com/baeldung/activitiwithspring/ActivitiController.java @@ -1,4 +1,4 @@ -package com.example.activitiwithspring; +package com.baeldung.activitiwithspring; import org.activiti.engine.RuntimeService; import org.activiti.engine.TaskService; diff --git a/spring-activiti/src/main/java/com/example/activitiwithspring/ActivitiWithSpringApplication.java b/spring-activiti/src/main/java/com/baeldung/activitiwithspring/ActivitiWithSpringApplication.java similarity index 91% rename from spring-activiti/src/main/java/com/example/activitiwithspring/ActivitiWithSpringApplication.java rename to spring-activiti/src/main/java/com/baeldung/activitiwithspring/ActivitiWithSpringApplication.java index a9cd1301eb..d43ae3cc35 100644 --- a/spring-activiti/src/main/java/com/example/activitiwithspring/ActivitiWithSpringApplication.java +++ b/spring-activiti/src/main/java/com/baeldung/activitiwithspring/ActivitiWithSpringApplication.java @@ -1,4 +1,4 @@ -package com.example.activitiwithspring; +package com.baeldung.activitiwithspring; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/spring-activiti/src/main/java/com/example/activitiwithspring/TaskRepresentation.java b/spring-activiti/src/main/java/com/baeldung/activitiwithspring/TaskRepresentation.java similarity index 90% rename from spring-activiti/src/main/java/com/example/activitiwithspring/TaskRepresentation.java rename to spring-activiti/src/main/java/com/baeldung/activitiwithspring/TaskRepresentation.java index bb1412b057..de1ad88ba9 100644 --- a/spring-activiti/src/main/java/com/example/activitiwithspring/TaskRepresentation.java +++ b/spring-activiti/src/main/java/com/baeldung/activitiwithspring/TaskRepresentation.java @@ -1,4 +1,4 @@ -package com.example.activitiwithspring; +package com.baeldung.activitiwithspring; class TaskRepresentation { diff --git a/spring-activiti/src/main/java/com/example/activitiwithspring/servicetasks/SendEmailServiceTask.java b/spring-activiti/src/main/java/com/baeldung/activitiwithspring/servicetasks/SendEmailServiceTask.java similarity index 83% rename from spring-activiti/src/main/java/com/example/activitiwithspring/servicetasks/SendEmailServiceTask.java rename to spring-activiti/src/main/java/com/baeldung/activitiwithspring/servicetasks/SendEmailServiceTask.java index c11b48f37a..c174b6ae4a 100644 --- a/spring-activiti/src/main/java/com/example/activitiwithspring/servicetasks/SendEmailServiceTask.java +++ b/spring-activiti/src/main/java/com/baeldung/activitiwithspring/servicetasks/SendEmailServiceTask.java @@ -1,4 +1,4 @@ -package com.example.activitiwithspring.servicetasks; +package com.baeldung.activitiwithspring.servicetasks; import org.activiti.engine.delegate.DelegateExecution; import org.activiti.engine.delegate.JavaDelegate; diff --git a/spring-activiti/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-activiti/src/test/java/com/baeldung/SpringContextIntegrationTest.java similarity index 81% rename from spring-activiti/src/test/java/org/baeldung/SpringContextIntegrationTest.java rename to spring-activiti/src/test/java/com/baeldung/SpringContextIntegrationTest.java index ae37e77f86..ce48080753 100644 --- a/spring-activiti/src/test/java/org/baeldung/SpringContextIntegrationTest.java +++ b/spring-activiti/src/test/java/com/baeldung/SpringContextIntegrationTest.java @@ -1,11 +1,11 @@ -package org.baeldung; +package com.baeldung; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; -import com.example.activitiwithspring.ActivitiWithSpringApplication; +import com.baeldung.activitiwithspring.ActivitiWithSpringApplication; @RunWith(SpringRunner.class) @SpringBootTest(classes = ActivitiWithSpringApplication.class) diff --git a/spring-activiti/src/test/java/com/example/activitiwithspring/ActivitiControllerIntegrationTest.java b/spring-activiti/src/test/java/com/baeldung/activitiwithspring/ActivitiControllerIntegrationTest.java similarity index 97% rename from spring-activiti/src/test/java/com/example/activitiwithspring/ActivitiControllerIntegrationTest.java rename to spring-activiti/src/test/java/com/baeldung/activitiwithspring/ActivitiControllerIntegrationTest.java index 65fd33bfc6..12c855e5ff 100644 --- a/spring-activiti/src/test/java/com/example/activitiwithspring/ActivitiControllerIntegrationTest.java +++ b/spring-activiti/src/test/java/com/baeldung/activitiwithspring/ActivitiControllerIntegrationTest.java @@ -1,5 +1,6 @@ -package com.example.activitiwithspring; +package com.baeldung.activitiwithspring; +import com.baeldung.activitiwithspring.TaskRepresentation; import com.fasterxml.jackson.databind.ObjectMapper; import org.activiti.engine.RuntimeService; import org.activiti.engine.runtime.ProcessInstance; diff --git a/spring-activiti/src/test/java/com/example/activitiwithspring/ActivitiSpringSecurityIntegrationTest.java b/spring-activiti/src/test/java/com/baeldung/activitiwithspring/ActivitiSpringSecurityIntegrationTest.java similarity index 96% rename from spring-activiti/src/test/java/com/example/activitiwithspring/ActivitiSpringSecurityIntegrationTest.java rename to spring-activiti/src/test/java/com/baeldung/activitiwithspring/ActivitiSpringSecurityIntegrationTest.java index c2eeb96555..53bdcee888 100644 --- a/spring-activiti/src/test/java/com/example/activitiwithspring/ActivitiSpringSecurityIntegrationTest.java +++ b/spring-activiti/src/test/java/com/baeldung/activitiwithspring/ActivitiSpringSecurityIntegrationTest.java @@ -1,4 +1,4 @@ -package com.example.activitiwithspring; +package com.baeldung.activitiwithspring; import org.activiti.engine.IdentityService; import org.junit.Test; diff --git a/spring-activiti/src/test/java/com/example/activitiwithspring/ActivitiWithSpringApplicationIntegrationTest.java b/spring-activiti/src/test/java/com/baeldung/activitiwithspring/ActivitiWithSpringApplicationIntegrationTest.java similarity index 89% rename from spring-activiti/src/test/java/com/example/activitiwithspring/ActivitiWithSpringApplicationIntegrationTest.java rename to spring-activiti/src/test/java/com/baeldung/activitiwithspring/ActivitiWithSpringApplicationIntegrationTest.java index 7460c302d8..8c1e400215 100644 --- a/spring-activiti/src/test/java/com/example/activitiwithspring/ActivitiWithSpringApplicationIntegrationTest.java +++ b/spring-activiti/src/test/java/com/baeldung/activitiwithspring/ActivitiWithSpringApplicationIntegrationTest.java @@ -1,4 +1,4 @@ -package com.example.activitiwithspring; +package com.baeldung.activitiwithspring; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/spring-activiti/src/test/java/com/example/activitiwithspring/ProcessEngineCreationIntegrationTest.java b/spring-activiti/src/test/java/com/baeldung/activitiwithspring/ProcessEngineCreationIntegrationTest.java similarity index 98% rename from spring-activiti/src/test/java/com/example/activitiwithspring/ProcessEngineCreationIntegrationTest.java rename to spring-activiti/src/test/java/com/baeldung/activitiwithspring/ProcessEngineCreationIntegrationTest.java index 00afd14590..00538f8e6e 100644 --- a/spring-activiti/src/test/java/com/example/activitiwithspring/ProcessEngineCreationIntegrationTest.java +++ b/spring-activiti/src/test/java/com/baeldung/activitiwithspring/ProcessEngineCreationIntegrationTest.java @@ -1,4 +1,4 @@ -package com.example.activitiwithspring; +package com.baeldung.activitiwithspring; import org.activiti.engine.ProcessEngine; import org.activiti.engine.ProcessEngineConfiguration; diff --git a/spring-activiti/src/test/java/com/example/activitiwithspring/ProcessExecutionIntegrationTest.java b/spring-activiti/src/test/java/com/baeldung/activitiwithspring/ProcessExecutionIntegrationTest.java similarity index 99% rename from spring-activiti/src/test/java/com/example/activitiwithspring/ProcessExecutionIntegrationTest.java rename to spring-activiti/src/test/java/com/baeldung/activitiwithspring/ProcessExecutionIntegrationTest.java index 9c35ea413b..4342590ea9 100644 --- a/spring-activiti/src/test/java/com/example/activitiwithspring/ProcessExecutionIntegrationTest.java +++ b/spring-activiti/src/test/java/com/baeldung/activitiwithspring/ProcessExecutionIntegrationTest.java @@ -1,4 +1,4 @@ -package com.example.activitiwithspring; +package com.baeldung.activitiwithspring; import org.activiti.engine.ActivitiException; From a7276eb191eabaa52138388366c5e28c1e1f1584 Mon Sep 17 00:00:00 2001 From: Sjmillington Date: Sun, 21 Oct 2018 17:42:54 +0100 Subject: [PATCH 25/37] [BAEL-2256] Guide to simple date format unit tests --- .../SimpleDateFormatUnitTest.java | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java diff --git a/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java b/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java new file mode 100644 index 0000000000..ee994247a4 --- /dev/null +++ b/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java @@ -0,0 +1,59 @@ +package com.baeldung; + +import org.junit.Test; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Locale; +import java.util.TimeZone; +import java.util.logging.Logger; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + + +public class SimpleDateFormatUnitTest { + + private static final Logger logger = Logger.getLogger(SimpleDateFormatUnitTest.class.getName()); + + @Test + public void givenSpecificDate_whenFormatted_checkFormatCorrect() throws Exception { + SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); + assertEquals("24-05-1977", formatter.format(new Date(233345223232L))); + } + + @Test + public void givenSpecificDate_whenFormattedUsingDateFormat_checkFormatCorrect() throws Exception { + DateFormat formatter = DateFormat.getDateInstance(DateFormat.SHORT); + assertEquals("5/24/77", formatter.format(new Date(233345223232L))); + } + + @Test + public void givenStringDate_whenParsed_checkDateCorrect() throws Exception{ + SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); + Date myDate = new Date(233276400000L); + Date parsedDate = formatter.parse("24-05-1977"); + assertEquals(myDate.getTime(), parsedDate.getTime()); + } + + @Test + public void givenFranceLocale_whenFormatted_checkFormatCorrect() throws Exception{ + SimpleDateFormat franceDateFormatter = new SimpleDateFormat("EEEEE dd-MMMMMMM-yyyy", Locale.FRANCE); + Date myWednesday = new Date(1539341312904L); + assertTrue(franceDateFormatter.format(myWednesday).startsWith("vendredi")); + } + + @Test + public void given2TimeZones_whenFormatted_checkTimeDifference() throws Exception { + Date now = new Date(); + + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEEE dd-MMM-yy HH:mm:ssZ"); + + simpleDateFormat.setTimeZone(TimeZone.getTimeZone("Europe/London")); + logger.info(simpleDateFormat.format(now)); + //change the date format + simpleDateFormat.setTimeZone(TimeZone.getTimeZone("America/New_York")); + logger.info(simpleDateFormat.format(now)); + } +} From 06be85c4a183549f2bc6a6e99f35276014e0dafb Mon Sep 17 00:00:00 2001 From: Sam Millington Date: Sun, 21 Oct 2018 18:06:39 +0100 Subject: [PATCH 26/37] Added 'thens' to conform with given_when_then format --- .../simpledateformat/SimpleDateFormatUnitTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java b/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java index ee994247a4..ba4ea32e21 100644 --- a/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java +++ b/core-java/src/test/java/com/baeldung/simpledateformat/SimpleDateFormatUnitTest.java @@ -18,19 +18,19 @@ public class SimpleDateFormatUnitTest { private static final Logger logger = Logger.getLogger(SimpleDateFormatUnitTest.class.getName()); @Test - public void givenSpecificDate_whenFormatted_checkFormatCorrect() throws Exception { + public void givenSpecificDate_whenFormatted_thenCheckFormatCorrect() throws Exception { SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); assertEquals("24-05-1977", formatter.format(new Date(233345223232L))); } @Test - public void givenSpecificDate_whenFormattedUsingDateFormat_checkFormatCorrect() throws Exception { + public void givenSpecificDate_whenFormattedUsingDateFormat_thenCheckFormatCorrect() throws Exception { DateFormat formatter = DateFormat.getDateInstance(DateFormat.SHORT); assertEquals("5/24/77", formatter.format(new Date(233345223232L))); } @Test - public void givenStringDate_whenParsed_checkDateCorrect() throws Exception{ + public void givenStringDate_whenParsed_thenCheckDateCorrect() throws Exception{ SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); Date myDate = new Date(233276400000L); Date parsedDate = formatter.parse("24-05-1977"); @@ -38,14 +38,14 @@ public class SimpleDateFormatUnitTest { } @Test - public void givenFranceLocale_whenFormatted_checkFormatCorrect() throws Exception{ + public void givenFranceLocale_whenFormatted_thenCheckFormatCorrect() throws Exception{ SimpleDateFormat franceDateFormatter = new SimpleDateFormat("EEEEE dd-MMMMMMM-yyyy", Locale.FRANCE); Date myWednesday = new Date(1539341312904L); assertTrue(franceDateFormatter.format(myWednesday).startsWith("vendredi")); } @Test - public void given2TimeZones_whenFormatted_checkTimeDifference() throws Exception { + public void given2TimeZones_whenFormatted_thenCheckTimeDifference() throws Exception { Date now = new Date(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEEE dd-MMM-yy HH:mm:ssZ"); From d67ad2151bcadca931f0cc88eb94c886d36c328c Mon Sep 17 00:00:00 2001 From: sandy03934 Date: Mon, 22 Oct 2018 01:11:25 +0530 Subject: [PATCH 27/37] BAEL-2262 Demo Spring Boot App for HTTPS enabled. (#5513) * BAEL-1979 Added examples for SnakeYAML Library * BAEL-1979 Moved the snakeyaml related code to libraries module * BAEL-1979 Removed the System.out.println() statements and converted the assertTrue to assertEquals wherever possible. * BAEL-1979 Removed println statements, small formatting fix in pom.xml * BAEL-1466 Added a new module for apache-geode * BAEL-1466 Updated the Integration Tests. * BAEL-1466 Updated the Integration Tests. * BAEL-1466 Updated the Integration Tests. * BAEL-1466 Removed the Unnecessary code. * BAEL-2262 Added code for demonstration of HTTPS enabled Spring Boot Application --- spring-security-mvc-boot/pom.xml | 6 +- .../baeldung/ssl/HttpsEnabledApplication.java | 14 ++++ .../java/org/baeldung/ssl/SecurityConfig.java | 36 ++++++++++ .../org/baeldung/ssl/WelcomeController.java | 15 ++++ .../main/resources/application-ssl.properties | 20 ++++++ .../src/main/resources/keystore/baeldung.p12 | Bin 0 -> 2603 bytes .../main/resources/templates/ssl/welcome.html | 1 + .../web/HttpsApplicationIntegrationTest.java | 67 ++++++++++++++++++ 8 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 spring-security-mvc-boot/src/main/java/org/baeldung/ssl/HttpsEnabledApplication.java create mode 100644 spring-security-mvc-boot/src/main/java/org/baeldung/ssl/SecurityConfig.java create mode 100644 spring-security-mvc-boot/src/main/java/org/baeldung/ssl/WelcomeController.java create mode 100644 spring-security-mvc-boot/src/main/resources/application-ssl.properties create mode 100644 spring-security-mvc-boot/src/main/resources/keystore/baeldung.p12 create mode 100644 spring-security-mvc-boot/src/main/resources/templates/ssl/welcome.html create mode 100644 spring-security-mvc-boot/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java diff --git a/spring-security-mvc-boot/pom.xml b/spring-security-mvc-boot/pom.xml index 4090beab99..d2316ddca5 100644 --- a/spring-security-mvc-boot/pom.xml +++ b/spring-security-mvc-boot/pom.xml @@ -229,12 +229,16 @@ - + + + 1.1.2 1.2 1.6.1 2.6.11 + 1.8 diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/HttpsEnabledApplication.java b/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/HttpsEnabledApplication.java new file mode 100644 index 0000000000..70fe30abdc --- /dev/null +++ b/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/HttpsEnabledApplication.java @@ -0,0 +1,14 @@ +package org.baeldung.ssl; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class HttpsEnabledApplication { + + public static void main(String... args) { + SpringApplication application = new SpringApplication(HttpsEnabledApplication.class); + application.setAdditionalProfiles("ssl"); + application.run(args); + } +} diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/SecurityConfig.java b/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/SecurityConfig.java new file mode 100644 index 0000000000..98a59b11bb --- /dev/null +++ b/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/SecurityConfig.java @@ -0,0 +1,36 @@ +package org.baeldung.ssl; + +import org.springframework.context.annotation.Bean; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.crypto.password.PasswordEncoder; + +@EnableWebSecurity +public class SecurityConfig extends WebSecurityConfigurerAdapter { + + @Override + public void configure(AuthenticationManagerBuilder auth) throws Exception { + + auth.inMemoryAuthentication() + .withUser("memuser") + .password(passwordEncoder().encode("pass")) + .roles("USER"); + } + + @Override + protected void configure(HttpSecurity http) throws Exception { + http.httpBasic() + .and() + .authorizeRequests() + .antMatchers("/**") + .authenticated(); + } + + @Bean + public PasswordEncoder passwordEncoder() { + return new BCryptPasswordEncoder(); + } +} diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/WelcomeController.java b/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/WelcomeController.java new file mode 100644 index 0000000000..72ad8abb85 --- /dev/null +++ b/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/WelcomeController.java @@ -0,0 +1,15 @@ +package org.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 { + + @GetMapping("/welcome") + public String welcome() { + return "ssl/welcome"; + } + +} diff --git a/spring-security-mvc-boot/src/main/resources/application-ssl.properties b/spring-security-mvc-boot/src/main/resources/application-ssl.properties new file mode 100644 index 0000000000..090b775d03 --- /dev/null +++ b/spring-security-mvc-boot/src/main/resources/application-ssl.properties @@ -0,0 +1,20 @@ + +http.port=8080 + +server.port=8443 + +security.require-ssl=true + +# The format used for the keystore +server.ssl.key-store-type=PKCS12 +# The path to the keystore containing the certificate +server.ssl.key-store=classpath:keystore/baeldung.p12 +# The password used to generate the certificate +server.ssl.key-store-password=password +# The alias mapped to the certificate +server.ssl.key-alias=baeldung + +#trust store location +trust.store=classpath:keystore/baeldung.p12 +#trust store password +trust.store.password=password diff --git a/spring-security-mvc-boot/src/main/resources/keystore/baeldung.p12 b/spring-security-mvc-boot/src/main/resources/keystore/baeldung.p12 new file mode 100644 index 0000000000000000000000000000000000000000..cd8eb284297009e987aa1a1d6b53c48af587776e GIT binary patch literal 2603 zcmY+EXEYlM8^;r3M9o+w1hFbbqGHbuyEIm+snTk!hO1FpR7GP|aZ6j;auK8UtQAG7 zV$YhT2qmc9Vcsg&`=0l`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V5C?BxcWE^ZbsbGD4K!Lq9j$XL zP=~)u9PGzVH91CSS%84!rTb3;{Fi0f|6^H4*Oa*e3xdCLeiF;!_o?hv z0tk<&E}^>5tfsiw#0xZ84jjfMZW)O9@|xuvB=#S%RSw(YvpJl=fCsPWzeWCMix(mA7RsU@{fe{o=Xy>Pp*}`%+i`nlk|N9x!FxG2)|X4 zEKw@1^=34F&2qQi9j@PN8d^HCdnwkH+SwDtAaoOs>MrPVqq+6GsLWG{iP!raR{296 zn)bo1Ypxj{s&Zq3PJ)r!`Io^PGnnr+kk7{UX+IJgRt#f%T8fU$?%w|Vop*RwEGqa{ z(WG3c0FW|}N4&}s$|j#RGGV2oSE>W{OZ@E-b47trP;YC$ z=vPW$1m1o3sc292)J35Y(%$!P4;0VKD5xumEa}b>FU(NpzSChk7S=$(X973=-bj9{y};Q81=IyKM8_P=YATS4wxXidLc;YHIX!VEoy)KSNh5GdGhbD-AIfz3o9_1@)sB) B#c}`u literal 0 HcmV?d00001 diff --git a/spring-security-mvc-boot/src/main/resources/templates/ssl/welcome.html b/spring-security-mvc-boot/src/main/resources/templates/ssl/welcome.html new file mode 100644 index 0000000000..93b3577f5c --- /dev/null +++ b/spring-security-mvc-boot/src/main/resources/templates/ssl/welcome.html @@ -0,0 +1 @@ +

Welcome to Secured Site

\ No newline at end of file diff --git a/spring-security-mvc-boot/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java b/spring-security-mvc-boot/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java new file mode 100644 index 0000000000..63b421604a --- /dev/null +++ b/spring-security-mvc-boot/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java @@ -0,0 +1,67 @@ +package org.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 org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.core.io.Resource; +import org.springframework.http.*; +import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; +import org.springframework.test.context.ActiveProfiles; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.web.client.RestTemplate; + +import javax.net.ssl.SSLContext; +import java.util.Base64; + +import static org.junit.Assert.assertEquals; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = HttpsEnabledApplication.class, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) +@ActiveProfiles("ssl") +public class HttpsApplicationIntegrationTest { + + private static final String WELCOME_URL = "https://localhost:8443/welcome"; + + @Value("${trust.store}") + private Resource trustStore; + + @Value("${trust.store.password}") + private String trustStorePassword; + + @Test + public void whenGETanHTTPSResource_thenCorrectResponse() throws Exception { + ResponseEntity response = restTemplate().exchange(WELCOME_URL, HttpMethod.GET, new HttpEntity(withAuthorization("memuser", "pass")), String.class); + + assertEquals("

Welcome to Secured Site

", response.getBody()); + assertEquals(HttpStatus.OK, response.getStatusCode()); + } + + RestTemplate restTemplate() throws Exception { + SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(trustStore.getURL(), trustStorePassword.toCharArray()) + .build(); + SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(sslContext); + HttpClient httpClient = HttpClients.custom() + .setSSLSocketFactory(socketFactory) + .build(); + HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(httpClient); + return new RestTemplate(factory); + } + + HttpHeaders withAuthorization(String userName, String password) { + return new HttpHeaders() { + { + String auth = userName + ":" + password; + String authHeader = "Basic " + new String(Base64.getEncoder() + .encode(auth.getBytes())); + set("Authorization", authHeader); + } + }; + } + +} From daa1de25a2d346d6a5cb7043c5023e4c2cf11282 Mon Sep 17 00:00:00 2001 From: Pranay jain Date: Thu, 18 Oct 2018 12:59:24 +0530 Subject: [PATCH 28/37] BAEL-2236: Reading a CSV file into a array --- core-java-io/pom.xml | 8 +- .../baeldung/csv/ReadCSVInArrayUnitTest.java | 106 ++++++++++++++++++ core-java-io/src/test/resources/book.csv | 2 + 3 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 core-java-io/src/test/java/com/baeldung/csv/ReadCSVInArrayUnitTest.java create mode 100644 core-java-io/src/test/resources/book.csv diff --git a/core-java-io/pom.xml b/core-java-io/pom.xml index cf3e950cb8..efa32b8e3e 100644 --- a/core-java-io/pom.xml +++ b/core-java-io/pom.xml @@ -154,6 +154,12 @@ async-http-client ${async-http-client.version} + + com.opencsv + opencsv + ${opencsv.version} + test + @@ -247,7 +253,7 @@ 1.13 0.6.5 0.9.0 - + 4.1 3.6.1 1.7.0 diff --git a/core-java-io/src/test/java/com/baeldung/csv/ReadCSVInArrayUnitTest.java b/core-java-io/src/test/java/com/baeldung/csv/ReadCSVInArrayUnitTest.java new file mode 100644 index 0000000000..2593eee82b --- /dev/null +++ b/core-java-io/src/test/java/com/baeldung/csv/ReadCSVInArrayUnitTest.java @@ -0,0 +1,106 @@ +package com.baeldung.csv; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Scanner; + +import org.junit.Assert; +import org.junit.Test; + +import com.opencsv.CSVReader; + +public class ReadCSVInArrayUnitTest { + public static final String COMMA_DELIMITER = ","; + public static final String CSV_FILE = "src/test/resources/book.csv"; + public static final List> EXPECTED_ARRAY = Collections.unmodifiableList(new ArrayList>() { + { + add(new ArrayList() { + { + add("Mary Kom"); + add("Unbreakable"); + } + }); + add(new ArrayList() { + { + add("Kapil Isapuari"); + add("Farishta"); + } + }); + } + }); + + @Test + public void givenCSVFile_whenBufferedReader_thenContentsAsExpected() throws IOException { + List> records = new ArrayList>(); + try (BufferedReader br = new BufferedReader(new FileReader(CSV_FILE))) { + String line = ""; + while ((line = br.readLine()) != null) { + String[] values = line.split(COMMA_DELIMITER); + records.add(Arrays.asList(values)); + } + } catch (Exception e) { + e.printStackTrace(); + } + for (int i = 0; i < EXPECTED_ARRAY.size(); i++) { + Assert.assertArrayEquals(EXPECTED_ARRAY.get(i) + .toArray(), + records.get(i) + .toArray()); + } + } + + @Test + public void givenCSVFile_whenScanner_thenContentsAsExpected() throws IOException { + List> records = new ArrayList>(); + try (Scanner scanner = new Scanner(new File(CSV_FILE));) { + while (scanner.hasNextLine()) { + records.add(getRecordFromLine(scanner.nextLine())); + } + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + for (int i = 0; i < EXPECTED_ARRAY.size(); i++) { + Assert.assertArrayEquals(EXPECTED_ARRAY.get(i) + .toArray(), + records.get(i) + .toArray()); + } + } + + private List getRecordFromLine(String line) { + List values = new ArrayList(); + try (Scanner rowScanner = new Scanner(line)) { + rowScanner.useDelimiter(COMMA_DELIMITER); + while (rowScanner.hasNext()) { + values.add(rowScanner.next()); + } + } + return values; + } + + @Test + public void givenCSVFile_whenOpencsv_thenContentsAsExpected() throws IOException { + List> records = new ArrayList>(); + try (CSVReader csvReader = new CSVReader(new FileReader(CSV_FILE));) { + String[] values = null; + while ((values = csvReader.readNext()) != null) { + records.add(Arrays.asList(values)); + } + } catch (Exception e) { + e.printStackTrace(); + } + for (int i = 0; i < EXPECTED_ARRAY.size(); i++) { + Assert.assertArrayEquals(EXPECTED_ARRAY.get(i) + .toArray(), + records.get(i) + .toArray()); + } + } +} diff --git a/core-java-io/src/test/resources/book.csv b/core-java-io/src/test/resources/book.csv new file mode 100644 index 0000000000..b7c4b80499 --- /dev/null +++ b/core-java-io/src/test/resources/book.csv @@ -0,0 +1,2 @@ +Mary Kom,Unbreakable +Kapil Isapuari,Farishta \ No newline at end of file From 6fa2361283915ab562115dc7bc0b28b563206e41 Mon Sep 17 00:00:00 2001 From: DomWos Date: Mon, 22 Oct 2018 11:51:37 +0200 Subject: [PATCH 29/37] Fixes according to comments. --- .../java/com/baeldung/storm/bolt/FileWritingBolt.java | 10 ++++++++++ .../com/baeldung/storm/spout/RandomNumberSpout.java | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libraries-data/src/main/java/com/baeldung/storm/bolt/FileWritingBolt.java b/libraries-data/src/main/java/com/baeldung/storm/bolt/FileWritingBolt.java index 40ed72164d..339e0dc055 100644 --- a/libraries-data/src/main/java/com/baeldung/storm/bolt/FileWritingBolt.java +++ b/libraries-data/src/main/java/com/baeldung/storm/bolt/FileWritingBolt.java @@ -22,6 +22,7 @@ public class FileWritingBolt extends BaseRichBolt { private BufferedWriter writer; private String filePath; private ObjectMapper objectMapper; + @Override public void prepare(Map map, TopologyContext topologyContext, OutputCollector outputCollector) { objectMapper = new ObjectMapper(); @@ -55,6 +56,15 @@ public class FileWritingBolt extends BaseRichBolt { this.filePath = filePath; } + @Override + public void cleanup() { + try { + writer.close(); + } catch (IOException e) { + logger.error("Failed to close the writer!"); + } + } + @Override public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) { diff --git a/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java b/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java index 371a61720a..26fb1d82c0 100644 --- a/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java +++ b/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java @@ -26,7 +26,7 @@ public class RandomNumberSpout extends BaseRichSpout { public void nextTuple() { Utils.sleep(1000); //This will select random int from the range (-1000, 1000) - int operation = random.nextInt(1000 + 1 + 1000) - 1000; + int operation = random.nextInt(101); long timestamp = System.currentTimeMillis(); Values values = new Values(operation, timestamp); From aed1514c0b73bd0e00e11e7de6b4fa65842935e2 Mon Sep 17 00:00:00 2001 From: DomWos Date: Mon, 22 Oct 2018 11:54:39 +0200 Subject: [PATCH 30/37] Filtering fix. --- .../src/main/java/com/baeldung/storm/bolt/FilteringBolt.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries-data/src/main/java/com/baeldung/storm/bolt/FilteringBolt.java b/libraries-data/src/main/java/com/baeldung/storm/bolt/FilteringBolt.java index a2e80deb33..564076a1df 100644 --- a/libraries-data/src/main/java/com/baeldung/storm/bolt/FilteringBolt.java +++ b/libraries-data/src/main/java/com/baeldung/storm/bolt/FilteringBolt.java @@ -10,7 +10,7 @@ public class FilteringBolt extends BaseBasicBolt { @Override public void execute(Tuple tuple, BasicOutputCollector basicOutputCollector) { int operation = tuple.getIntegerByField("operation"); - if(operation >= 0 ) { + if(operation > 0 ) { basicOutputCollector.emit(tuple.getValues()); } } From c533462382afb1c0ffe95c72ab888583062c4a5f Mon Sep 17 00:00:00 2001 From: sandy03934 Date: Mon, 22 Oct 2018 21:08:39 +0530 Subject: [PATCH 31/37] Bael 2262 : Removed the basic authentication from HTTPS Enabled Application (#5516) * BAEL-1979 Added examples for SnakeYAML Library * BAEL-1979 Moved the snakeyaml related code to libraries module * BAEL-1979 Removed the System.out.println() statements and converted the assertTrue to assertEquals wherever possible. * BAEL-1979 Removed println statements, small formatting fix in pom.xml * BAEL-1466 Added a new module for apache-geode * BAEL-1466 Updated the Integration Tests. * BAEL-1466 Updated the Integration Tests. * BAEL-1466 Updated the Integration Tests. * BAEL-1466 Removed the Unnecessary code. * BAEL-2262 Added code for demonstration of HTTPS enabled Spring Boot Application * BAEL-2262 Removed the Basic Authentication from the HttpsEnabledApplication. --- .../java/org/baeldung/ssl/SecurityConfig.java | 26 +++---------------- .../web/HttpsApplicationIntegrationTest.java | 19 +++----------- 2 files changed, 7 insertions(+), 38 deletions(-) diff --git a/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/SecurityConfig.java b/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/SecurityConfig.java index 98a59b11bb..92f92d8fc7 100644 --- a/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/SecurityConfig.java +++ b/spring-security-mvc-boot/src/main/java/org/baeldung/ssl/SecurityConfig.java @@ -1,36 +1,16 @@ package org.baeldung.ssl; -import org.springframework.context.annotation.Bean; -import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import org.springframework.security.crypto.password.PasswordEncoder; @EnableWebSecurity public class SecurityConfig extends WebSecurityConfigurerAdapter { - @Override - public void configure(AuthenticationManagerBuilder auth) throws Exception { - - auth.inMemoryAuthentication() - .withUser("memuser") - .password(passwordEncoder().encode("pass")) - .roles("USER"); - } - @Override protected void configure(HttpSecurity http) throws Exception { - http.httpBasic() - .and() - .authorizeRequests() - .antMatchers("/**") - .authenticated(); - } - - @Bean - public PasswordEncoder passwordEncoder() { - return new BCryptPasswordEncoder(); + http.authorizeRequests() + .antMatchers("/**") + .permitAll(); } } diff --git a/spring-security-mvc-boot/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java b/spring-security-mvc-boot/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java index 63b421604a..fe7883ec94 100644 --- a/spring-security-mvc-boot/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java +++ b/spring-security-mvc-boot/src/test/java/org/baeldung/web/HttpsApplicationIntegrationTest.java @@ -10,14 +10,15 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.core.io.Resource; -import org.springframework.http.*; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.web.client.RestTemplate; import javax.net.ssl.SSLContext; -import java.util.Base64; +import java.util.Collections; import static org.junit.Assert.assertEquals; @@ -36,7 +37,7 @@ public class HttpsApplicationIntegrationTest { @Test public void whenGETanHTTPSResource_thenCorrectResponse() throws Exception { - ResponseEntity response = restTemplate().exchange(WELCOME_URL, HttpMethod.GET, new HttpEntity(withAuthorization("memuser", "pass")), String.class); + ResponseEntity response = restTemplate().getForEntity(WELCOME_URL, String.class, Collections.emptyMap()); assertEquals("

Welcome to Secured Site

", response.getBody()); assertEquals(HttpStatus.OK, response.getStatusCode()); @@ -52,16 +53,4 @@ public class HttpsApplicationIntegrationTest { HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(httpClient); return new RestTemplate(factory); } - - HttpHeaders withAuthorization(String userName, String password) { - return new HttpHeaders() { - { - String auth = userName + ":" + password; - String authHeader = "Basic " + new String(Base64.getEncoder() - .encode(auth.getBytes())); - set("Authorization", authHeader); - } - }; - } - } From fc139249625b505766d7c674def1e8eb377cb331 Mon Sep 17 00:00:00 2001 From: charlesgonzales <39999268+charlesgonzales@users.noreply.github.com> Date: Tue, 23 Oct 2018 16:57:41 +0800 Subject: [PATCH 32/37] Bi-monthly fix (BAEL-9663) (#5523) * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.MD * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Create README.md * Update README.md * Update README.md * Update README.md --- algorithms/README.md | 3 +++ apache-geode/README.md | 3 +++ core-java-collections/README.md | 1 + core-java-io/README.md | 3 ++- core-java/README.md | 1 + core-kotlin/README.md | 1 + hibernate5/README.md | 1 + java-collections-maps/README.md | 1 + java-dates/README.md | 3 ++- java-numbers/README.md | 1 + libraries-security/README.md | 1 + maven-polyglot/README.md | 3 ++- maven/README.md | 3 +++ spring-5-reactive-security/README.md | 2 +- spring-boot-mvc/README.md | 3 ++- spring-boot/README.MD | 1 + testing-modules/testng/README.md | 1 + xml/README.md | 1 + 18 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 apache-geode/README.md diff --git a/algorithms/README.md b/algorithms/README.md index 9d347869bd..b9a37a7bf2 100644 --- a/algorithms/README.md +++ b/algorithms/README.md @@ -31,3 +31,6 @@ - [Round Up to the Nearest Hundred](https://www.baeldung.com/java-round-up-nearest-hundred) - [Merge Sort in Java](https://www.baeldung.com/java-merge-sort) - [Calculate Percentage in Java](https://www.baeldung.com/java-calculate-percentage) +- [Quicksort Algorithm Implementation in Java](https://www.baeldung.com/java-quicksort) +- [Insertion Sort in Java](https://www.baeldung.com/java-insertion-sort) +- [Converting Between Byte Arrays and Hexadecimal Strings in Java](https://www.baeldung.com/java-byte-arrays-hex-strings) diff --git a/apache-geode/README.md b/apache-geode/README.md new file mode 100644 index 0000000000..2f04418825 --- /dev/null +++ b/apache-geode/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [A Quick Guide to Apache Geode](https://www.baeldung.com/apache-geode) diff --git a/core-java-collections/README.md b/core-java-collections/README.md index 684beda281..d0aaaa7182 100644 --- a/core-java-collections/README.md +++ b/core-java-collections/README.md @@ -38,3 +38,4 @@ - [Time Complexity of Java Collections](https://www.baeldung.com/java-collections-complexity) - [Operating on and Removing an Item from Stream](https://www.baeldung.com/java-use-remove-item-stream) - [An Introduction to Synchronized Java Collections](https://www.baeldung.com/java-synchronized-collections) +- [Guide to EnumSet](https://www.baeldung.com/java-enumset) diff --git a/core-java-io/README.md b/core-java-io/README.md index 58e331b6fc..ae4c267b8a 100644 --- a/core-java-io/README.md +++ b/core-java-io/README.md @@ -31,4 +31,5 @@ - [Create a Symbolic Link with Java](http://www.baeldung.com/java-symlink) - [Quick Use of FilenameFilter](http://www.baeldung.com/java-filename-filter) - [Initialize a HashMap in Java](https://www.baeldung.com/java-initialize-hashmap) -- [ Read a File into an ArrayList](https://www.baeldung.com/java-file-to-arraylist) +- [Read a File into an ArrayList](https://www.baeldung.com/java-file-to-arraylist) +- [Guide to Java OutputStream](https://www.baeldung.com/java-outputstream) diff --git a/core-java/README.md b/core-java/README.md index 1cbbfe2b39..59aab91aa9 100644 --- a/core-java/README.md +++ b/core-java/README.md @@ -157,3 +157,4 @@ - [Hashing a Password in Java](https://www.baeldung.com/java-password-hashing) - [Java Switch Statement](https://www.baeldung.com/java-switch) - [The Modulo Operator in Java](https://www.baeldung.com/modulo-java) +- [Ternary Operator In Java](https://www.baeldung.com/java-ternary-operator) diff --git a/core-kotlin/README.md b/core-kotlin/README.md index 523f5b6e78..9906b59a93 100644 --- a/core-kotlin/README.md +++ b/core-kotlin/README.md @@ -39,3 +39,4 @@ - [Introduction to Kovenant Library for Kotlin](https://www.baeldung.com/kotlin-kovenant) - [Converting Kotlin Data Class from JSON using GSON](https://www.baeldung.com/kotlin-json-convert-data-class) - [Concatenate Strings in Kotlin](https://www.baeldung.com/kotlin-concatenate-strings) +- [Kotlin return, break, continue Keywords](https://www.baeldung.com/kotlin-return-break-continue) diff --git a/hibernate5/README.md b/hibernate5/README.md index fbf46eed50..7f52531076 100644 --- a/hibernate5/README.md +++ b/hibernate5/README.md @@ -17,3 +17,4 @@ - [Mapping A Hibernate Query to a Custom Class](https://www.baeldung.com/hibernate-query-to-custom-class) - [@JoinColumn Annotation Explained](https://www.baeldung.com/jpa-join-column) - [Hibernate 5 Naming Strategy Configuration](https://www.baeldung.com/hibernate-naming-strategy) +- [Proxy in Hibernate load() Method](https://www.baeldung.com/hibernate-proxy-load-method) diff --git a/java-collections-maps/README.md b/java-collections-maps/README.md index ca7fee1d21..a6037a3c57 100644 --- a/java-collections-maps/README.md +++ b/java-collections-maps/README.md @@ -16,3 +16,4 @@ - [Sort a HashMap in Java](https://www.baeldung.com/java-hashmap-sort) - [Finding the Highest Value in a Java Map](https://www.baeldung.com/java-find-map-max) - [Merging Two Maps with Java 8](https://www.baeldung.com/java-merge-maps) +- [How to Check If a Key Exists in a Map](https://www.baeldung.com/java-map-key-exists) diff --git a/java-dates/README.md b/java-dates/README.md index 54843f90ee..f99bfeb861 100644 --- a/java-dates/README.md +++ b/java-dates/README.md @@ -21,4 +21,5 @@ - [How to Get the Start and the End of a Day using Java](http://www.baeldung.com/java-day-start-end) - [Calculate Age in Java](http://www.baeldung.com/java-get-age) - [Increment Date in Java](http://www.baeldung.com/java-increment-date) -- [Add Hours To a Date In Java](http://www.baeldung.com/java-add-hours-date) \ No newline at end of file +- [Add Hours To a Date In Java](http://www.baeldung.com/java-add-hours-date) +- [Guide to DateTimeFormatter](https://www.baeldung.com/java-datetimeformatter) diff --git a/java-numbers/README.md b/java-numbers/README.md index 6d6a279cc9..1138d9a74c 100644 --- a/java-numbers/README.md +++ b/java-numbers/README.md @@ -12,3 +12,4 @@ - [BigDecimal and BigInteger in Java](http://www.baeldung.com/java-bigdecimal-biginteger) - [Find All Pairs of Numbers in an Array That Add Up to a Given Sum](http://www.baeldung.com/java-algorithm-number-pairs-sum) - [Java – Random Long, Float, Integer and Double](http://www.baeldung.com/java-generate-random-long-float-integer-double) +- [Using Math.sin with Degrees](https://www.baeldung.com/java-math-sin-degrees) diff --git a/libraries-security/README.md b/libraries-security/README.md index c42e91a888..6923e0474e 100644 --- a/libraries-security/README.md +++ b/libraries-security/README.md @@ -1,3 +1,4 @@ ### Relevant Articles: - [Guide to ScribeJava](https://www.baeldung.com/scribejava) +- [Guide to Passay](https://www.baeldung.com/java-passay) diff --git a/maven-polyglot/README.md b/maven-polyglot/README.md index 589315efd1..8635c8eddf 100644 --- a/maven-polyglot/README.md +++ b/maven-polyglot/README.md @@ -1,3 +1,4 @@ To run the maven-polyglot-json-app successfully, you first have to build the maven-polyglot-json-extension module using: mvn clean install. -Related Articles: +### Relevant Articles: +- [Maven Polyglot](https://www.baeldung.com/maven-polyglot) diff --git a/maven/README.md b/maven/README.md index 2d838bcb76..970250d142 100644 --- a/maven/README.md +++ b/maven/README.md @@ -10,3 +10,6 @@ - [Build a Jar with Maven and Ignore the Test Results](http://www.baeldung.com/maven-ignore-test-results) - [Maven Project with Multiple Source Directories](https://www.baeldung.com/maven-project-multiple-src-directories) - [Integration Testing with Maven](https://www.baeldung.com/maven-integration-test) +- [Apache Maven Standard Directory Layout](https://www.baeldung.com/maven-directory-structure) +- [Apache Maven Tutorial](https://www.baeldung.com/maven) +- [Use the Latest Version of a Dependency in Maven](https://www.baeldung.com/maven-dependency-latest-version) diff --git a/spring-5-reactive-security/README.md b/spring-5-reactive-security/README.md index 3395cf5562..845d07cd7f 100644 --- a/spring-5-reactive-security/README.md +++ b/spring-5-reactive-security/README.md @@ -8,4 +8,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Spring Boot Actuator](http://www.baeldung.com/spring-boot-actuators) - [Spring Security 5 for Reactive Applications](http://www.baeldung.com/spring-security-5-reactive) - [Guide to Spring 5 WebFlux](http://www.baeldung.com/spring-webflux) - +- [Introduction to the Functional Web Framework in Spring 5](https://www.baeldung.com/spring-5-functional-web) diff --git a/spring-boot-mvc/README.md b/spring-boot-mvc/README.md index b46dbe3bae..e7b42f8f50 100644 --- a/spring-boot-mvc/README.md +++ b/spring-boot-mvc/README.md @@ -7,4 +7,5 @@ - [Spring Web Annotations](http://www.baeldung.com/spring-mvc-annotations) - [Spring Core Annotations](http://www.baeldung.com/spring-core-annotations) - [Display RSS Feed with Spring MVC](http://www.baeldung.com/spring-mvc-rss-feed) - +- [A Controller, Service and DAO Example with Spring Boot and JSF](https://www.baeldung.com/jsf-spring-boot-controller-service-dao) +- [Cache Eviction in Spring Boot](https://www.baeldung.com/spring-boot-evict-cache) diff --git a/spring-boot/README.MD b/spring-boot/README.MD index aed2d2c5f8..9a9f44e1cf 100644 --- a/spring-boot/README.MD +++ b/spring-boot/README.MD @@ -35,3 +35,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Spring Component Scanning](https://www.baeldung.com/spring-component-scanning) - [Load Spring Boot Properties From a JSON File](https://www.baeldung.com/spring-boot-json-properties) - [Display Auto-Configuration Report in Spring Boot](https://www.baeldung.com/spring-boot-auto-configuration-report) +- [Logging to Graylog with Spring Boot](https://www.baeldung.com/graylog-with-spring-boot) diff --git a/testing-modules/testng/README.md b/testing-modules/testng/README.md index e54ee1dbf2..a7e0e29d62 100644 --- a/testing-modules/testng/README.md +++ b/testing-modules/testng/README.md @@ -2,3 +2,4 @@ - [Introduction to TestNG](http://www.baeldung.com/testng) - [Custom Reporting with TestNG](http://www.baeldung.com/testng-custom-reporting) +- [A Quick JUnit vs TestNG Comparison](https://www.baeldung.com/junit-vs-testng) diff --git a/xml/README.md b/xml/README.md index 80c6a069f0..fb070100db 100644 --- a/xml/README.md +++ b/xml/README.md @@ -3,3 +3,4 @@ - [Introduction to JiBX](http://www.baeldung.com/jibx) - [XML Libraries Support in Java](http://www.baeldung.com/java-xml-libraries) - [DOM parsing with Xerces](http://www.baeldung.com/java-xerces-dom-parsing) +- [Write an org.w3.dom.Document to a File](https://www.baeldung.com/java-write-xml-document-file) From 6f34ca1de2e1edb79c7751514446eda991500a0b Mon Sep 17 00:00:00 2001 From: DomWos Date: Tue, 23 Oct 2018 12:09:46 +0200 Subject: [PATCH 33/37] Changed the comment about random range to proper values. --- .../main/java/com/baeldung/storm/spout/RandomNumberSpout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java b/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java index 26fb1d82c0..c9291cdc9d 100644 --- a/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java +++ b/libraries-data/src/main/java/com/baeldung/storm/spout/RandomNumberSpout.java @@ -25,7 +25,7 @@ public class RandomNumberSpout extends BaseRichSpout { @Override public void nextTuple() { Utils.sleep(1000); - //This will select random int from the range (-1000, 1000) + //This will select random int from the range (0, 100) int operation = random.nextInt(101); long timestamp = System.currentTimeMillis(); From 1bca2a8c54a4827d22b5da196cd0174ca16c0fbf Mon Sep 17 00:00:00 2001 From: Grzegorz Piwowarek Date: Tue, 23 Oct 2018 04:50:09 -0700 Subject: [PATCH 34/37] Update README.md (#5525) --- persistence-modules/spring-data-mongodb/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/persistence-modules/spring-data-mongodb/README.md b/persistence-modules/spring-data-mongodb/README.md index 4e12a2218a..c7bc7584be 100644 --- a/persistence-modules/spring-data-mongodb/README.md +++ b/persistence-modules/spring-data-mongodb/README.md @@ -11,3 +11,4 @@ - [Introduction to Spring Data MongoDB](http://www.baeldung.com/spring-data-mongodb-tutorial) - [Spring Data MongoDB: Projections and Aggregations](http://www.baeldung.com/spring-data-mongodb-projections-aggregations) - [Spring Data Annotations](http://www.baeldung.com/spring-data-annotations) +- [Spring Data MongoDB Transactions](https://www.baeldung.com/spring-data-mongodb-transactions ) From 2809811d9fe32d2417f5a7e04aee19d558c5c42c Mon Sep 17 00:00:00 2001 From: Nikhil Khatwani Date: Tue, 23 Oct 2018 17:56:26 +0530 Subject: [PATCH 35/37] Changes for BAEL-2215 --- .../collection/CollectionInjectionDemo.java | 1 + .../com/baeldung/collection/CollectionsBean.java | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/spring-core/src/main/java/com/baeldung/collection/CollectionInjectionDemo.java b/spring-core/src/main/java/com/baeldung/collection/CollectionInjectionDemo.java index 2e0d9eb8d8..2ee265f134 100644 --- a/spring-core/src/main/java/com/baeldung/collection/CollectionInjectionDemo.java +++ b/spring-core/src/main/java/com/baeldung/collection/CollectionInjectionDemo.java @@ -16,5 +16,6 @@ public class CollectionInjectionDemo { collectionsBean.printNameSet(); collectionsBean.printNameMap(); collectionsBean.printBeanList(); + collectionsBean.printNameListWithDefaults(); } } diff --git a/spring-core/src/main/java/com/baeldung/collection/CollectionsBean.java b/spring-core/src/main/java/com/baeldung/collection/CollectionsBean.java index a0e985267f..fc90f2c6ff 100644 --- a/spring-core/src/main/java/com/baeldung/collection/CollectionsBean.java +++ b/spring-core/src/main/java/com/baeldung/collection/CollectionsBean.java @@ -1,13 +1,14 @@ package com.baeldung.collection; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; + /** * Created by Gebruiker on 5/18/2018. */ @@ -24,6 +25,9 @@ public class CollectionsBean { @Qualifier("CollectionsBean") private List beanList = new ArrayList<>(); + @Value("${names.list:}#{T(java.util.Collections).emptyList()}") + private List nameListWithDefaultValue; + public CollectionsBean() { } @@ -51,4 +55,8 @@ public class CollectionsBean { public void printBeanList() { System.out.println(beanList); } + + public void printNameListWithDefaults() { + System.out.println(nameListWithDefaultValue); + } } From e24426923eb5a254bd4620200c62305a7c0975a3 Mon Sep 17 00:00:00 2001 From: daoire Date: Tue, 23 Oct 2018 21:09:29 +0100 Subject: [PATCH 36/37] Refactor Code and add Tests (#5251) --- .../com/baeldung/string/DoubleToString.java | 41 +++++++++++++++++ .../string/DoubleToStringUnitTest.java | 45 +++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 core-java/src/main/java/com/baeldung/string/DoubleToString.java create mode 100644 core-java/src/test/java/com/baeldung/string/DoubleToStringUnitTest.java diff --git a/core-java/src/main/java/com/baeldung/string/DoubleToString.java b/core-java/src/main/java/com/baeldung/string/DoubleToString.java new file mode 100644 index 0000000000..d26d26f3df --- /dev/null +++ b/core-java/src/main/java/com/baeldung/string/DoubleToString.java @@ -0,0 +1,41 @@ +package com.baeldung.string; + +import java.math.RoundingMode; +import java.text.DecimalFormat; +import java.text.NumberFormat; + +public class DoubleToString { + + public static String truncateByCast(double d) { + return String.valueOf((int) d); + } + + public static String roundWithStringFormat(double d) { + return String.format("%.0f", d); + } + + public static String truncateWithNumberFormat(double d) { + NumberFormat nf = NumberFormat.getInstance(); + nf.setMaximumFractionDigits(0); + nf.setRoundingMode(RoundingMode.FLOOR); + return nf.format(d); + } + + public static String roundWithNumberFormat(double d) { + NumberFormat nf = NumberFormat.getInstance(); + nf.setMaximumFractionDigits(0); + return nf.format(d); + } + + public static String truncateWithDecimalFormat(double d) { + DecimalFormat df = new DecimalFormat("#,###"); + df.setRoundingMode(RoundingMode.FLOOR); + return df.format(d); + } + + public static String roundWithDecimalFormat(double d) { + DecimalFormat df = new DecimalFormat("#,###"); + return df.format(d); + } + +} diff --git a/core-java/src/test/java/com/baeldung/string/DoubleToStringUnitTest.java b/core-java/src/test/java/com/baeldung/string/DoubleToStringUnitTest.java new file mode 100644 index 0000000000..5212d7aa1a --- /dev/null +++ b/core-java/src/test/java/com/baeldung/string/DoubleToStringUnitTest.java @@ -0,0 +1,45 @@ +package com.baeldung.string; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.Test; + +public class DoubleToStringUnitTest { + + private static final double DOUBLE_VALUE = 3.56; + private static final String TRUNCATED_DOUBLE = "3"; + private static final String ROUNDED_UP_DOUBLE = "4"; + + + @Test + public void truncateByCastTest() { + assertThat(DoubleToString.truncateByCast(DOUBLE_VALUE)).isEqualTo(TRUNCATED_DOUBLE); + } + + @Test + public void roundingWithStringFormatTest() { + assertThat(DoubleToString.roundWithStringFormat(DOUBLE_VALUE)).isEqualTo(ROUNDED_UP_DOUBLE); + } + + @Test + public void truncateWithNumberFormatTest() { + assertThat(DoubleToString.truncateWithNumberFormat(DOUBLE_VALUE)).isEqualTo(TRUNCATED_DOUBLE); + } + + @Test + public void roundWithNumberFormatTest() { + assertThat(DoubleToString.roundWithNumberFormat(DOUBLE_VALUE)).isEqualTo(ROUNDED_UP_DOUBLE); + } + + @Test + public void truncateWithDecimalFormatTest() { + assertThat(DoubleToString.truncateWithDecimalFormat(DOUBLE_VALUE)).isEqualTo(TRUNCATED_DOUBLE); + } + + @Test + public void roundWithDecimalFormatTest() { + assertThat(DoubleToString.roundWithDecimalFormat(DOUBLE_VALUE)).isEqualTo(ROUNDED_UP_DOUBLE); + } + + +} From 7bd608207c8482d2511d8c0814e42e31feffe3cc Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Wed, 24 Oct 2018 22:29:28 +0300 Subject: [PATCH 37/37] fix bubble sort --- .../java/com/baeldung/algorithms/bubblesort/BubbleSort.java | 2 +- .../baeldung/algorithms/bubblesort/BubbleSortUnitTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/algorithms/src/main/java/com/baeldung/algorithms/bubblesort/BubbleSort.java b/algorithms/src/main/java/com/baeldung/algorithms/bubblesort/BubbleSort.java index a561072b2e..275cb7f3a2 100644 --- a/algorithms/src/main/java/com/baeldung/algorithms/bubblesort/BubbleSort.java +++ b/algorithms/src/main/java/com/baeldung/algorithms/bubblesort/BubbleSort.java @@ -7,7 +7,7 @@ public class BubbleSort { void bubbleSort(Integer[] arr) { int n = arr.length; IntStream.range(0, n - 1) - .flatMap(i -> IntStream.range(i + 1, n - i)) + .flatMap(i -> IntStream.range(1, n - i)) .forEach(j -> { if (arr[j - 1] > arr[j]) { int temp = arr[j]; diff --git a/algorithms/src/test/java/com/baeldung/algorithms/bubblesort/BubbleSortUnitTest.java b/algorithms/src/test/java/com/baeldung/algorithms/bubblesort/BubbleSortUnitTest.java index c7f3f7dc38..c3260a18dd 100644 --- a/algorithms/src/test/java/com/baeldung/algorithms/bubblesort/BubbleSortUnitTest.java +++ b/algorithms/src/test/java/com/baeldung/algorithms/bubblesort/BubbleSortUnitTest.java @@ -1,8 +1,8 @@ package com.baeldung.algorithms.bubblesort; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertArrayEquals; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class BubbleSortUnitTest {