From b14ead250c9419f032554e9c1082a9f06193d375 Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Sat, 25 Jan 2020 14:44:21 +0200 Subject: [PATCH 01/64] Update README.md --- core-kotlin-modules/core-kotlin/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-kotlin-modules/core-kotlin/README.md b/core-kotlin-modules/core-kotlin/README.md index 8815b0fadd..ae595bf18d 100644 --- a/core-kotlin-modules/core-kotlin/README.md +++ b/core-kotlin-modules/core-kotlin/README.md @@ -3,7 +3,7 @@ This module contains articles about Kotlin core features. ### Relevant articles: -- [Introduction to the Kotlin Language](https://www.baeldung.com/kotlin) +- [Introduction to the Kotlin Language](https://www.baeldung.com/kotlin-intro) - [Kotlin Java Interoperability](https://www.baeldung.com/kotlin-java-interoperability) - [Get a Random Number in Kotlin](https://www.baeldung.com/kotlin-random-number) - [Create a Java and Kotlin Project with Maven](https://www.baeldung.com/kotlin-maven-java-project) From 71a08d8d35880fd6a06a16c4687945c80b757fe7 Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Sat, 25 Jan 2020 14:46:26 +0200 Subject: [PATCH 02/64] Update README.md --- core-kotlin-modules/core-kotlin-2/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-kotlin-modules/core-kotlin-2/README.md b/core-kotlin-modules/core-kotlin-2/README.md index 11593062c5..3e607eb61b 100644 --- a/core-kotlin-modules/core-kotlin-2/README.md +++ b/core-kotlin-modules/core-kotlin-2/README.md @@ -4,5 +4,5 @@ This module contains articles about Kotlin core features. ### Relevant articles: - [Working with Dates in Kotlin](https://www.baeldung.com/kotlin-dates) -- [Kotlin Ternary Conditional Operator](https://www.baeldung.com/kotlin-ternary-conditional-operator) +- [Kotlin Ternary Conditional Operator](https://www.baeldung.com/kotlin-ternary-operator) - [[<-- Prev]](/core-kotlin-modules/core-kotlin) From a5e51972ec8dfc60a8d1f642aead2fa42f16d362 Mon Sep 17 00:00:00 2001 From: Krzysztof Woyke Date: Thu, 30 Jan 2020 10:02:25 +0100 Subject: [PATCH 03/64] BAEL-20886: Move spring-boot-security into spring-boot-modules --- pom.xml | 2 -- spring-boot-modules/pom.xml | 1 + .../spring-boot-security}/README.md | 0 .../spring-boot-security}/pom.xml | 2 +- .../baeldung/integrationtesting/MethodSecurityConfigurer.java | 0 .../com/baeldung/integrationtesting/SecuredApplication.java | 0 .../java/com/baeldung/integrationtesting/SecuredController.java | 0 .../java/com/baeldung/integrationtesting/SecuredService.java | 0 .../com/baeldung/integrationtesting/WebSecurityConfigurer.java | 0 .../autoconfig/SpringBootSecurityApplication.java | 0 .../autoconfig/config/BasicConfiguration.java | 2 +- .../oauth2resource/SpringBootOAuth2ResourceApplication.java | 0 .../oauth2server/SpringBootAuthorizationServerApplication.java | 0 .../oauth2server/config/AuthenticationMananagerConfig.java | 0 .../oauth2server/config/AuthorizationServerConfig.java | 0 .../oauth2server/config/WebSecurityConfiguration.java | 0 .../oauth2sso/SpringBootOAuth2SsoApplication.java | 0 .../java/com/baeldung/springsecuritytaglibs/HomeController.java | 0 .../SpringBootSecurityTagLibsApplication.java | 0 .../config/SpringBootSecurityTagLibsConfig.java | 0 .../src/main/resources/application-authz.properties | 0 .../src/main/resources/application-resource.properties | 0 .../src/main/resources/application-sso.properties | 0 .../src/main/resources/application-taglibs.properties | 0 .../src/main/resources/application.properties | 0 .../spring-boot-security}/src/main/resources/logback.xml | 0 .../spring-boot-security}/src/main/resources/static/index.html | 0 .../src/main/webapp/WEB-INF/views/home.jsp | 0 .../SecuredControllerRestTemplateIntegrationTest.java | 0 .../SecuredControllerSpringBootIntegrationTest.java | 0 .../SecuredControllerWebMvcIntegrationTest.java | 0 .../SecuredMethodSpringBootIntegrationTest.java | 0 .../autoconfig/config/BasicConfigurationIntegrationTest.java | 0 .../CustomConfigAuthorizationServerIntegrationTest.java | 0 .../DefaultConfigAuthorizationServerIntegrationTest.java | 0 .../oauth2server/OAuth2IntegrationTestSupport.java | 0 .../baeldung/springsecuritytaglibs/HomeControllerUnitTest.java | 0 37 files changed, 3 insertions(+), 4 deletions(-) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/README.md (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/pom.xml (98%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/integrationtesting/MethodSecurityConfigurer.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/integrationtesting/SecuredApplication.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/integrationtesting/SecuredController.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/integrationtesting/SecuredService.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/integrationtesting/WebSecurityConfigurer.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/springbootsecurity/autoconfig/SpringBootSecurityApplication.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java (96%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/springbootsecurity/oauth2resource/SpringBootOAuth2ResourceApplication.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/springbootsecurity/oauth2server/SpringBootAuthorizationServerApplication.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthenticationMananagerConfig.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthorizationServerConfig.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/WebSecurityConfiguration.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/springbootsecurity/oauth2sso/SpringBootOAuth2SsoApplication.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/springsecuritytaglibs/HomeController.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/springsecuritytaglibs/SpringBootSecurityTagLibsApplication.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/java/com/baeldung/springsecuritytaglibs/config/SpringBootSecurityTagLibsConfig.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/resources/application-authz.properties (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/resources/application-resource.properties (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/resources/application-sso.properties (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/resources/application-taglibs.properties (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/resources/application.properties (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/resources/logback.xml (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/resources/static/index.html (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/main/webapp/WEB-INF/views/home.jsp (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/test/java/com/baeldung/integrationtesting/SecuredControllerRestTemplateIntegrationTest.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/test/java/com/baeldung/integrationtesting/SecuredControllerSpringBootIntegrationTest.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/test/java/com/baeldung/integrationtesting/SecuredControllerWebMvcIntegrationTest.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/test/java/com/baeldung/integrationtesting/SecuredMethodSpringBootIntegrationTest.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/test/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfigurationIntegrationTest.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/test/java/com/baeldung/springbootsecurity/oauth2server/CustomConfigAuthorizationServerIntegrationTest.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/test/java/com/baeldung/springbootsecurity/oauth2server/DefaultConfigAuthorizationServerIntegrationTest.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/test/java/com/baeldung/springbootsecurity/oauth2server/OAuth2IntegrationTestSupport.java (100%) rename {spring-boot-security => spring-boot-modules/spring-boot-security}/src/test/java/com/baeldung/springsecuritytaglibs/HomeControllerUnitTest.java (100%) diff --git a/pom.xml b/pom.xml index 031d303229..11e7bfb82c 100644 --- a/pom.xml +++ b/pom.xml @@ -669,7 +669,6 @@ spring-boot-runtime/disabling-console-jul spring-boot-runtime/disabling-console-log4j2 spring-boot-runtime/disabling-console-logback - spring-boot-security spring-caching @@ -1200,7 +1199,6 @@ spring-boot-runtime/disabling-console-jul spring-boot-runtime/disabling-console-log4j2 spring-boot-runtime/disabling-console-logback - spring-boot-security spring-caching diff --git a/spring-boot-modules/pom.xml b/spring-boot-modules/pom.xml index e23f5aec90..4cf2ba0410 100644 --- a/spring-boot-modules/pom.xml +++ b/spring-boot-modules/pom.xml @@ -21,6 +21,7 @@ spring-boot-mvc-birt spring-boot-performance spring-boot-properties + spring-boot-security spring-boot-springdoc spring-boot-testing spring-boot-vue diff --git a/spring-boot-security/README.md b/spring-boot-modules/spring-boot-security/README.md similarity index 100% rename from spring-boot-security/README.md rename to spring-boot-modules/spring-boot-security/README.md diff --git a/spring-boot-security/pom.xml b/spring-boot-modules/spring-boot-security/pom.xml similarity index 98% rename from spring-boot-security/pom.xml rename to spring-boot-modules/spring-boot-security/pom.xml index 92397d42f8..a72113ce2f 100644 --- a/spring-boot-security/pom.xml +++ b/spring-boot-modules/spring-boot-security/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-security/src/main/java/com/baeldung/integrationtesting/MethodSecurityConfigurer.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/MethodSecurityConfigurer.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/integrationtesting/MethodSecurityConfigurer.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/MethodSecurityConfigurer.java diff --git a/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredApplication.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredApplication.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredApplication.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredApplication.java diff --git a/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredController.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredController.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredController.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredController.java diff --git a/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredService.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredService.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredService.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredService.java diff --git a/spring-boot-security/src/main/java/com/baeldung/integrationtesting/WebSecurityConfigurer.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/WebSecurityConfigurer.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/integrationtesting/WebSecurityConfigurer.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/WebSecurityConfigurer.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/SpringBootSecurityApplication.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/SpringBootSecurityApplication.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/SpringBootSecurityApplication.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/SpringBootSecurityApplication.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java similarity index 96% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java index 7060792df5..0a158a659c 100644 --- a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java +++ b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java @@ -22,7 +22,7 @@ public class BasicConfiguration extends WebSecurityConfigurerAdapter { .roles("USER") .and() .withUser("admin") - .password(encoder.encode("admin")) + .password(encoder.encode("admin"))cl .roles("USER", "ADMIN"); } diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2resource/SpringBootOAuth2ResourceApplication.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2resource/SpringBootOAuth2ResourceApplication.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2resource/SpringBootOAuth2ResourceApplication.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2resource/SpringBootOAuth2ResourceApplication.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/SpringBootAuthorizationServerApplication.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/SpringBootAuthorizationServerApplication.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/SpringBootAuthorizationServerApplication.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/SpringBootAuthorizationServerApplication.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthenticationMananagerConfig.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthenticationMananagerConfig.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthenticationMananagerConfig.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthenticationMananagerConfig.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthorizationServerConfig.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthorizationServerConfig.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthorizationServerConfig.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthorizationServerConfig.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/WebSecurityConfiguration.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/WebSecurityConfiguration.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/WebSecurityConfiguration.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/WebSecurityConfiguration.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2sso/SpringBootOAuth2SsoApplication.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2sso/SpringBootOAuth2SsoApplication.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2sso/SpringBootOAuth2SsoApplication.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2sso/SpringBootOAuth2SsoApplication.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/HomeController.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/HomeController.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/HomeController.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/HomeController.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/SpringBootSecurityTagLibsApplication.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/SpringBootSecurityTagLibsApplication.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/SpringBootSecurityTagLibsApplication.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/SpringBootSecurityTagLibsApplication.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/config/SpringBootSecurityTagLibsConfig.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/config/SpringBootSecurityTagLibsConfig.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/config/SpringBootSecurityTagLibsConfig.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/config/SpringBootSecurityTagLibsConfig.java diff --git a/spring-boot-security/src/main/resources/application-authz.properties b/spring-boot-modules/spring-boot-security/src/main/resources/application-authz.properties similarity index 100% rename from spring-boot-security/src/main/resources/application-authz.properties rename to spring-boot-modules/spring-boot-security/src/main/resources/application-authz.properties diff --git a/spring-boot-security/src/main/resources/application-resource.properties b/spring-boot-modules/spring-boot-security/src/main/resources/application-resource.properties similarity index 100% rename from spring-boot-security/src/main/resources/application-resource.properties rename to spring-boot-modules/spring-boot-security/src/main/resources/application-resource.properties diff --git a/spring-boot-security/src/main/resources/application-sso.properties b/spring-boot-modules/spring-boot-security/src/main/resources/application-sso.properties similarity index 100% rename from spring-boot-security/src/main/resources/application-sso.properties rename to spring-boot-modules/spring-boot-security/src/main/resources/application-sso.properties diff --git a/spring-boot-security/src/main/resources/application-taglibs.properties b/spring-boot-modules/spring-boot-security/src/main/resources/application-taglibs.properties similarity index 100% rename from spring-boot-security/src/main/resources/application-taglibs.properties rename to spring-boot-modules/spring-boot-security/src/main/resources/application-taglibs.properties diff --git a/spring-boot-security/src/main/resources/application.properties b/spring-boot-modules/spring-boot-security/src/main/resources/application.properties similarity index 100% rename from spring-boot-security/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-security/src/main/resources/application.properties diff --git a/spring-boot-security/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-security/src/main/resources/logback.xml similarity index 100% rename from spring-boot-security/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-security/src/main/resources/logback.xml diff --git a/spring-boot-security/src/main/resources/static/index.html b/spring-boot-modules/spring-boot-security/src/main/resources/static/index.html similarity index 100% rename from spring-boot-security/src/main/resources/static/index.html rename to spring-boot-modules/spring-boot-security/src/main/resources/static/index.html diff --git a/spring-boot-security/src/main/webapp/WEB-INF/views/home.jsp b/spring-boot-modules/spring-boot-security/src/main/webapp/WEB-INF/views/home.jsp similarity index 100% rename from spring-boot-security/src/main/webapp/WEB-INF/views/home.jsp rename to spring-boot-modules/spring-boot-security/src/main/webapp/WEB-INF/views/home.jsp diff --git a/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerRestTemplateIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerRestTemplateIntegrationTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerRestTemplateIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerRestTemplateIntegrationTest.java diff --git a/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerSpringBootIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerSpringBootIntegrationTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerSpringBootIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerSpringBootIntegrationTest.java diff --git a/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerWebMvcIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerWebMvcIntegrationTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerWebMvcIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerWebMvcIntegrationTest.java diff --git a/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredMethodSpringBootIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredMethodSpringBootIntegrationTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredMethodSpringBootIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredMethodSpringBootIntegrationTest.java diff --git a/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfigurationIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfigurationIntegrationTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfigurationIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfigurationIntegrationTest.java diff --git a/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/CustomConfigAuthorizationServerIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/CustomConfigAuthorizationServerIntegrationTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/CustomConfigAuthorizationServerIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/CustomConfigAuthorizationServerIntegrationTest.java diff --git a/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/DefaultConfigAuthorizationServerIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/DefaultConfigAuthorizationServerIntegrationTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/DefaultConfigAuthorizationServerIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/DefaultConfigAuthorizationServerIntegrationTest.java diff --git a/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/OAuth2IntegrationTestSupport.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/OAuth2IntegrationTestSupport.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/OAuth2IntegrationTestSupport.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/OAuth2IntegrationTestSupport.java diff --git a/spring-boot-security/src/test/java/com/baeldung/springsecuritytaglibs/HomeControllerUnitTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springsecuritytaglibs/HomeControllerUnitTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/springsecuritytaglibs/HomeControllerUnitTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springsecuritytaglibs/HomeControllerUnitTest.java From 86bf2e97cb388db3f4bc90533fb4b2418f62fa6d Mon Sep 17 00:00:00 2001 From: Krzysztof Woyke Date: Thu, 30 Jan 2020 10:06:54 +0100 Subject: [PATCH 04/64] BAEL-20886: Fix a typo --- .../autoconfig/config/BasicConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java index 0a158a659c..7060792df5 100644 --- a/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java +++ b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java @@ -22,7 +22,7 @@ public class BasicConfiguration extends WebSecurityConfigurerAdapter { .roles("USER") .and() .withUser("admin") - .password(encoder.encode("admin"))cl + .password(encoder.encode("admin")) .roles("USER", "ADMIN"); } From 8650f39580a1afc79f4c9463ffd8f10334cb842f Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Thu, 6 Feb 2020 23:43:50 +0200 Subject: [PATCH 05/64] Update SortComparisonUnitTest.java --- .../java/com/baeldung/arraysort/SortComparisonUnitTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-java-modules/core-java-arrays-2/src/test/java/com/baeldung/arraysort/SortComparisonUnitTest.java b/core-java-modules/core-java-arrays-2/src/test/java/com/baeldung/arraysort/SortComparisonUnitTest.java index d1aba5a886..4b0a18684a 100644 --- a/core-java-modules/core-java-arrays-2/src/test/java/com/baeldung/arraysort/SortComparisonUnitTest.java +++ b/core-java-modules/core-java-arrays-2/src/test/java/com/baeldung/arraysort/SortComparisonUnitTest.java @@ -69,7 +69,7 @@ public class SortComparisonUnitTest { } @Test - public void givenArrayOfIntegers_whenUsingArraysSortMethodWithRange_thenSortRangeOfArrayInAscendingOrder() { + public void givenArrayOfIntegers_whenUsingArraysSortWithRange_thenSortRangeOfArrayAsc() { int[] array = { 10, 4, 6, 2, 1, 9, 7, 8, 3, 5 }; int[] expected = { 10, 4, 1, 2, 6, 7, 8, 9, 3, 5 }; @@ -89,7 +89,7 @@ public class SortComparisonUnitTest { } @Test - public void givenArrayOfIntegers_whenUsingArraysParallelSortMethodWithRange_thenSortRangeOfArrayInAscendingOrder() { + public void givenArrayOfIntegers_whenUsingArraysParallelSortWithRange_thenSortRangeOfArrayAsc() { int[] array = { 10, 4, 6, 2, 1, 9, 7, 8, 3, 5 }; int[] expected = { 10, 4, 1, 2, 6, 7, 8, 9, 3, 5 }; From b9a090819961f0fb78eb914d19a1cffbc9187486 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:07:20 +0800 Subject: [PATCH 06/64] Update README.md --- core-java-modules/core-java-date-operations-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-date-operations-2/README.md b/core-java-modules/core-java-date-operations-2/README.md index 478d3baf19..728162ca1a 100644 --- a/core-java-modules/core-java-date-operations-2/README.md +++ b/core-java-modules/core-java-date-operations-2/README.md @@ -6,4 +6,5 @@ This module contains articles about date operations in Java. - [Skipping Weekends While Adding Days to LocalDate in Java 8](https://www.baeldung.com/java-localdate-add-days-skip-weekends) - [Checking If Two Java Dates Are on the Same Day](https://www.baeldung.com/java-check-two-dates-on-same-day) - [Converting Java Date to OffsetDateTime](https://www.baeldung.com/java-convert-date-to-offsetdatetime) +- [How to Set the JVM Time Zone](https://www.baeldung.com/java-jvm-time-zone) - [[<-- Prev]](/core-java-modules/core-java-date-operations-1) From 92a07a5b0bd4ba8d48387e3a3c512a931b952205 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:09:23 +0800 Subject: [PATCH 07/64] Update README.md --- core-java-modules/core-java-lang-syntax-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-lang-syntax-2/README.md b/core-java-modules/core-java-lang-syntax-2/README.md index 1518d1ab35..940629c1dc 100644 --- a/core-java-modules/core-java-lang-syntax-2/README.md +++ b/core-java-modules/core-java-lang-syntax-2/README.md @@ -12,4 +12,5 @@ This module contains articles about Java syntax - [Variable Scope in Java](https://www.baeldung.com/java-variable-scope) - [Introduction to Basic Syntax in Java](https://www.baeldung.com/java-syntax) - [Java ‘protected’ Access Modifier](https://www.baeldung.com/java-protected-access-modifier) +- [Using the Not Operator in If Conditions in Java](https://www.baeldung.com/java-using-not-in-if-conditions) - [[<-- Prev]](/core-java-modules/core-java-lang-syntax) From 910bdc10d6a9ff969f7e44c68056888fd0dd91e5 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:10:29 +0800 Subject: [PATCH 08/64] Update README.md --- core-java-modules/core-java-lang-syntax-2/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/core-java-modules/core-java-lang-syntax-2/README.md b/core-java-modules/core-java-lang-syntax-2/README.md index 940629c1dc..1518d1ab35 100644 --- a/core-java-modules/core-java-lang-syntax-2/README.md +++ b/core-java-modules/core-java-lang-syntax-2/README.md @@ -12,5 +12,4 @@ This module contains articles about Java syntax - [Variable Scope in Java](https://www.baeldung.com/java-variable-scope) - [Introduction to Basic Syntax in Java](https://www.baeldung.com/java-syntax) - [Java ‘protected’ Access Modifier](https://www.baeldung.com/java-protected-access-modifier) -- [Using the Not Operator in If Conditions in Java](https://www.baeldung.com/java-using-not-in-if-conditions) - [[<-- Prev]](/core-java-modules/core-java-lang-syntax) From dce0283239195214023554bc30aaf9f8594b5712 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:11:52 +0800 Subject: [PATCH 09/64] Update README.md --- core-java-modules/core-java-lang-syntax-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-lang-syntax-2/README.md b/core-java-modules/core-java-lang-syntax-2/README.md index 1518d1ab35..940629c1dc 100644 --- a/core-java-modules/core-java-lang-syntax-2/README.md +++ b/core-java-modules/core-java-lang-syntax-2/README.md @@ -12,4 +12,5 @@ This module contains articles about Java syntax - [Variable Scope in Java](https://www.baeldung.com/java-variable-scope) - [Introduction to Basic Syntax in Java](https://www.baeldung.com/java-syntax) - [Java ‘protected’ Access Modifier](https://www.baeldung.com/java-protected-access-modifier) +- [Using the Not Operator in If Conditions in Java](https://www.baeldung.com/java-using-not-in-if-conditions) - [[<-- Prev]](/core-java-modules/core-java-lang-syntax) From 1d7a6398f199c0909a13f9f4d11d06c81d804f7d Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:15:17 +0800 Subject: [PATCH 10/64] Update README.md --- algorithms-miscellaneous-5/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/algorithms-miscellaneous-5/README.md b/algorithms-miscellaneous-5/README.md index 301d3ee8c5..66490a4692 100644 --- a/algorithms-miscellaneous-5/README.md +++ b/algorithms-miscellaneous-5/README.md @@ -16,4 +16,5 @@ This module contains articles about algorithms. Some classes of algorithms, e.g. - [Maximum Subarray Problem](https://www.baeldung.com/java-maximum-subarray) - [How to Merge Two Sorted Arrays](https://www.baeldung.com/java-merge-sorted-arrays) - [Median of Stream of Integers using Heap](https://www.baeldung.com/java-stream-integers-median-using-heap) +- [Kruskal’s Algorithm for Spanning Trees](https://www.baeldung.com/java-spanning-trees-kruskal) - More articles: [[<-- prev]](/../algorithms-miscellaneous-4) From 22daf9028301357e8c27137f4821a98f7824eafb Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:16:45 +0800 Subject: [PATCH 11/64] Update README.md --- logging-modules/logback/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/logging-modules/logback/README.md b/logging-modules/logback/README.md index 58dc8ce541..05a4ab9308 100644 --- a/logging-modules/logback/README.md +++ b/logging-modules/logback/README.md @@ -2,3 +2,4 @@ - [Get Log Output in JSON](https://www.baeldung.com/java-log-json-output) - [SLF4J Warning: Class Path Contains Multiple SLF4J Bindings](https://www.baeldung.com/slf4j-classpath-multiple-bindings) +- [Sending Emails with Logback](https://www.baeldung.com/logback-send-email) From 929eb7c23124c13700ad158ddbe0a2d2a14c9653 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:18:56 +0800 Subject: [PATCH 12/64] Update README.md --- spring-security-modules/spring-security-oidc/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-security-modules/spring-security-oidc/README.md b/spring-security-modules/spring-security-oidc/README.md index 92ba60cad9..ca6053f70f 100644 --- a/spring-security-modules/spring-security-oidc/README.md +++ b/spring-security-modules/spring-security-oidc/README.md @@ -5,6 +5,7 @@ This module contains articles about OpenID with Spring Security ### Relevant articles - [Spring Security and OpenID Connect](https://www.baeldung.com/spring-security-openid-connect) +- [Spring Security and OpenID Connect (Legacy)](https://www.baeldung.com/spring-security-openid-connect-legacy) ### OpenID Connect with Spring Security From a0ecdaad62ce9d265319cb22010b0f550cad0797 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:25:34 +0800 Subject: [PATCH 13/64] Create README.md --- slack/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 slack/README.md diff --git a/slack/README.md b/slack/README.md new file mode 100644 index 0000000000..fb3eff6290 --- /dev/null +++ b/slack/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [How to Create a Slack Plugin in Java](https://www.baeldung.com/java-slack-plugin) From be6b5832e806e2d7bdc6345494f8b4ade0e2291e Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:27:50 +0800 Subject: [PATCH 14/64] Update README.md --- core-java-modules/core-java-text/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core-java-modules/core-java-text/README.md b/core-java-modules/core-java-text/README.md index a7a4d1d4f3..c29289f906 100644 --- a/core-java-modules/core-java-text/README.md +++ b/core-java-modules/core-java-text/README.md @@ -4,4 +4,5 @@ ### Relevant Articles: - [An Overview of Regular Expressions Performance in Java](https://www.baeldung.com/java-regex-performance) -- [Pre-compile Regex Patterns Into Pattern Objects](https://www.baeldung.com/java-regex-pre-compile) \ No newline at end of file +- [Pre-compile Regex Patterns Into Pattern Objects](https://www.baeldung.com/java-regex-pre-compile) +- [Difference Between Java Matcher find() and matches()](https://www.baeldung.com/java-matcher-find-vs-matches) From e1ac5ff11c9abce1ca9b4eb592dc13fef09585e3 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:29:56 +0800 Subject: [PATCH 15/64] Update README.md --- persistence-modules/spring-data-jpa-4/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/persistence-modules/spring-data-jpa-4/README.md b/persistence-modules/spring-data-jpa-4/README.md index 63aec5c46b..d685c91589 100644 --- a/persistence-modules/spring-data-jpa-4/README.md +++ b/persistence-modules/spring-data-jpa-4/README.md @@ -3,6 +3,7 @@ - [LIKE Queries in Spring JPA Repositories](https://www.baeldung.com/spring-jpa-like-queries) - [A Guide to Spring’s Open Session In View](https://www.baeldung.com/spring-open-session-in-view) - [Programmatic Transaction Management in Spring](https://www.baeldung.com/spring-programmatic-transaction-management) +-[JPA Entity Lifecycle Events](https://www.baeldung.com/jpa-entity-lifecycle-events) ### Eclipse Config After importing the project into Eclipse, you may see the following error: From 88401df6b173b5d8d9c3f7e58e51fe3f776addb0 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:30:56 +0800 Subject: [PATCH 16/64] Update README.md --- persistence-modules/spring-data-jpa-4/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/persistence-modules/spring-data-jpa-4/README.md b/persistence-modules/spring-data-jpa-4/README.md index d685c91589..d2b66e9b10 100644 --- a/persistence-modules/spring-data-jpa-4/README.md +++ b/persistence-modules/spring-data-jpa-4/README.md @@ -3,7 +3,7 @@ - [LIKE Queries in Spring JPA Repositories](https://www.baeldung.com/spring-jpa-like-queries) - [A Guide to Spring’s Open Session In View](https://www.baeldung.com/spring-open-session-in-view) - [Programmatic Transaction Management in Spring](https://www.baeldung.com/spring-programmatic-transaction-management) --[JPA Entity Lifecycle Events](https://www.baeldung.com/jpa-entity-lifecycle-events) +- [JPA Entity Lifecycle Events](https://www.baeldung.com/jpa-entity-lifecycle-events) ### Eclipse Config After importing the project into Eclipse, you may see the following error: From e68b0d9857f2e1f7504c8ecc4384b4ff34bf2290 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 13:59:00 +0800 Subject: [PATCH 17/64] Update README.md --- dropwizard/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dropwizard/README.md b/dropwizard/README.md index e713b2f1e6..76311ebbb3 100644 --- a/dropwizard/README.md +++ b/dropwizard/README.md @@ -1 +1,5 @@ -# Dropwizard \ No newline at end of file +# Dropwizard + +### Relevant Articles: + +- [Introduction to Dropwizard](https://www.baeldung.com/java-dropwizard) From deb3a7458bc6568d2d74f6fb542752beb7bb3a24 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:00:57 +0800 Subject: [PATCH 18/64] Update README.md --- core-java-modules/core-java-exceptions-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-exceptions-2/README.md b/core-java-modules/core-java-exceptions-2/README.md index f36d0b24b9..49ce897e60 100644 --- a/core-java-modules/core-java-exceptions-2/README.md +++ b/core-java-modules/core-java-exceptions-2/README.md @@ -6,3 +6,4 @@ This module contains articles about core java exceptions - [Is It a Bad Practice to Catch Throwable?](https://www.baeldung.com/java-catch-throwable-bad-practice) - [Wrapping vs Rethrowing Exceptions in Java](https://www.baeldung.com/java-wrapping-vs-rethrowing-exceptions) +- [java.net.UnknownHostException: Invalid Hostname for Server](https://www.baeldung.com/java-unknownhostexception) From 20ee013359df6044f51e17f50dc35c1b29a1bb7b Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:03:53 +0800 Subject: [PATCH 19/64] Update README.md --- apache-poi/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/apache-poi/README.md b/apache-poi/README.md index b7b8bf5f6a..5b23dc353e 100644 --- a/apache-poi/README.md +++ b/apache-poi/README.md @@ -6,3 +6,4 @@ This module contains articles about Apache POI - [Microsoft Word Processing in Java with Apache POI](https://www.baeldung.com/java-microsoft-word-with-apache-poi) - [Working with Microsoft Excel in Java](https://www.baeldung.com/java-microsoft-excel) - [Creating a MS PowerPoint Presentation in Java](https://www.baeldung.com/apache-poi-slideshow) +- [Merge Cells in Excel Using Apache POI](https://www.baeldung.com/java-apache-poi-merge-cells) From ed430ca753fe03a9dc7da3cf27fc76cc6110f883 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:06:41 +0800 Subject: [PATCH 20/64] Update README.md --- libraries-3/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries-3/README.md b/libraries-3/README.md index a9d48bb389..e498243b6c 100644 --- a/libraries-3/README.md +++ b/libraries-3/README.md @@ -9,3 +9,4 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m ### Relevant Articles: - [Parsing Command-Line Parameters with JCommander](https://www.baeldung.com/jcommander-parsing-command-line-parameters) +- [Guide to the Cactoos Library](https://www.baeldung.com/java-cactoos) From da05eb3e2807b9ae560e38b261b5b600b7843492 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:09:27 +0800 Subject: [PATCH 21/64] Update README.md --- libraries-3/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries-3/README.md b/libraries-3/README.md index e498243b6c..942f108afd 100644 --- a/libraries-3/README.md +++ b/libraries-3/README.md @@ -10,3 +10,4 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m ### Relevant Articles: - [Parsing Command-Line Parameters with JCommander](https://www.baeldung.com/jcommander-parsing-command-line-parameters) - [Guide to the Cactoos Library](https://www.baeldung.com/java-cactoos) +- [Parsing Command-Line Parameters with Airline](https://www.baeldung.com/java-airline) From 5594b0d05f61916c191a4bfadbc1349db7f5cf3d Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:11:31 +0800 Subject: [PATCH 22/64] Update README.md --- spring-boot-security/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-security/README.md b/spring-boot-security/README.md index be4690f321..7229ba0f4a 100644 --- a/spring-boot-security/README.md +++ b/spring-boot-security/README.md @@ -7,6 +7,7 @@ This module contains articles about Spring Boot Security - [Spring Boot Security Auto-Configuration](https://www.baeldung.com/spring-boot-security-autoconfiguration) - [Spring Security for Spring Boot Integration Tests](https://www.baeldung.com/spring-security-integration-tests) - [Introduction to Spring Security Taglibs](https://www.baeldung.com/spring-security-taglibs) +- [Guide to @CurrentSecurityContext in Spring Security](https://www.baeldung.com/spring-currentsecuritycontext) ### Spring Boot Security Auto-Configuration From 705cb5bbe511d97c483d3838268634b8462c7d28 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:12:22 +0800 Subject: [PATCH 23/64] Update README.md --- spring-boot-security/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/spring-boot-security/README.md b/spring-boot-security/README.md index 7229ba0f4a..be4690f321 100644 --- a/spring-boot-security/README.md +++ b/spring-boot-security/README.md @@ -7,7 +7,6 @@ This module contains articles about Spring Boot Security - [Spring Boot Security Auto-Configuration](https://www.baeldung.com/spring-boot-security-autoconfiguration) - [Spring Security for Spring Boot Integration Tests](https://www.baeldung.com/spring-security-integration-tests) - [Introduction to Spring Security Taglibs](https://www.baeldung.com/spring-security-taglibs) -- [Guide to @CurrentSecurityContext in Spring Security](https://www.baeldung.com/spring-currentsecuritycontext) ### Spring Boot Security Auto-Configuration From f2453bbf6686860cc107e59ce023c5aefffe32af Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:13:05 +0800 Subject: [PATCH 24/64] Update README.md --- spring-boot-security/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-security/README.md b/spring-boot-security/README.md index be4690f321..3f1fa774ec 100644 --- a/spring-boot-security/README.md +++ b/spring-boot-security/README.md @@ -7,6 +7,7 @@ This module contains articles about Spring Boot Security - [Spring Boot Security Auto-Configuration](https://www.baeldung.com/spring-boot-security-autoconfiguration) - [Spring Security for Spring Boot Integration Tests](https://www.baeldung.com/spring-security-integration-tests) - [Introduction to Spring Security Taglibs](https://www.baeldung.com/spring-security-taglibs) +- [Guide to @CurrentSecurityContext in Spring Security](https://github.com/eugenp/tutorials/tree/master/spring-boot-security) ### Spring Boot Security Auto-Configuration From 7a6e21c5671231c95df8c4f6fdba3467a5cc60e7 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:15:25 +0800 Subject: [PATCH 25/64] Update README.md --- persistence-modules/spring-data-jpa-4/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/persistence-modules/spring-data-jpa-4/README.md b/persistence-modules/spring-data-jpa-4/README.md index d2b66e9b10..42e4619a59 100644 --- a/persistence-modules/spring-data-jpa-4/README.md +++ b/persistence-modules/spring-data-jpa-4/README.md @@ -4,6 +4,7 @@ - [A Guide to Spring’s Open Session In View](https://www.baeldung.com/spring-open-session-in-view) - [Programmatic Transaction Management in Spring](https://www.baeldung.com/spring-programmatic-transaction-management) - [JPA Entity Lifecycle Events](https://www.baeldung.com/jpa-entity-lifecycle-events) +- [Working with Lazy Element Collections in JPA](https://www.baeldung.com/java-jpa-lazy-collections) ### Eclipse Config After importing the project into Eclipse, you may see the following error: From 85977c9bfe5ff9bf70ead46db0acf063472ed24a Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:18:09 +0800 Subject: [PATCH 26/64] Create README.md --- core-java-modules/core-java-datetime-java8-2/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 core-java-modules/core-java-datetime-java8-2/README.md diff --git a/core-java-modules/core-java-datetime-java8-2/README.md b/core-java-modules/core-java-datetime-java8-2/README.md new file mode 100644 index 0000000000..e53d0236c2 --- /dev/null +++ b/core-java-modules/core-java-datetime-java8-2/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [Creating a LocalDate with Values in Java](https://www.baeldung.com/java-creating-localdate-with-values) From b70afb3544634db582871c7f5b2964a7f11e7772 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:21:28 +0800 Subject: [PATCH 27/64] Update README.md --- core-java-modules/core-java-concurrency-advanced-3/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-concurrency-advanced-3/README.md b/core-java-modules/core-java-concurrency-advanced-3/README.md index 409d3aa464..a6449abac3 100644 --- a/core-java-modules/core-java-concurrency-advanced-3/README.md +++ b/core-java-modules/core-java-concurrency-advanced-3/README.md @@ -8,4 +8,5 @@ This module contains articles about advanced topics about multithreading with co - [Common Concurrency Pitfalls in Java](https://www.baeldung.com/java-common-concurrency-pitfalls) - [Guide to RejectedExecutionHandler](https://www.baeldung.com/java-rejectedexecutionhandler) +- [Guide to Work Stealing in Java](https://www.baeldung.com/java-work-stealing) [[<-- previous]](/core-java-modules/core-java-concurrency-advanced-2) From 75c88f97452bf14dc29aff4e451a98fee6dd4e10 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:24:34 +0800 Subject: [PATCH 28/64] Update README.md --- algorithms-miscellaneous-5/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/algorithms-miscellaneous-5/README.md b/algorithms-miscellaneous-5/README.md index 66490a4692..eaa37a5a5f 100644 --- a/algorithms-miscellaneous-5/README.md +++ b/algorithms-miscellaneous-5/README.md @@ -17,4 +17,5 @@ This module contains articles about algorithms. Some classes of algorithms, e.g. - [How to Merge Two Sorted Arrays](https://www.baeldung.com/java-merge-sorted-arrays) - [Median of Stream of Integers using Heap](https://www.baeldung.com/java-stream-integers-median-using-heap) - [Kruskal’s Algorithm for Spanning Trees](https://www.baeldung.com/java-spanning-trees-kruskal) +- [Balanced Brackets Algorithm in Java](https://www.baeldung.com/java-balanced-brackets-algorithm) - More articles: [[<-- prev]](/../algorithms-miscellaneous-4) From c39d3354f781edbfa66b18cd575ff96cb00c32eb Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:30:25 +0800 Subject: [PATCH 29/64] Update README.md --- persistence-modules/redis/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/persistence-modules/redis/README.md b/persistence-modules/redis/README.md index 21cd048693..668b8d33f8 100644 --- a/persistence-modules/redis/README.md +++ b/persistence-modules/redis/README.md @@ -2,3 +2,4 @@ - [Intro to Jedis – the Java Redis Client Library](http://www.baeldung.com/jedis-java-redis-client-library) - [A Guide to Redis with Redisson](http://www.baeldung.com/redis-redisson) - [Introduction to Lettuce – the Java Redis Client](https://www.baeldung.com/java-redis-lettuce) +- [List All Available Redis Keys](https://www.baeldung.com/redis-list-available-keys) From 0f685afedf90dc4c1106071116bb0babba77ca91 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:32:08 +0800 Subject: [PATCH 30/64] Update README.md --- json-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/json-2/README.md b/json-2/README.md index e7c3043339..b0f49f0e48 100644 --- a/json-2/README.md +++ b/json-2/README.md @@ -3,3 +3,4 @@ This module contains articles about JSON. ### Relevant Articles: +- [Introduction to Jsoniter](https://www.baeldung.com/java-jsoniter) From 1fe0b4ccbce87d9a8d0f64a2f71e33ee357b1327 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:33:53 +0800 Subject: [PATCH 31/64] Update README.MD --- core-java-modules/core-java-reflection/README.MD | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core-java-modules/core-java-reflection/README.MD b/core-java-modules/core-java-reflection/README.MD index 840d488968..5aed62b378 100644 --- a/core-java-modules/core-java-reflection/README.MD +++ b/core-java-modules/core-java-reflection/README.MD @@ -6,4 +6,5 @@ - [Guide to Java Reflection](http://www.baeldung.com/java-reflection) - [Call Methods at Runtime Using Java Reflection](http://www.baeldung.com/java-method-reflection) - [Changing Annotation Parameters At Runtime](http://www.baeldung.com/java-reflection-change-annotation-params) -- [Dynamic Proxies in Java](http://www.baeldung.com/java-dynamic-proxies) \ No newline at end of file +- [Dynamic Proxies in Java](http://www.baeldung.com/java-dynamic-proxies) +- [What Causes java.lang.reflect.InvocationTargetException?](https://www.baeldung.com/java-lang-reflect-invocationtargetexception) From 265a5100bd7207b5573f50490b4f6f9aea48b36f Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:35:29 +0800 Subject: [PATCH 32/64] Update README.md --- core-java-modules/core-java-13/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-13/README.md b/core-java-modules/core-java-13/README.md index c339520a19..697f89c362 100644 --- a/core-java-modules/core-java-13/README.md +++ b/core-java-modules/core-java-13/README.md @@ -1,3 +1,4 @@ ### Relevant articles: - [Java Switch Statement](https://www.baeldung.com/java-switch) +- [New Java 13 Features](https://www.baeldung.com/java-13-new-features) From e53d005173859eefd118cdd0194740a1f22b8f49 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:37:00 +0800 Subject: [PATCH 33/64] Update README.md --- data-structures/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/data-structures/README.md b/data-structures/README.md index 3e83fa7312..e8fb374f6c 100644 --- a/data-structures/README.md +++ b/data-structures/README.md @@ -8,3 +8,4 @@ This module contains articles about data structures in Java - [Implementing a Binary Tree in Java](https://www.baeldung.com/java-binary-tree) - [Circular Linked List Java Implementation](https://www.baeldung.com/java-circular-linked-list) - [How to Print a Binary Tree Diagram](https://www.baeldung.com/java-print-binary-tree-diagram) +- [Introduction to Big Queue](https://www.baeldung.com/java-big-queue) From 6f43b985946cf99f5d26c6486362b67886a88d90 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:39:54 +0800 Subject: [PATCH 34/64] Create README.md --- java-numbers-3/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 java-numbers-3/README.md diff --git a/java-numbers-3/README.md b/java-numbers-3/README.md new file mode 100644 index 0000000000..98ccb07682 --- /dev/null +++ b/java-numbers-3/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [Generating Random Numbers](https://www.baeldung.com/java-generating-random-numbers) From e577ed1e0518eed75f4e16c3914d4643361e566d Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:43:34 +0800 Subject: [PATCH 35/64] Update README.md --- core-java-modules/core-java-concurrency-advanced-3/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core-java-modules/core-java-concurrency-advanced-3/README.md b/core-java-modules/core-java-concurrency-advanced-3/README.md index a6449abac3..2c554e948b 100644 --- a/core-java-modules/core-java-concurrency-advanced-3/README.md +++ b/core-java-modules/core-java-concurrency-advanced-3/README.md @@ -9,4 +9,5 @@ This module contains articles about advanced topics about multithreading with co - [Common Concurrency Pitfalls in Java](https://www.baeldung.com/java-common-concurrency-pitfalls) - [Guide to RejectedExecutionHandler](https://www.baeldung.com/java-rejectedexecutionhandler) - [Guide to Work Stealing in Java](https://www.baeldung.com/java-work-stealing) -[[<-- previous]](/core-java-modules/core-java-concurrency-advanced-2) +- [Asynchronous Programming in Java](https://www.baeldung.com/java-asynchronous-programming) +- [[<-- previous]](/core-java-modules/core-java-concurrency-advanced-2) From b489c9032ffde5ef45277abd81c3875fb1411040 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:45:50 +0800 Subject: [PATCH 36/64] Create README.md --- algorithms-sorting-2/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 algorithms-sorting-2/README.md diff --git a/algorithms-sorting-2/README.md b/algorithms-sorting-2/README.md new file mode 100644 index 0000000000..897621bc41 --- /dev/null +++ b/algorithms-sorting-2/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [Partitioning and Sorting Arrays with Many Repeated Entries](https://www.baeldung.com/java-sorting-arrays-with-repeated-entries) From b3460a0cec18cf891396cbbd27f837e3e04e624f Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:48:51 +0800 Subject: [PATCH 37/64] Update README.md --- apache-poi/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/apache-poi/README.md b/apache-poi/README.md index 5b23dc353e..39ba7126eb 100644 --- a/apache-poi/README.md +++ b/apache-poi/README.md @@ -7,3 +7,4 @@ This module contains articles about Apache POI - [Working with Microsoft Excel in Java](https://www.baeldung.com/java-microsoft-excel) - [Creating a MS PowerPoint Presentation in Java](https://www.baeldung.com/apache-poi-slideshow) - [Merge Cells in Excel Using Apache POI](https://www.baeldung.com/java-apache-poi-merge-cells) +- [Get String Value of Excel Cell with Apache POI](https://www.baeldung.com/java-apache-poi-cell-string-value) From 38ce164b6e3c0b5d1961bf08fdf97f9497c8d307 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:51:23 +0800 Subject: [PATCH 38/64] Update README.md --- algorithms-miscellaneous-5/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/algorithms-miscellaneous-5/README.md b/algorithms-miscellaneous-5/README.md index eaa37a5a5f..23db220b0e 100644 --- a/algorithms-miscellaneous-5/README.md +++ b/algorithms-miscellaneous-5/README.md @@ -18,4 +18,5 @@ This module contains articles about algorithms. Some classes of algorithms, e.g. - [Median of Stream of Integers using Heap](https://www.baeldung.com/java-stream-integers-median-using-heap) - [Kruskal’s Algorithm for Spanning Trees](https://www.baeldung.com/java-spanning-trees-kruskal) - [Balanced Brackets Algorithm in Java](https://www.baeldung.com/java-balanced-brackets-algorithm) +- [Efficiently Merge Sorted Java Sequences](https://www.baeldung.com/java-merge-sorted-sequences) - More articles: [[<-- prev]](/../algorithms-miscellaneous-4) From ac95ae258f999b4f117a8445a978825320475fb7 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:56:01 +0800 Subject: [PATCH 39/64] Update README.md --- core-java-modules/core-java-lang-math/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-lang-math/README.md b/core-java-modules/core-java-lang-math/README.md index c72b69fcad..ec97a2ada4 100644 --- a/core-java-modules/core-java-lang-math/README.md +++ b/core-java-modules/core-java-lang-math/README.md @@ -9,3 +9,4 @@ - [The strictfp Keyword in Java](https://www.baeldung.com/java-strictfp) - [Basic Calculator in Java](https://www.baeldung.com/java-basic-calculator) - [Overflow and Underflow in Java](https://www.baeldung.com/java-overflow-underflow) +- [Obtaining a Power Set of a Set in Java](https://www.baeldung.com/java-power-set-of-a-set) From 206b854b3d7a33b2614acf3387c2915f2304c712 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:01:00 +0800 Subject: [PATCH 40/64] Update README.md --- algorithms-miscellaneous-5/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/algorithms-miscellaneous-5/README.md b/algorithms-miscellaneous-5/README.md index 23db220b0e..4ef919b33b 100644 --- a/algorithms-miscellaneous-5/README.md +++ b/algorithms-miscellaneous-5/README.md @@ -19,4 +19,5 @@ This module contains articles about algorithms. Some classes of algorithms, e.g. - [Kruskal’s Algorithm for Spanning Trees](https://www.baeldung.com/java-spanning-trees-kruskal) - [Balanced Brackets Algorithm in Java](https://www.baeldung.com/java-balanced-brackets-algorithm) - [Efficiently Merge Sorted Java Sequences](https://www.baeldung.com/java-merge-sorted-sequences) +- [Introduction to Greedy Algorithms with Java](https://www.baeldung.com/java-greedy-algorithms) - More articles: [[<-- prev]](/../algorithms-miscellaneous-4) From 077224fce8052ab00d435316cf0d72637eef9b5e Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:02:46 +0800 Subject: [PATCH 41/64] Update README.md --- testing-modules/testing-libraries/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/testing-modules/testing-libraries/README.md b/testing-modules/testing-libraries/README.md index 031fd28797..b5360bd841 100644 --- a/testing-modules/testing-libraries/README.md +++ b/testing-modules/testing-libraries/README.md @@ -10,3 +10,4 @@ - [Introduction to FindBugs](https://www.baeldung.com/intro-to-findbugs) - [Cucumber Data Tables](https://www.baeldung.com/cucumber-data-tables) - [Cucumber Background](https://www.baeldung.com/java-cucumber-background) +- [Cucumber Hooks](https://www.baeldung.com/java-cucumber-hooks) From c49b0d7d1481cabadf8ccecac8cf2321d5021d04 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:05:09 +0800 Subject: [PATCH 42/64] Update README.md --- apache-poi/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/apache-poi/README.md b/apache-poi/README.md index 39ba7126eb..742220aebc 100644 --- a/apache-poi/README.md +++ b/apache-poi/README.md @@ -8,3 +8,4 @@ This module contains articles about Apache POI - [Creating a MS PowerPoint Presentation in Java](https://www.baeldung.com/apache-poi-slideshow) - [Merge Cells in Excel Using Apache POI](https://www.baeldung.com/java-apache-poi-merge-cells) - [Get String Value of Excel Cell with Apache POI](https://www.baeldung.com/java-apache-poi-cell-string-value) +- [Read Excel Cell Value Rather Than Formula With Apache POI](https://github.com/eugenp/tutorials/tree/master/apache-poi) From de9aa7c9ec6825842ed6f7db79c8195e719b9c31 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:07:32 +0800 Subject: [PATCH 43/64] Update README.md --- core-java-modules/core-java-lang-syntax/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-lang-syntax/README.md b/core-java-modules/core-java-lang-syntax/README.md index 25f5c63dbc..b7e21014a3 100644 --- a/core-java-modules/core-java-lang-syntax/README.md +++ b/core-java-modules/core-java-lang-syntax/README.md @@ -13,4 +13,5 @@ This module contains articles about Java syntax - [Infinite Loops in Java](https://www.baeldung.com/infinite-loops-java) - [Java Switch Statement](https://www.baeldung.com/java-switch) - [Breaking Out of Nested Loops](https://www.baeldung.com/java-breaking-out-nested-loop) +- [Java Do-While Loop](https://www.baeldung.com/java-do-while-loop) - [[More -->]](/core-java-modules/core-java-lang-syntax-2) From fd3e69582d086065b99cee635529662c2768596f Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:08:56 +0800 Subject: [PATCH 44/64] Update README.md --- core-java-modules/core-java-lang-syntax/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-lang-syntax/README.md b/core-java-modules/core-java-lang-syntax/README.md index b7e21014a3..7b60eb1486 100644 --- a/core-java-modules/core-java-lang-syntax/README.md +++ b/core-java-modules/core-java-lang-syntax/README.md @@ -14,4 +14,5 @@ This module contains articles about Java syntax - [Java Switch Statement](https://www.baeldung.com/java-switch) - [Breaking Out of Nested Loops](https://www.baeldung.com/java-breaking-out-nested-loop) - [Java Do-While Loop](https://www.baeldung.com/java-do-while-loop) +- [Java While Loop](https://www.baeldung.com/java-while-loop) - [[More -->]](/core-java-modules/core-java-lang-syntax-2) From 92f3b3a96dded1b3ec88b788a60cf9a95c66f9b5 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:10:22 +0800 Subject: [PATCH 45/64] Update README.md --- core-java-modules/core-java-lang-syntax/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-lang-syntax/README.md b/core-java-modules/core-java-lang-syntax/README.md index 7b60eb1486..bef03b98ad 100644 --- a/core-java-modules/core-java-lang-syntax/README.md +++ b/core-java-modules/core-java-lang-syntax/README.md @@ -15,4 +15,5 @@ This module contains articles about Java syntax - [Breaking Out of Nested Loops](https://www.baeldung.com/java-breaking-out-nested-loop) - [Java Do-While Loop](https://www.baeldung.com/java-do-while-loop) - [Java While Loop](https://www.baeldung.com/java-while-loop) +- [Java For Loop](https://www.baeldung.com/java-for-loop) - [[More -->]](/core-java-modules/core-java-lang-syntax-2) From 530d08c5dc3525299865c42b9830caa4095d0f3a Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:12:42 +0800 Subject: [PATCH 46/64] Update README.md --- testing-modules/selenium-junit-testng/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/testing-modules/selenium-junit-testng/README.md b/testing-modules/selenium-junit-testng/README.md index 0137212290..198247d7bf 100644 --- a/testing-modules/selenium-junit-testng/README.md +++ b/testing-modules/selenium-junit-testng/README.md @@ -1,3 +1,4 @@ ### Relevant Articles: - [Guide to Selenium with JUnit / TestNG](http://www.baeldung.com/java-selenium-with-junit-and-testng) - [Testing with Selenium/WebDriver and the Page Object Pattern](http://www.baeldung.com/selenium-webdriver-page-object) +- [Using Cookies With Selenium WebDriver in Java](https://www.baeldung.com/java-selenium-webdriver-cookies) From f5178292b3809aa62847ad9d3bc445d8893a35e5 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:14:20 +0800 Subject: [PATCH 47/64] Update README.md --- java-numbers-3/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/java-numbers-3/README.md b/java-numbers-3/README.md index 98ccb07682..08e8dae8ef 100644 --- a/java-numbers-3/README.md +++ b/java-numbers-3/README.md @@ -1,3 +1,4 @@ ### Relevant Articles: - [Generating Random Numbers](https://www.baeldung.com/java-generating-random-numbers) +- [Convert Double to Long in Java](https://www.baeldung.com/java-convert-double-long) From b49cb1f330fd72933a23806ac83468ab41258aea Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:15:20 +0800 Subject: [PATCH 48/64] Update README.md --- apache-rocketmq/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apache-rocketmq/README.md b/apache-rocketmq/README.md index be53f95790..734f878baa 100644 --- a/apache-rocketmq/README.md +++ b/apache-rocketmq/README.md @@ -3,3 +3,5 @@ This module contains articles about Apache RocketMQ ### Relevant Articles: + +- [Apache RocketMQ with Spring Boot](https://www.baeldung.com/apache-rocketmq-spring-boot) From 66963e30250cfbe14752c05921785856259c393f Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:17:21 +0800 Subject: [PATCH 49/64] Update README.md --- spring-boot-modules/spring-boot-mvc-2/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-modules/spring-boot-mvc-2/README.md b/spring-boot-modules/spring-boot-mvc-2/README.md index dae815a1c1..cb0eea4c2a 100644 --- a/spring-boot-modules/spring-boot-mvc-2/README.md +++ b/spring-boot-modules/spring-boot-mvc-2/README.md @@ -5,5 +5,5 @@ This module contains articles about Spring Web MVC in Spring Boot projects. ### Relevant Articles: - [Functional Controllers in Spring MVC](https://www.baeldung.com/spring-mvc-functional-controllers) -- [Specify an array of strings as body parameter in Swagger API](https://www.baeldung.com/swagger-body-array-of-strings) +- [Specify an Array of Strings as Body Parameters in Swagger](https://www.baeldung.com/swagger-body-array-of-strings) - More articles: [[prev -->]](/spring-boot-mvc) From d55d7157ccb7f0c10bbe32dbc8749beebb7dead6 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:19:13 +0800 Subject: [PATCH 50/64] Update README.md --- core-java-modules/core-java-lang-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-lang-2/README.md b/core-java-modules/core-java-lang-2/README.md index ce3589e2be..f6a7abdc52 100644 --- a/core-java-modules/core-java-lang-2/README.md +++ b/core-java-modules/core-java-lang-2/README.md @@ -7,4 +7,5 @@ This module contains articles about core features in the Java language - [Command-Line Arguments in Java](https://www.baeldung.com/java-command-line-arguments) - [What is a POJO Class?](https://www.baeldung.com/java-pojo-class) - [Java Default Parameters Using Method Overloading](https://www.baeldung.com/java-default-parameters-method-overloading) +- [How to Return Multiple Values From a Java Method](https://www.baeldung.com/java-method-return-multiple-values) - [[<-- Prev]](/core-java-modules/core-java-lang) From 9b7b426965d2b58dc00890386a1370c79408a774 Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:20:46 +0800 Subject: [PATCH 51/64] Update README.md --- core-java-modules/core-java-lang-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-lang-2/README.md b/core-java-modules/core-java-lang-2/README.md index f6a7abdc52..a9604d1032 100644 --- a/core-java-modules/core-java-lang-2/README.md +++ b/core-java-modules/core-java-lang-2/README.md @@ -8,4 +8,5 @@ This module contains articles about core features in the Java language - [What is a POJO Class?](https://www.baeldung.com/java-pojo-class) - [Java Default Parameters Using Method Overloading](https://www.baeldung.com/java-default-parameters-method-overloading) - [How to Return Multiple Values From a Java Method](https://www.baeldung.com/java-method-return-multiple-values) +- [Guide to the Java finally Keyword](https://www.baeldung.com/java-finally-keyword) - [[<-- Prev]](/core-java-modules/core-java-lang) From 0e36222099dc079d9b1e2530d4da30572945b3ea Mon Sep 17 00:00:00 2001 From: johnA1331 <53036378+johnA1331@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:24:02 +0800 Subject: [PATCH 52/64] Update README.md --- core-java-modules/core-java-arrays-2/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java-modules/core-java-arrays-2/README.md b/core-java-modules/core-java-arrays-2/README.md index a78b3327b6..c4ae3f03f7 100644 --- a/core-java-modules/core-java-arrays-2/README.md +++ b/core-java-modules/core-java-arrays-2/README.md @@ -13,4 +13,5 @@ This module contains articles about Java arrays - [Removing an Element from an Array in Java](https://www.baeldung.com/java-array-remove-element) - [Removing the First Element of an Array](https://www.baeldung.com/java-array-remove-first-element) - [Adding an Element to a Java Array vs an ArrayList](https://www.baeldung.com/java-add-element-to-array-vs-list) +- [Arrays.sort vs Arrays.parallelSort](https://www.baeldung.com/java-arrays-sort-vs-parallelsort) - [[<-- Prev]](/core-java-modules/core-java-arrays) From 5860e8baa69607caf34b1bebbd07a37ea36359a8 Mon Sep 17 00:00:00 2001 From: chris9408 <58786016+chris9408@users.noreply.github.com> Date: Mon, 10 Feb 2020 17:28:28 +0200 Subject: [PATCH 53/64] [BAEL-3750] Breaking YAML Strings Over Multiple Lines (#8664) * [BAEL-3750] Breaking YAML Strings Over Multiple Lines * Added yamo module to appropriate profiles * Article improvements * Fix * [BAEL-3750] Moved multi line yaml files from the yaml module to the libraries-data-io folder * [BAEL-3750] deleted the yaml module Co-authored-by: cristirosu --- .../snakeyaml/MultiLineStringsUnitTest.java | 90 +++++++++++++++++++ .../test/resources/yaml/multiline/folded.yaml | 4 + .../resources/yaml/multiline/folded2.yaml | 8 ++ .../resources/yaml/multiline/folded_keep.yaml | 6 ++ .../yaml/multiline/folded_strip.yaml | 7 ++ .../resources/yaml/multiline/literal.yaml | 4 + .../resources/yaml/multiline/literal2.yaml | 10 +++ .../yaml/multiline/literal_keep.yaml | 5 ++ .../yaml/multiline/literal_strip.yaml | 5 ++ .../yaml/multiline/plain_double_quotes.yaml | 1 + .../yaml/multiline/plain_single_quotes.yaml | 3 + 11 files changed, 143 insertions(+) create mode 100644 libraries-data-io/src/test/java/com/baeldung/libraries/snakeyaml/MultiLineStringsUnitTest.java create mode 100644 libraries-data-io/src/test/resources/yaml/multiline/folded.yaml create mode 100644 libraries-data-io/src/test/resources/yaml/multiline/folded2.yaml create mode 100644 libraries-data-io/src/test/resources/yaml/multiline/folded_keep.yaml create mode 100644 libraries-data-io/src/test/resources/yaml/multiline/folded_strip.yaml create mode 100644 libraries-data-io/src/test/resources/yaml/multiline/literal.yaml create mode 100644 libraries-data-io/src/test/resources/yaml/multiline/literal2.yaml create mode 100644 libraries-data-io/src/test/resources/yaml/multiline/literal_keep.yaml create mode 100644 libraries-data-io/src/test/resources/yaml/multiline/literal_strip.yaml create mode 100644 libraries-data-io/src/test/resources/yaml/multiline/plain_double_quotes.yaml create mode 100644 libraries-data-io/src/test/resources/yaml/multiline/plain_single_quotes.yaml diff --git a/libraries-data-io/src/test/java/com/baeldung/libraries/snakeyaml/MultiLineStringsUnitTest.java b/libraries-data-io/src/test/java/com/baeldung/libraries/snakeyaml/MultiLineStringsUnitTest.java new file mode 100644 index 0000000000..836ac86339 --- /dev/null +++ b/libraries-data-io/src/test/java/com/baeldung/libraries/snakeyaml/MultiLineStringsUnitTest.java @@ -0,0 +1,90 @@ +package com.baeldung.libraries.snakeyaml; + +import org.junit.Before; +import org.junit.Test; +import org.yaml.snakeyaml.Yaml; + +import java.io.File; +import java.io.InputStream; +import java.util.Map; + +import static org.junit.Assert.assertEquals; + +public class MultiLineStringsUnitTest { + + private Yaml yaml; + + @Before + public void setup() { + yaml = new Yaml(); + } + + @Test + public void whenLiteral_ThenLineBreaksArePresent() { + String key = parseYamlKey("literal.yaml", "key"); + assertEquals("Line1\nLine2\nLine3", key); + } + + @Test + public void whenLiteral_ThenEndingBreaksAreReducedToOne() { + String key = parseYamlKey("literal2.yaml", "key"); + assertEquals("\n\nLine1\n\nLine2\n\nLine3\n", key); + } + + @Test + public void whenFolded_ThenLineBreaksAreReplaced() { + String key = parseYamlKey("folded.yaml", "key"); + assertEquals("Line1 Line2 Line3", key); + } + + @Test + public void whenFolded_ThenEmptyLinesAreReducedToOne() { + String key = parseYamlKey("folded2.yaml", "key"); + assertEquals("Line1 Line2\n\nLine3\n", key); + } + + @Test + public void whenLiteralKeep_ThenLastEmptyLinesArePresent() { + String key = parseYamlKey("literal_keep.yaml", "key"); + assertEquals("Line1\nLine2\nLine3\n\n", key); + } + + @Test + public void whenLiteralStrip_ThenLastEmptyLinesAreRemoved() { + String key = parseYamlKey("literal_strip.yaml", "key"); + assertEquals("Line1\nLine2\nLine3", key); + } + + @Test + public void whenFoldedKeep_ThenLastEmptyLinesArePresent() { + String key = parseYamlKey("folded_keep.yaml", "key"); + assertEquals("Line1 Line2 Line3\n\n\n", key); + } + + @Test + public void whenFoldedStrip_ThenLastEmptyLinesAreRemoved() { + String key = parseYamlKey("folded_strip.yaml", "key"); + assertEquals("Line1 Line2 Line3", key); + } + + @Test + public void whenDoubleQuotes_ThenExplicitBreaksArePreserved() { + String key = parseYamlKey("plain_double_quotes.yaml", "key"); + assertEquals("Line1\nLine2\nLine3", key); + } + + @Test + public void whenSingleQuotes_ThenExplicitBreaksAreIgnored() { + String key = parseYamlKey("plain_single_quotes.yaml", "key"); + assertEquals("Line1\\nLine2\nLine3", key); + } + + String parseYamlKey(String fileName, String key) { + InputStream inputStream = this.getClass() + .getClassLoader() + .getResourceAsStream("yaml" + File.separator + "multiline" + File.separator + fileName); + Map parsed = yaml.load(inputStream); + return parsed.get(key); + } + +} diff --git a/libraries-data-io/src/test/resources/yaml/multiline/folded.yaml b/libraries-data-io/src/test/resources/yaml/multiline/folded.yaml new file mode 100644 index 0000000000..c5fa743a08 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/folded.yaml @@ -0,0 +1,4 @@ +key: > + Line1 + Line2 + Line3 \ No newline at end of file diff --git a/libraries-data-io/src/test/resources/yaml/multiline/folded2.yaml b/libraries-data-io/src/test/resources/yaml/multiline/folded2.yaml new file mode 100644 index 0000000000..735abf9b2f --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/folded2.yaml @@ -0,0 +1,8 @@ +key: > + Line1 + Line2 + + + Line3 + + diff --git a/libraries-data-io/src/test/resources/yaml/multiline/folded_keep.yaml b/libraries-data-io/src/test/resources/yaml/multiline/folded_keep.yaml new file mode 100644 index 0000000000..555291fd26 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/folded_keep.yaml @@ -0,0 +1,6 @@ +key: >+ + Line1 + Line2 + Line3 + + diff --git a/libraries-data-io/src/test/resources/yaml/multiline/folded_strip.yaml b/libraries-data-io/src/test/resources/yaml/multiline/folded_strip.yaml new file mode 100644 index 0000000000..0a3a246dc2 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/folded_strip.yaml @@ -0,0 +1,7 @@ +key: >- + Line1 + Line2 + Line3 + + + diff --git a/libraries-data-io/src/test/resources/yaml/multiline/literal.yaml b/libraries-data-io/src/test/resources/yaml/multiline/literal.yaml new file mode 100644 index 0000000000..7e02501a33 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/literal.yaml @@ -0,0 +1,4 @@ +key: | + Line1 + Line2 + Line3 \ No newline at end of file diff --git a/libraries-data-io/src/test/resources/yaml/multiline/literal2.yaml b/libraries-data-io/src/test/resources/yaml/multiline/literal2.yaml new file mode 100644 index 0000000000..7c7fed0163 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/literal2.yaml @@ -0,0 +1,10 @@ +key: | + + + Line1 + + Line2 + + Line3 + + diff --git a/libraries-data-io/src/test/resources/yaml/multiline/literal_keep.yaml b/libraries-data-io/src/test/resources/yaml/multiline/literal_keep.yaml new file mode 100644 index 0000000000..37f22684dd --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/literal_keep.yaml @@ -0,0 +1,5 @@ +key: |+ + Line1 + Line2 + Line3 + diff --git a/libraries-data-io/src/test/resources/yaml/multiline/literal_strip.yaml b/libraries-data-io/src/test/resources/yaml/multiline/literal_strip.yaml new file mode 100644 index 0000000000..0791e13d5d --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/literal_strip.yaml @@ -0,0 +1,5 @@ +key: |- + Line1 + Line2 + Line3 + diff --git a/libraries-data-io/src/test/resources/yaml/multiline/plain_double_quotes.yaml b/libraries-data-io/src/test/resources/yaml/multiline/plain_double_quotes.yaml new file mode 100644 index 0000000000..ccab040a27 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/plain_double_quotes.yaml @@ -0,0 +1 @@ +key: "Line1\nLine2\nLine3" \ No newline at end of file diff --git a/libraries-data-io/src/test/resources/yaml/multiline/plain_single_quotes.yaml b/libraries-data-io/src/test/resources/yaml/multiline/plain_single_quotes.yaml new file mode 100644 index 0000000000..acbf35a462 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/plain_single_quotes.yaml @@ -0,0 +1,3 @@ +key: 'Line1\nLine2 + + Line3' \ No newline at end of file From 03c30d1d72736752fe4e57a66a2ffb5bc2e66a81 Mon Sep 17 00:00:00 2001 From: sampada Date: Mon, 10 Feb 2020 23:46:48 +0530 Subject: [PATCH 54/64] BAEL-15988 : spring boot artifacts/pom.xml --- .../spring-boot-artifacts/pom.xml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/spring-boot-modules/spring-boot-artifacts/pom.xml b/spring-boot-modules/spring-boot-artifacts/pom.xml index d6d3886c3e..f7c8636593 100644 --- a/spring-boot-modules/spring-boot-artifacts/pom.xml +++ b/spring-boot-modules/spring-boot-artifacts/pom.xml @@ -139,6 +139,33 @@ + + + pl.project13.maven + git-commit-id-plugin + ${git-commit-id-plugin.version} + + + get-the-git-infos + + revision + + initialize + + + validate-the-git-infos + + validateRevision + + package + + + + true + ${project.build.outputDirectory}/git.properties + + + @@ -185,6 +212,7 @@ 3.1.1 3.3.7-1 2.2 + 2.2.4 18.0 3.1.7 2.0.2.RELEASE From 725368917c9ccf8e77ba8e25e5b744a1a18831af Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Mon, 10 Feb 2020 21:16:53 +0200 Subject: [PATCH 55/64] Update README.md --- spring-boot-security/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/spring-boot-security/README.md b/spring-boot-security/README.md index 3f1fa774ec..be4690f321 100644 --- a/spring-boot-security/README.md +++ b/spring-boot-security/README.md @@ -7,7 +7,6 @@ This module contains articles about Spring Boot Security - [Spring Boot Security Auto-Configuration](https://www.baeldung.com/spring-boot-security-autoconfiguration) - [Spring Security for Spring Boot Integration Tests](https://www.baeldung.com/spring-security-integration-tests) - [Introduction to Spring Security Taglibs](https://www.baeldung.com/spring-security-taglibs) -- [Guide to @CurrentSecurityContext in Spring Security](https://github.com/eugenp/tutorials/tree/master/spring-boot-security) ### Spring Boot Security Auto-Configuration From 5f6feeb12bfa08ff0806a286f8e8a12716e142a3 Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Mon, 10 Feb 2020 23:07:00 +0200 Subject: [PATCH 56/64] Update README.md --- spring-boot-modules/spring-boot-security/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-modules/spring-boot-security/README.md b/spring-boot-modules/spring-boot-security/README.md index be4690f321..7229ba0f4a 100644 --- a/spring-boot-modules/spring-boot-security/README.md +++ b/spring-boot-modules/spring-boot-security/README.md @@ -7,6 +7,7 @@ This module contains articles about Spring Boot Security - [Spring Boot Security Auto-Configuration](https://www.baeldung.com/spring-boot-security-autoconfiguration) - [Spring Security for Spring Boot Integration Tests](https://www.baeldung.com/spring-security-integration-tests) - [Introduction to Spring Security Taglibs](https://www.baeldung.com/spring-security-taglibs) +- [Guide to @CurrentSecurityContext in Spring Security](https://www.baeldung.com/spring-currentsecuritycontext) ### Spring Boot Security Auto-Configuration From 64c2ddbf3012ee71c9a00877367692661a0fa733 Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Mon, 10 Feb 2020 23:10:44 +0200 Subject: [PATCH 57/64] Update README.md --- core-java-modules/core-java-regex/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core-java-modules/core-java-regex/README.md b/core-java-modules/core-java-regex/README.md index be5022c614..7a8f6d9293 100644 --- a/core-java-modules/core-java-regex/README.md +++ b/core-java-modules/core-java-regex/README.md @@ -5,4 +5,6 @@ ### Relevant Articles: - [An Overview of Regular Expressions Performance in Java](https://www.baeldung.com/java-regex-performance) - [A Guide To Java Regular Expressions API](http://www.baeldung.com/regular-expressions-java) -- [Guide to Escaping Characters in Java RegExps](http://www.baeldung.com/java-regexp-escape-char) \ No newline at end of file +- [Guide to Escaping Characters in Java RegExps](http://www.baeldung.com/java-regexp-escape-char) +- [Pre-compile Regex Patterns Into Pattern Objects](https://www.baeldung.com/java-regex-pre-compile) +- [Difference Between Java Matcher find() and matches()](https://www.baeldung.com/java-matcher-find-vs-matches) From 29622aba6caacf7196b30b68c40cccc703b9d9ab Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Mon, 10 Feb 2020 23:11:03 +0200 Subject: [PATCH 58/64] Delete README.md --- core-java-modules/core-java-text/README.md | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 core-java-modules/core-java-text/README.md diff --git a/core-java-modules/core-java-text/README.md b/core-java-modules/core-java-text/README.md deleted file mode 100644 index c29289f906..0000000000 --- a/core-java-modules/core-java-text/README.md +++ /dev/null @@ -1,8 +0,0 @@ -========= - -## Core Java 8 Cookbooks and Examples - -### Relevant Articles: -- [An Overview of Regular Expressions Performance in Java](https://www.baeldung.com/java-regex-performance) -- [Pre-compile Regex Patterns Into Pattern Objects](https://www.baeldung.com/java-regex-pre-compile) -- [Difference Between Java Matcher find() and matches()](https://www.baeldung.com/java-matcher-find-vs-matches) From f41b219d931ccf9e050255a742b27e5dd62c2cb9 Mon Sep 17 00:00:00 2001 From: sampada Date: Tue, 11 Feb 2020 10:39:59 +0530 Subject: [PATCH 59/64] BAEL-15988 : pom files --- .../spring-boot-performance/pom.xml | 12 + spring-boot-modules/spring-boot/pom.xml | 502 ++++++++---------- 2 files changed, 246 insertions(+), 268 deletions(-) diff --git a/spring-boot-modules/spring-boot-performance/pom.xml b/spring-boot-modules/spring-boot-performance/pom.xml index 882763f0bc..1f3eafd96c 100644 --- a/spring-boot-modules/spring-boot-performance/pom.xml +++ b/spring-boot-modules/spring-boot-performance/pom.xml @@ -19,6 +19,17 @@ org.springframework.boot spring-boot-starter + + + org.springframework.boot + spring-boot-starter-web + + + + de.codecentric + chaos-monkey-spring-boot + ${chaos.monkey.version} + @@ -41,5 +52,6 @@ com.baeldung.lazyinitialization.Application + 2.0.0 diff --git a/spring-boot-modules/spring-boot/pom.xml b/spring-boot-modules/spring-boot/pom.xml index 5e63cffc80..e0ff9ae2f9 100644 --- a/spring-boot-modules/spring-boot/pom.xml +++ b/spring-boot-modules/spring-boot/pom.xml @@ -1,268 +1,234 @@ - - - 4.0.0 - spring-boot - spring-boot - war - This is simple boot application for Spring boot actuator test - 0.0.1-SNAPSHOT - - - parent-boot-2 - com.baeldung - 0.0.1-SNAPSHOT - ../../parent-boot-2 - - - - - - - org.junit.jupiter - junit-jupiter-api - test - - - org.junit.jupiter - junit-jupiter-engine - test - - - - - org.junit.platform - junit-platform-launcher - ${junit-platform.version} - test - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-data-jpa - - - org.ehcache - ehcache - - - org.hibernate - hibernate-ehcache - - - org.springframework.boot - spring-boot-starter-actuator - - - - com.graphql-java - graphql-spring-boot-starter - ${graphql-spring-boot-starter.version} - - - com.graphql-java - graphql-java-tools - ${graphql-java-tools.version} - - - com.graphql-java - graphiql-spring-boot-starter - ${graphiql-spring-boot-starter.version} - - - - org.springframework.boot - spring-boot-starter-tomcat - - - - org.springframework.boot - spring-boot-starter-test - test - - - - io.dropwizard.metrics - metrics-core - - - - com.h2database - h2 - - - - org.springframework.boot - spring-boot-starter - - - com.jayway.jsonpath - json-path - test - - - - com.google.guava - guava - ${guava.version} - - - - org.apache.tomcat - tomcat-servlet-api - ${tomee-servlet-api.version} - provided - - - - org.togglz - togglz-spring-boot-starter - ${togglz.version} - - - - org.togglz - togglz-spring-security - ${togglz.version} - - - - org.apache.activemq - artemis-server - - - - com.rometools - rome - ${rome.version} - - - - de.codecentric - chaos-monkey-spring-boot - ${chaos.monkey.version} - - - - javax.validation - validation-api - - - - - spring-boot - - - src/main/resources - true - - - - - - - org.apache.maven.plugins - maven-war-plugin - - - - pl.project13.maven - git-commit-id-plugin - ${git-commit-id-plugin.version} - - - get-the-git-infos - - revision - - initialize - - - validate-the-git-infos - - validateRevision - - package - - - - true - ${project.build.outputDirectory}/git.properties - - - - - org.apache.maven.plugins - maven-resources-plugin - - - @ - - false - - - - - - - - - autoconfiguration - - - - org.apache.maven.plugins - maven-surefire-plugin - - - integration-test - - test - - - - **/*LiveTest.java - **/*IntegrationTest.java - **/*IntTest.java - - - **/AutoconfigurationTest.java - - - - - - - json - - - - - - - - - - - com.baeldung.intro.App - 8.5.11 - 2.4.1.Final - 1.9.0 - 2.0.0 - 5.0.2 - 5.0.2 - 5.2.4 - 18.0 - 2.2.4 - @ - - - + + + 4.0.0 + spring-boot + spring-boot + war + This is simple boot application for Spring boot actuator test + 0.0.1-SNAPSHOT + + + parent-boot-2 + com.baeldung + 0.0.1-SNAPSHOT + ../../parent-boot-2 + + + + + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + + + org.junit.platform + junit-platform-launcher + ${junit-platform.version} + test + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.ehcache + ehcache + + + org.hibernate + hibernate-ehcache + + + org.springframework.boot + spring-boot-starter-actuator + + + + com.graphql-java + graphql-spring-boot-starter + ${graphql-spring-boot-starter.version} + + + com.graphql-java + graphql-java-tools + ${graphql-java-tools.version} + + + com.graphql-java + graphiql-spring-boot-starter + ${graphiql-spring-boot-starter.version} + + + + org.springframework.boot + spring-boot-starter-tomcat + + + + org.springframework.boot + spring-boot-starter-test + test + + + + io.dropwizard.metrics + metrics-core + + + + com.h2database + h2 + + + + org.springframework.boot + spring-boot-starter + + + com.jayway.jsonpath + json-path + test + + + + com.google.guava + guava + ${guava.version} + + + + org.apache.tomcat + tomcat-servlet-api + ${tomee-servlet-api.version} + provided + + + + org.togglz + togglz-spring-boot-starter + ${togglz.version} + + + + org.togglz + togglz-spring-security + ${togglz.version} + + + + org.apache.activemq + artemis-server + + + + com.rometools + rome + ${rome.version} + + + + javax.validation + validation-api + + + + + spring-boot + + + src/main/resources + true + + + + + + + org.apache.maven.plugins + maven-war-plugin + + + + org.apache.maven.plugins + maven-resources-plugin + + + @ + + false + + + + + + + + + autoconfiguration + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration-test + + test + + + + **/*LiveTest.java + **/*IntegrationTest.java + **/*IntTest.java + + + **/AutoconfigurationTest.java + + + + + + + json + + + + + + + + + + + com.baeldung.intro.App + 8.5.11 + 2.4.1.Final + 1.9.0 + 5.0.2 + 5.0.2 + 5.2.4 + 18.0 + @ + + + From eeacffa08dcd0162793f21f8025fa558a71521e4 Mon Sep 17 00:00:00 2001 From: sampada Date: Tue, 11 Feb 2020 10:41:13 +0530 Subject: [PATCH 60/64] BAEL-15988 : all README files --- spring-boot-modules/spring-boot-artifacts/README.md | 2 ++ spring-boot-modules/spring-boot-autoconfiguration/README.md | 1 + spring-boot-modules/spring-boot-data/README.md | 1 + spring-boot-modules/spring-boot-performance/README.md | 1 + spring-boot-modules/spring-boot/README.MD | 5 ----- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-boot-modules/spring-boot-artifacts/README.md b/spring-boot-modules/spring-boot-artifacts/README.md index 876954e858..cb77cfad4d 100644 --- a/spring-boot-modules/spring-boot-artifacts/README.md +++ b/spring-boot-modules/spring-boot-artifacts/README.md @@ -9,3 +9,5 @@ This module contains articles about configuring the Spring Boot build process. - [Introduction to WebJars](https://www.baeldung.com/maven-webjars) - [A Quick Guide to Maven Wrapper](https://www.baeldung.com/maven-wrapper) - [Running a Spring Boot App with Maven vs an Executable War/Jar](https://www.baeldung.com/spring-boot-run-maven-vs-executable-jar) + - [Injecting Git Information Into Spring](https://www.baeldung.com/spring-git-information) + - [Guide to Creating and Running a Jar File in Java](https://www.baeldung.com/java-create-jar) diff --git a/spring-boot-modules/spring-boot-autoconfiguration/README.md b/spring-boot-modules/spring-boot-autoconfiguration/README.md index b3a50ad7a5..d1b5fde7ed 100644 --- a/spring-boot-modules/spring-boot-autoconfiguration/README.md +++ b/spring-boot-modules/spring-boot-autoconfiguration/README.md @@ -10,3 +10,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Create a Custom Auto-Configuration with Spring Boot](https://www.baeldung.com/spring-boot-custom-auto-configuration) - [Guide to ApplicationContextRunner in Spring Boot](https://www.baeldung.com/spring-boot-context-runner) - [A Guide to Spring Boot Configuration Metadata](https://www.baeldung.com/spring-boot-configuration-metadata) +- [Display Auto-Configuration Report in Spring Boot](https://www.baeldung.com/spring-boot-auto-configuration-report) \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-data/README.md b/spring-boot-modules/spring-boot-data/README.md index f023bb772f..faa38d475e 100644 --- a/spring-boot-modules/spring-boot-data/README.md +++ b/spring-boot-modules/spring-boot-data/README.md @@ -9,3 +9,4 @@ This module contains articles about Spring Boot with Spring Data - [Disable Spring Data Auto Configuration](https://www.baeldung.com/spring-data-disable-auto-config) - [Repositories with Multiple Spring Data Modules](https://www.baeldung.com/spring-multiple-data-modules) - [Spring Custom Property Editor](https://www.baeldung.com/spring-mvc-custom-property-editor) +- [Using @JsonComponent in Spring Boot](https://www.baeldung.com/spring-boot-jsoncomponent) diff --git a/spring-boot-modules/spring-boot-performance/README.md b/spring-boot-modules/spring-boot-performance/README.md index f6a11720de..9443e5bb19 100644 --- a/spring-boot-modules/spring-boot-performance/README.md +++ b/spring-boot-modules/spring-boot-performance/README.md @@ -5,3 +5,4 @@ This module contains articles about Spring Boot performance. ### Relevant Articles - [Lazy Initialization in Spring Boot 2](https://www.baeldung.com/spring-boot-lazy-initialization) +- [Introduction to Chaos Monkey](https://www.baeldung.com/spring-boot-chaos-monkey) diff --git a/spring-boot-modules/spring-boot/README.MD b/spring-boot-modules/spring-boot/README.MD index 2423d6d331..217d9e90b2 100644 --- a/spring-boot-modules/spring-boot/README.MD +++ b/spring-boot-modules/spring-boot/README.MD @@ -16,7 +16,6 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Create a Custom FailureAnalyzer with Spring Boot](https://www.baeldung.com/spring-boot-failure-analyzer) - [Dynamic DTO Validation Config Retrieved from the Database](https://www.baeldung.com/spring-dynamic-dto-validation) - [Custom Information in Spring Boot Info Endpoint](https://www.baeldung.com/spring-boot-info-actuator-custom) -- [Using @JsonComponent in Spring Boot](https://www.baeldung.com/spring-boot-jsoncomponent) - [Testing in Spring Boot](https://www.baeldung.com/spring-boot-testing) - [How to Get All Spring-Managed Beans?](https://www.baeldung.com/spring-show-all-beans) - [Spring Boot and Togglz Aspect](https://www.baeldung.com/spring-togglz) @@ -31,8 +30,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Guide to the Favicon in Spring Boot](https://www.baeldung.com/spring-boot-favicon) - [Spring Shutdown Callbacks](https://www.baeldung.com/spring-shutdown-callbacks) - [Container Configuration in Spring Boot 2](https://www.baeldung.com/embeddedservletcontainercustomizer-configurableembeddedservletcontainer-spring-boot) -- [Introduction to Chaos Monkey](https://www.baeldung.com/spring-boot-chaos-monkey) -- [Display Auto-Configuration Report in Spring Boot](https://www.baeldung.com/spring-boot-auto-configuration-report) -- [Injecting Git Information Into Spring](https://www.baeldung.com/spring-git-information) - [Validation in Spring Boot](https://www.baeldung.com/spring-boot-bean-validation) -- [Guide to Creating and Running a Jar File in Java](https://www.baeldung.com/java-create-jar) From 2cc05b370b789a378419941faab4a03af715acdd Mon Sep 17 00:00:00 2001 From: sampada Date: Tue, 11 Feb 2020 10:52:06 +0530 Subject: [PATCH 61/64] BAEL-15988 : Java file movement --- .../src/main/java/com/baeldung/git/CommitIdApplication.java | 0 .../src/main/java/com/baeldung/git/CommitInfoController.java | 0 .../src/test/java/com/baeldung/git/CommitIdIntegrationTest.java | 0 .../src/main/java/com}/baeldung/boot/jsoncomponent/User.java | 0 .../baeldung/boot/jsoncomponent/UserCombinedSerializer.java | 0 .../com}/baeldung/boot/jsoncomponent/UserJsonDeserializer.java | 0 .../com}/baeldung/boot/jsoncomponent/UserJsonSerializer.java | 0 .../boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java | 0 .../boot/jsoncomponent/UserJsonSerializerIntegrationTest.java | 0 .../java/com/baeldung/chaosmonkey/SpringBootChaosMonkeyApp.java | 0 .../baeldung/chaosmonkey/controller/PermissionsController.java | 0 .../com/baeldung/chaosmonkey/service/PermissionsService.java | 0 .../spring-boot/src/main/java/com/baeldung/git/README.md | 2 -- 13 files changed, 2 deletions(-) rename spring-boot-modules/{spring-boot => spring-boot-artifacts}/src/main/java/com/baeldung/git/CommitIdApplication.java (100%) rename spring-boot-modules/{spring-boot => spring-boot-artifacts}/src/main/java/com/baeldung/git/CommitInfoController.java (100%) rename spring-boot-modules/{spring-boot => spring-boot-artifacts}/src/test/java/com/baeldung/git/CommitIdIntegrationTest.java (100%) rename spring-boot-modules/{spring-boot/src/main/java/org => spring-boot-data/src/main/java/com}/baeldung/boot/jsoncomponent/User.java (100%) rename spring-boot-modules/{spring-boot/src/main/java/org => spring-boot-data/src/main/java/com}/baeldung/boot/jsoncomponent/UserCombinedSerializer.java (100%) rename spring-boot-modules/{spring-boot/src/main/java/org => spring-boot-data/src/main/java/com}/baeldung/boot/jsoncomponent/UserJsonDeserializer.java (100%) rename spring-boot-modules/{spring-boot/src/main/java/org => spring-boot-data/src/main/java/com}/baeldung/boot/jsoncomponent/UserJsonSerializer.java (100%) rename spring-boot-modules/{spring-boot/src/test/java/org => spring-boot-data/src/test/java/com}/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java (100%) rename spring-boot-modules/{spring-boot/src/test/java/org => spring-boot-data/src/test/java/com}/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java (100%) rename spring-boot-modules/{spring-boot => spring-boot-performance}/src/main/java/com/baeldung/chaosmonkey/SpringBootChaosMonkeyApp.java (100%) rename spring-boot-modules/{spring-boot => spring-boot-performance}/src/main/java/com/baeldung/chaosmonkey/controller/PermissionsController.java (100%) rename spring-boot-modules/{spring-boot => spring-boot-performance}/src/main/java/com/baeldung/chaosmonkey/service/PermissionsService.java (100%) delete mode 100644 spring-boot-modules/spring-boot/src/main/java/com/baeldung/git/README.md diff --git a/spring-boot-modules/spring-boot/src/main/java/com/baeldung/git/CommitIdApplication.java b/spring-boot-modules/spring-boot-artifacts/src/main/java/com/baeldung/git/CommitIdApplication.java similarity index 100% rename from spring-boot-modules/spring-boot/src/main/java/com/baeldung/git/CommitIdApplication.java rename to spring-boot-modules/spring-boot-artifacts/src/main/java/com/baeldung/git/CommitIdApplication.java diff --git a/spring-boot-modules/spring-boot/src/main/java/com/baeldung/git/CommitInfoController.java b/spring-boot-modules/spring-boot-artifacts/src/main/java/com/baeldung/git/CommitInfoController.java similarity index 100% rename from spring-boot-modules/spring-boot/src/main/java/com/baeldung/git/CommitInfoController.java rename to spring-boot-modules/spring-boot-artifacts/src/main/java/com/baeldung/git/CommitInfoController.java diff --git a/spring-boot-modules/spring-boot/src/test/java/com/baeldung/git/CommitIdIntegrationTest.java b/spring-boot-modules/spring-boot-artifacts/src/test/java/com/baeldung/git/CommitIdIntegrationTest.java similarity index 100% rename from spring-boot-modules/spring-boot/src/test/java/com/baeldung/git/CommitIdIntegrationTest.java rename to spring-boot-modules/spring-boot-artifacts/src/test/java/com/baeldung/git/CommitIdIntegrationTest.java diff --git a/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/User.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/User.java similarity index 100% rename from spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/User.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/User.java diff --git a/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserCombinedSerializer.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserCombinedSerializer.java similarity index 100% rename from spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserCombinedSerializer.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserCombinedSerializer.java diff --git a/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserJsonDeserializer.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializer.java similarity index 100% rename from spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserJsonDeserializer.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializer.java diff --git a/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserJsonSerializer.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonSerializer.java similarity index 100% rename from spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserJsonSerializer.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonSerializer.java diff --git a/spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java similarity index 100% rename from spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java rename to spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java diff --git a/spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java similarity index 100% rename from spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java rename to spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java diff --git a/spring-boot-modules/spring-boot/src/main/java/com/baeldung/chaosmonkey/SpringBootChaosMonkeyApp.java b/spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/chaosmonkey/SpringBootChaosMonkeyApp.java similarity index 100% rename from spring-boot-modules/spring-boot/src/main/java/com/baeldung/chaosmonkey/SpringBootChaosMonkeyApp.java rename to spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/chaosmonkey/SpringBootChaosMonkeyApp.java diff --git a/spring-boot-modules/spring-boot/src/main/java/com/baeldung/chaosmonkey/controller/PermissionsController.java b/spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/chaosmonkey/controller/PermissionsController.java similarity index 100% rename from spring-boot-modules/spring-boot/src/main/java/com/baeldung/chaosmonkey/controller/PermissionsController.java rename to spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/chaosmonkey/controller/PermissionsController.java diff --git a/spring-boot-modules/spring-boot/src/main/java/com/baeldung/chaosmonkey/service/PermissionsService.java b/spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/chaosmonkey/service/PermissionsService.java similarity index 100% rename from spring-boot-modules/spring-boot/src/main/java/com/baeldung/chaosmonkey/service/PermissionsService.java rename to spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/chaosmonkey/service/PermissionsService.java diff --git a/spring-boot-modules/spring-boot/src/main/java/com/baeldung/git/README.md b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/git/README.md deleted file mode 100644 index 7e6a597c28..0000000000 --- a/spring-boot-modules/spring-boot/src/main/java/com/baeldung/git/README.md +++ /dev/null @@ -1,2 +0,0 @@ -### Relevant Articles: -- [Injecting Git Information Into Spring](http://www.baeldung.com/spring-git-information) From 93770e684a8994214bf016715054db3cd3c20c9e Mon Sep 17 00:00:00 2001 From: sampada Date: Tue, 11 Feb 2020 10:53:27 +0530 Subject: [PATCH 62/64] BAEL-15988 : application.properties changes --- .../src/main/resources/application.properties | 29 +++++++++++++++++ .../src/main/resources/application.properties | 32 +------------------ 2 files changed, 30 insertions(+), 31 deletions(-) create mode 100644 spring-boot-modules/spring-boot-performance/src/main/resources/application.properties diff --git a/spring-boot-modules/spring-boot-performance/src/main/resources/application.properties b/spring-boot-modules/spring-boot-performance/src/main/resources/application.properties new file mode 100644 index 0000000000..3727232ea6 --- /dev/null +++ b/spring-boot-modules/spring-boot-performance/src/main/resources/application.properties @@ -0,0 +1,29 @@ +#chaos monkey for spring boot props +management.endpoint.chaosmonkey.enabled=true +management.endpoint.chaosmonkeyjmx.enabled=true + +spring.profiles.active=chaos-monkey +#Determine whether should execute or not +chaos.monkey.enabled=true +#How many requests are to be attacked. 1: attack each request; 5: each 5th request is attacked +chaos.monkey.assaults.level=1 +#Minimum latency in ms added to the request +chaos.monkey.assaults.latencyRangeStart=3000 +#Maximum latency in ms added to the request +chaos.monkey.assaults.latencyRangeEnd=15000 +#Latency assault active +chaos.monkey.assaults.latencyActive=true +#Exception assault active +chaos.monkey.assaults.exceptionsActive=false +#AppKiller assault active +chaos.monkey.assaults.killApplicationActive=false +#Controller watcher active +chaos.monkey.watcher.controller=false +#RestController watcher active +chaos.monkey.watcher.restController=false +#Service watcher active +chaos.monkey.watcher.service=true +#Repository watcher active +chaos.monkey.watcher.repository=false +#Component watcher active +chaos.monkey.watcher.component=false diff --git a/spring-boot-modules/spring-boot/src/main/resources/application.properties b/spring-boot-modules/spring-boot/src/main/resources/application.properties index c322fb0573..7de79da574 100644 --- a/spring-boot-modules/spring-boot/src/main/resources/application.properties +++ b/spring-boot-modules/spring-boot/src/main/resources/application.properties @@ -41,34 +41,4 @@ servlet.mapping=/dispatcherExampleURL #spring.banner.image.margin= //TODO #spring.banner.image.invert= //TODO -contactInfoType=email - -#chaos monkey for spring boot props -management.endpoint.chaosmonkey.enabled=true -management.endpoint.chaosmonkeyjmx.enabled=true - -spring.profiles.active=chaos-monkey -#Determine whether should execute or not -chaos.monkey.enabled=true -#How many requests are to be attacked. 1: attack each request; 5: each 5th request is attacked -chaos.monkey.assaults.level=1 -#Minimum latency in ms added to the request -chaos.monkey.assaults.latencyRangeStart=3000 -#Maximum latency in ms added to the request -chaos.monkey.assaults.latencyRangeEnd=15000 -#Latency assault active -chaos.monkey.assaults.latencyActive=true -#Exception assault active -chaos.monkey.assaults.exceptionsActive=false -#AppKiller assault active -chaos.monkey.assaults.killApplicationActive=false -#Controller watcher active -chaos.monkey.watcher.controller=false -#RestController watcher active -chaos.monkey.watcher.restController=false -#Service watcher active -chaos.monkey.watcher.service=true -#Repository watcher active -chaos.monkey.watcher.repository=false -#Component watcher active -chaos.monkey.watcher.component=false +contactInfoType=email \ No newline at end of file From 0a1ee41825321a12652a3ade5204f7f50f10ba9b Mon Sep 17 00:00:00 2001 From: sampada Date: Tue, 11 Feb 2020 10:54:54 +0530 Subject: [PATCH 63/64] BAEL-15988 : package change from org.baeldung to com.baeldung --- .../src/main/java/com/baeldung/boot/jsoncomponent/User.java | 2 +- .../baeldung/boot/jsoncomponent/UserCombinedSerializer.java | 2 +- .../baeldung/boot/jsoncomponent/UserJsonDeserializer.java | 2 +- .../com/baeldung/boot/jsoncomponent/UserJsonSerializer.java | 2 +- .../jsoncomponent/UserJsonDeserializerIntegrationTest.java | 4 ++-- .../jsoncomponent/UserJsonSerializerIntegrationTest.java | 5 ++--- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/User.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/User.java index 1f14131300..ca22dc57ea 100644 --- a/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/User.java +++ b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/User.java @@ -1,4 +1,4 @@ -package org.baeldung.boot.jsoncomponent; +package com.baeldung.boot.jsoncomponent; import javafx.scene.paint.Color; diff --git a/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserCombinedSerializer.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserCombinedSerializer.java index f4d7505342..d0a14da1f2 100644 --- a/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserCombinedSerializer.java +++ b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserCombinedSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.boot.jsoncomponent; +package com.baeldung.boot.jsoncomponent; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; diff --git a/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializer.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializer.java index f7bd822c8a..05b1cb10a0 100644 --- a/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializer.java +++ b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializer.java @@ -1,4 +1,4 @@ -package org.baeldung.boot.jsoncomponent; +package com.baeldung.boot.jsoncomponent; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonSerializer.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonSerializer.java index 03330d81a4..1df37728ba 100644 --- a/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonSerializer.java +++ b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.boot.jsoncomponent; +package com.baeldung.boot.jsoncomponent; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java index f8b47a23fc..868d40c38b 100644 --- a/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java +++ b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java @@ -1,9 +1,9 @@ -package org.baeldung.boot.jsoncomponent; +package com.baeldung.boot.jsoncomponent; +import com.baeldung.boot.jsoncomponent.User; import com.fasterxml.jackson.databind.ObjectMapper; import javafx.scene.paint.Color; -import org.baeldung.boot.jsoncomponent.User; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; diff --git a/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java index 060374e8fa..aef99921a5 100644 --- a/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java +++ b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java @@ -1,5 +1,6 @@ -package org.baeldung.boot.jsoncomponent; +package com.baeldung.boot.jsoncomponent; +import com.baeldung.boot.jsoncomponent.User; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import javafx.scene.paint.Color; @@ -11,8 +12,6 @@ import org.springframework.test.context.junit4.SpringRunner; import static org.junit.Assert.assertEquals; -import org.baeldung.boot.jsoncomponent.User; - @JsonTest @RunWith(SpringRunner.class) public class UserJsonSerializerIntegrationTest { From bde0c37075ad3831a27923f30f51cea88c9377bd Mon Sep 17 00:00:00 2001 From: Pazis Date: Tue, 11 Feb 2020 23:40:59 +0330 Subject: [PATCH 64/64] java.net.SocketException: Connection reset (#8707) * initial commit * fix --- .../socketexception/SocketClient.java | 32 +++++++++++++ .../socketexception/SocketServer.java | 45 +++++++++++++++++++ .../SocketExceptionHandlingUnitTest.java | 31 +++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketClient.java create mode 100644 core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketServer.java create mode 100644 core-java-modules/core-java-exceptions-2/src/test/java/com/baeldung/socketexception/SocketExceptionHandlingUnitTest.java diff --git a/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketClient.java b/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketClient.java new file mode 100644 index 0000000000..5c3596e890 --- /dev/null +++ b/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketClient.java @@ -0,0 +1,32 @@ +package com.baeldung.socketexception; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.net.Socket; + +public class SocketClient { + + private Socket clientSocket; + private PrintWriter out; + private BufferedReader in; + + public void startConnection(String ip, int port) throws IOException { + clientSocket = new Socket(ip, port); + out = new PrintWriter(clientSocket.getOutputStream(), true); + in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); + } + + public String sendMessage(String msg) throws IOException { + out.println(msg); + return in.readLine(); + } + + public void stopConnection() throws IOException { + in.close(); + out.close(); + clientSocket.close(); + } + +} diff --git a/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketServer.java b/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketServer.java new file mode 100644 index 0000000000..ad6fab738f --- /dev/null +++ b/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketServer.java @@ -0,0 +1,45 @@ +package com.baeldung.socketexception; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.net.ServerSocket; +import java.net.Socket; + +public class SocketServer { + + private ServerSocket serverSocket; + private Socket clientSocket; + private PrintWriter out; + private BufferedReader in; + + public void start(int port) { + try { + serverSocket = new ServerSocket(port); + clientSocket = serverSocket.accept(); + out = new PrintWriter(clientSocket.getOutputStream(), true); + in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); + String msg = in.readLine(); + if (msg.contains("hi")) + out.println("hi"); + else + out.println("didn't understand"); + close(); + stop(); + } catch (IOException e) { + + } + } + + private void close() throws IOException { + in.close(); + out.close(); + } + + private void stop() throws IOException { + clientSocket.close(); + serverSocket.close(); + } + +} diff --git a/core-java-modules/core-java-exceptions-2/src/test/java/com/baeldung/socketexception/SocketExceptionHandlingUnitTest.java b/core-java-modules/core-java-exceptions-2/src/test/java/com/baeldung/socketexception/SocketExceptionHandlingUnitTest.java new file mode 100644 index 0000000000..08b21c6299 --- /dev/null +++ b/core-java-modules/core-java-exceptions-2/src/test/java/com/baeldung/socketexception/SocketExceptionHandlingUnitTest.java @@ -0,0 +1,31 @@ +package com.baeldung.socketexception; + +import java.io.IOException; +import java.net.SocketException; +import java.util.concurrent.Executors; + +import org.junit.BeforeClass; +import org.junit.Test; + +public class SocketExceptionHandlingUnitTest { + + @BeforeClass + public static void runServer() throws IOException, InterruptedException { + Executors.newSingleThreadExecutor() + .submit(() -> new SocketServer().start(6699)); + Thread.sleep(100); + } + + @Test + public void givenRunningServer_whenConnectToClosedSocket_thenHandleException() throws IOException { + SocketClient client = new SocketClient(); + client.startConnection("127.0.0.1", 6699); + try { + client.sendMessage("hi"); + client.sendMessage("hi again"); + } catch (SocketException e) { + client.stopConnection(); + } + } + +}