2.22.0
- 0.13.1
+ 0.15.0
1.8
UTF-8
1.8
diff --git a/quarkus/src/main/java/com/baeldung/quarkus/HelloService.java b/quarkus/src/main/java/com/baeldung/quarkus/HelloService.java
index 4b19de1b63..4c505fbabe 100644
--- a/quarkus/src/main/java/com/baeldung/quarkus/HelloService.java
+++ b/quarkus/src/main/java/com/baeldung/quarkus/HelloService.java
@@ -8,7 +8,7 @@ import javax.enterprise.context.ApplicationScoped;
public class HelloService {
@ConfigProperty(name = "greeting")
- private String greeting;
+ String greeting;
public String politeHello(String name){
return greeting + " " + name;
diff --git a/spring-5-reactive-2/pom.xml b/spring-5-reactive-2/pom.xml
index 668e0e5cf9..f1407ee1ad 100644
--- a/spring-5-reactive-2/pom.xml
+++ b/spring-5-reactive-2/pom.xml
@@ -32,6 +32,13 @@
${lombok.version}
provided
+
+
+ com.github.tomakehurst
+ wiremock-jre8
+ ${wiremock.version}
+ test
+
@@ -46,5 +53,9 @@
+
+
+ 2.24.0
+
diff --git a/spring-5-reactive-2/src/main/java/com/baeldung/webclient/filter/WebClientFilters.java b/spring-5-reactive-2/src/main/java/com/baeldung/webclient/filter/WebClientFilters.java
new file mode 100644
index 0000000000..c98caf67b4
--- /dev/null
+++ b/spring-5-reactive-2/src/main/java/com/baeldung/webclient/filter/WebClientFilters.java
@@ -0,0 +1,57 @@
+package com.baeldung.webclient.filter;
+
+import java.io.PrintStream;
+import java.net.URI;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpMethod;
+import org.springframework.web.reactive.function.client.ClientRequest;
+import org.springframework.web.reactive.function.client.ExchangeFilterFunction;
+
+public class WebClientFilters {
+
+ private static final Logger LOG = LoggerFactory.getLogger(WebClientFilters.class);
+
+ public static ExchangeFilterFunction demoFilter() {
+ ExchangeFilterFunction filterFunction = (clientRequest, nextFilter) -> {
+ LOG.info("WebClient fitler executed");
+ return nextFilter.exchange(clientRequest);
+ };
+ return filterFunction;
+ }
+
+ public static ExchangeFilterFunction countingFilter(AtomicInteger getCounter) {
+ ExchangeFilterFunction countingFilter = (clientRequest, nextFilter) -> {
+ HttpMethod httpMethod = clientRequest.method();
+ if (httpMethod == HttpMethod.GET) {
+ getCounter.incrementAndGet();
+ }
+ return nextFilter.exchange(clientRequest);
+ };
+ return countingFilter;
+ }
+
+ public static ExchangeFilterFunction urlModifyingFilter(String version) {
+ ExchangeFilterFunction urlModifyingFilter = (clientRequest, nextFilter) -> {
+ String oldUrl = clientRequest.url()
+ .toString();
+ URI newUrl = URI.create(oldUrl + "/" + version);
+ ClientRequest filteredRequest = ClientRequest.from(clientRequest)
+ .url(newUrl)
+ .build();
+ return nextFilter.exchange(filteredRequest);
+ };
+ return urlModifyingFilter;
+ }
+
+ public static ExchangeFilterFunction loggingFilter(PrintStream printStream) {
+ ExchangeFilterFunction loggingFilter = (clientRequest, nextFilter) -> {
+ printStream.print("Sending request " + clientRequest.method() + " " + clientRequest.url());
+ return nextFilter.exchange(clientRequest);
+ };
+ return loggingFilter;
+ }
+
+}
diff --git a/spring-5-reactive-2/src/test/java/com/baeldung/webclient/filter/FilteredWebClientUnitTest.java b/spring-5-reactive-2/src/test/java/com/baeldung/webclient/filter/FilteredWebClientUnitTest.java
new file mode 100644
index 0000000000..675cd03d10
--- /dev/null
+++ b/spring-5-reactive-2/src/test/java/com/baeldung/webclient/filter/FilteredWebClientUnitTest.java
@@ -0,0 +1,145 @@
+package com.baeldung.webclient.filter;
+
+import static com.baeldung.webclient.filter.WebClientFilters.countingFilter;
+import static com.baeldung.webclient.filter.WebClientFilters.loggingFilter;
+import static com.baeldung.webclient.filter.WebClientFilters.urlModifyingFilter;
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.containing;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.getRequestedFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
+import static com.github.tomakehurst.wiremock.client.WireMock.verify;
+import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.net.URI;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.springframework.web.reactive.function.client.ExchangeFilterFunctions;
+import org.springframework.web.reactive.function.client.WebClient;
+
+import com.github.tomakehurst.wiremock.junit.WireMockRule;
+
+public class FilteredWebClientUnitTest {
+
+ private static final String PATH = "/filter/test";
+
+ @Rule
+ public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicPort()
+ .dynamicHttpsPort());
+
+ @Test
+ public void whenNoUrlModifyingFilter_thenPathUnchanged() {
+ stubFor(get(urlPathEqualTo(PATH)).willReturn(aResponse().withStatus(200)
+ .withBody("done")));
+
+ WebClient webClient = WebClient.create();
+ String actual = sendGetRequest(webClient);
+
+ assertThat(actual).isEqualTo("done");
+ verify(getRequestedFor(urlPathEqualTo(PATH)));
+ }
+
+ @Test
+ public void whenUrlModifyingFilter_thenPathModified() {
+ stubFor(get(urlPathEqualTo(PATH + "/1.0")).willReturn(aResponse().withStatus(200)
+ .withBody("done")));
+
+ WebClient webClient = WebClient.builder()
+ .filter(urlModifyingFilter("1.0"))
+ .build();
+ String actual = sendGetRequest(webClient);
+
+ assertThat(actual).isEqualTo("done");
+ verify(getRequestedFor(urlPathEqualTo(PATH + "/1.0")));
+ }
+
+ @Test
+ public void givenCountingFilter_whenGet_thenIncreaseCounter() {
+ stubFor(get(urlPathEqualTo(PATH)).willReturn(aResponse().withStatus(200)
+ .withBody("done")));
+ AtomicInteger counter = new AtomicInteger(10);
+
+ WebClient webClient = WebClient.builder()
+ .filter(countingFilter(counter))
+ .build();
+ String actual = sendGetRequest(webClient);
+
+ assertThat(actual).isEqualTo("done");
+ assertThat(counter.get()).isEqualTo(11);
+ }
+
+ @Test
+ public void givenCountingFilter_whenPost_thenDoNotIncreaseCounter() {
+ stubFor(post(urlPathEqualTo(PATH)).willReturn(aResponse().withStatus(200)
+ .withBody("done")));
+ AtomicInteger counter = new AtomicInteger(10);
+
+ WebClient webClient = WebClient.builder()
+ .filter(countingFilter(counter))
+ .build();
+ String actual = sendPostRequest(webClient);
+
+ assertThat(actual).isEqualTo("done");
+ assertThat(counter.get()).isEqualTo(10);
+ }
+
+ @Test
+ public void testLoggingFilter() throws IOException {
+ stubFor(get(urlPathEqualTo(PATH)).willReturn(aResponse().withStatus(200)
+ .withBody("done")));
+
+ try (ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos);) {
+ WebClient webClient = WebClient.builder()
+ .filter(loggingFilter(ps))
+ .build();
+ String actual = sendGetRequest(webClient);
+
+ assertThat(actual).isEqualTo("done");
+ assertThat(baos.toString()).isEqualTo("Sending request GET " + getUrl());
+ }
+ }
+
+ @Test
+ public void testBasicAuthFilter() {
+ stubFor(get(urlPathEqualTo(PATH)).willReturn(aResponse().withStatus(200)
+ .withBody("authorized")));
+
+ WebClient webClient = WebClient.builder()
+ .filter(ExchangeFilterFunctions.basicAuthentication("user", "password"))
+ .build();
+ String actual = sendGetRequest(webClient);
+
+ assertThat(actual).isEqualTo("authorized");
+ verify(getRequestedFor(urlPathEqualTo(PATH)).withHeader("Authorization", containing("Basic")));
+ }
+
+ private String sendGetRequest(WebClient webClient) {
+ return webClient.get()
+ .uri(getUrl())
+ .retrieve()
+ .bodyToMono(String.class)
+ .block();
+ }
+
+ private String sendPostRequest(WebClient webClient) {
+ return webClient.post()
+ .uri(URI.create(getUrl()))
+ .retrieve()
+ .bodyToMono(String.class)
+ .block();
+ }
+
+ private String getUrl() {
+ return "http://localhost:" + wireMockRule.port() + PATH;
+
+ }
+
+}
diff --git a/spring-all/README.md b/spring-all/README.md
index b5e91d8d60..d3296bd457 100644
--- a/spring-all/README.md
+++ b/spring-all/README.md
@@ -34,3 +34,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
- [Spring Events](https://www.baeldung.com/spring-events)
- [Spring Null-Safety Annotations](https://www.baeldung.com/spring-null-safety-annotations)
- [Using @Autowired in Abstract Classes](https://www.baeldung.com/spring-autowired-abstract-class)
+- [The Spring @Qualifier Annotation](https://www.baeldung.com/spring-qualifier-annotation)
diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/Application.java b/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/Application.java
new file mode 100644
index 0000000000..d4c8010d2b
--- /dev/null
+++ b/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/Application.java
@@ -0,0 +1,20 @@
+package com.baeldung.springbootconfiguration;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.SpringBootConfiguration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+
+@ComponentScan(basePackages = {"com.baeldung.springbootconfiguration.*"})
+@SpringBootConfiguration
+public class Application {
+
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+
+ @Bean
+ public PersonService personService() {
+ return new PersonServiceImpl();
+ }
+}
diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonService.java b/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonService.java
new file mode 100644
index 0000000000..4909d957e5
--- /dev/null
+++ b/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonService.java
@@ -0,0 +1,4 @@
+package com.baeldung.springbootconfiguration;
+
+public interface PersonService {
+}
diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonServiceImpl.java b/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonServiceImpl.java
new file mode 100644
index 0000000000..9f2af33e8e
--- /dev/null
+++ b/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonServiceImpl.java
@@ -0,0 +1,4 @@
+package com.baeldung.springbootconfiguration;
+
+public class PersonServiceImpl implements PersonService {
+}
diff --git a/spring-boot-data/README.md b/spring-boot-data/README.md
index 3fd1d17994..6f0b8c8123 100644
--- a/spring-boot-data/README.md
+++ b/spring-boot-data/README.md
@@ -1,3 +1,5 @@
-### Relevant Articles:
+## Relevant Articles:
+
- [Formatting JSON Dates in Spring Boot](https://www.baeldung.com/spring-boot-formatting-json-dates)
- [Rendering Exceptions in JSON with Spring](https://www.baeldung.com/spring-exceptions-json)
+- [Disable Spring Data Auto Configuration](https://www.baeldung.com/spring-data-disable-auto-config)
diff --git a/spring-cloud/spring-cloud-stream/spring-cloud-stream-kafka/README.md b/spring-cloud/spring-cloud-stream/spring-cloud-stream-kafka/README.md
new file mode 100644
index 0000000000..81e0ffe5c8
--- /dev/null
+++ b/spring-cloud/spring-cloud-stream/spring-cloud-stream-kafka/README.md
@@ -0,0 +1,3 @@
+## Relevant Articles:
+
+- [Guide to Spring Cloud Stream with Kafka, Apache Avro and Confluent Schema Registry](https://www.baeldung.com/spring-cloud-stream-kafka-avro-confluent)
diff --git a/spring-core-2/README.md b/spring-core-2/README.md
new file mode 100644
index 0000000000..4c9e3b9ddf
--- /dev/null
+++ b/spring-core-2/README.md
@@ -0,0 +1,3 @@
+## Relevant Articles:
+
+- [Understanding getBean() in Spring](https://www.baeldung.com/spring-getbean)
diff --git a/spring-security-client/README.MD b/spring-security-client/README.MD
deleted file mode 100644
index 0b0af7ffe1..0000000000
--- a/spring-security-client/README.MD
+++ /dev/null
@@ -1,11 +0,0 @@
-=========
-## Spring Security Authentication/Authorization Example Project
-
-##The Course
-The "REST With Spring" Classes: http://github.learnspringsecurity.com
-
-### Relevant Articles:
-- [Spring Security Manual Authentication](http://www.baeldung.com/spring-security-authentication)
-
-### Build the Project
-mvn clean install
diff --git a/spring-security-client/pom.xml b/spring-security-client/pom.xml
deleted file mode 100644
index 96ac837a09..0000000000
--- a/spring-security-client/pom.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
- 4.0.0
- spring-security-client
- spring-security-client
- pom
-
-
- com.baeldung
- parent-modules
- 1.0.0-SNAPSHOT
- ..
-
-
-
- spring-security-jsp-authentication
- spring-security-jsp-authorize
- spring-security-jsp-config
- spring-security-mvc
- spring-security-thymeleaf-authentication
- spring-security-thymeleaf-authorize
- spring-security-thymeleaf-config
-
-
diff --git a/spring-security-client/spring-security-jsp-authentication/pom.xml b/spring-security-client/spring-security-jsp-authentication/pom.xml
deleted file mode 100644
index 9cb2a45331..0000000000
--- a/spring-security-client/spring-security-jsp-authentication/pom.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
- 4.0.0
- com.baeldung
- spring-security-jsp-authentication
- 0.0.1-SNAPSHOT
- spring-security-jsp-authentication
- war
- Spring Security JSP Authentication tag sample
-
-
- parent-boot-1
- com.baeldung
- 0.0.1-SNAPSHOT
- ../../parent-boot-1
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-tomcat
-
-
- org.apache.tomcat.embed
- tomcat-embed-jasper
- provided
-
-
- javax.servlet
- jstl
-
-
- org.springframework.security
- spring-security-taglibs
-
-
-
-
diff --git a/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/Application.java b/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/Application.java
deleted file mode 100644
index c2c5939676..0000000000
--- a/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/Application.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.web.support.SpringBootServletInitializer;
-
-@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
-public class Application extends SpringBootServletInitializer {
-
- @Override
- protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
- return application.sources(Application.class);
- }
-
- public static void main(String[] args) {
- SpringApplication.run(Application.class, args);
- }
-
-}
diff --git a/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/MvcConfig.java b/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/MvcConfig.java
deleted file mode 100644
index fa2a324146..0000000000
--- a/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/MvcConfig.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
-
-@Configuration
-public class MvcConfig extends WebMvcConfigurerAdapter {
-
- public MvcConfig() {
- super();
- }
-
- //
-
- @Override
- public void addViewControllers(final ViewControllerRegistry registry) {
- super.addViewControllers(registry);
- registry.addViewController("/").setViewName("forward:/index");
- registry.addViewController("/index");
- }
-
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/SecurityConfig.java
deleted file mode 100644
index bd6c56d38a..0000000000
--- a/spring-security-client/spring-security-jsp-authentication/src/main/java/org/baeldung/config/SecurityConfig.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.builders.WebSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-
-@Configuration
-@EnableWebSecurity
-public class SecurityConfig extends WebSecurityConfigurerAdapter {
-
- @Override
- protected void configure(final AuthenticationManagerBuilder auth) throws Exception {
- // @formatter:off
- auth.inMemoryAuthentication()
- .withUser("john").password("123").roles("USER")
- .and()
- .withUser("tom").password("111").roles("ADMIN");
- // @formatter:on
- }
-
- @Override
- public void configure(WebSecurity web) throws Exception {
- web.ignoring().antMatchers("/resources/**");
- }
-
- @Override
- protected void configure(final HttpSecurity http) throws Exception {
- // @formatter:off
- http.authorizeRequests()
- .antMatchers("/login").permitAll()
- .antMatchers("/admin").hasRole("ADMIN")
- .anyRequest().authenticated()
- .and().formLogin().permitAll()
- ;
- // @formatter:on
- }
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-authentication/src/main/resources/application.properties b/spring-security-client/spring-security-jsp-authentication/src/main/resources/application.properties
deleted file mode 100644
index 26a80c79f3..0000000000
--- a/spring-security-client/spring-security-jsp-authentication/src/main/resources/application.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-server.port: 8081
-spring.mvc.view.prefix: /WEB-INF/jsp/
-spring.mvc.view.suffix: .jsp
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-authentication/src/main/webapp/WEB-INF/jsp/index.jsp b/spring-security-client/spring-security-jsp-authentication/src/main/webapp/WEB-INF/jsp/index.jsp
deleted file mode 100644
index 90c00e980a..0000000000
--- a/spring-security-client/spring-security-jsp-authentication/src/main/webapp/WEB-INF/jsp/index.jsp
+++ /dev/null
@@ -1,24 +0,0 @@
- <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
-
-
-
-
-Spring Security JSP Authorize
-
-
-
-
-
-
- Current user name:
-
- Current user roles:
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-authentication/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-client/spring-security-jsp-authentication/src/test/java/org/baeldung/SpringContextIntegrationTest.java
deleted file mode 100644
index 66243ef00d..0000000000
--- a/spring-security-client/spring-security-jsp-authentication/src/test/java/org/baeldung/SpringContextIntegrationTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextIntegrationTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-security-client/spring-security-jsp-authentication/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-client/spring-security-jsp-authentication/src/test/java/org/baeldung/SpringContextTest.java
deleted file mode 100644
index 0afb3899db..0000000000
--- a/spring-security-client/spring-security-jsp-authentication/src/test/java/org/baeldung/SpringContextTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-security-client/spring-security-jsp-authorize/pom.xml b/spring-security-client/spring-security-jsp-authorize/pom.xml
deleted file mode 100644
index ad4c9d105b..0000000000
--- a/spring-security-client/spring-security-jsp-authorize/pom.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
- 4.0.0
- com.baeldung
- spring-security-jsp-authorize
- 0.0.1-SNAPSHOT
- spring-security-jsp-authorize
- Spring Security JSP Authorize tag sample
- war
-
-
- parent-boot-1
- com.baeldung
- 0.0.1-SNAPSHOT
- ../../parent-boot-1
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-tomcat
-
-
- org.apache.tomcat.embed
- tomcat-embed-jasper
- provided
-
-
- javax.servlet
- jstl
-
-
- org.springframework.security
- spring-security-taglibs
-
-
-
-
diff --git a/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/Application.java b/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/Application.java
deleted file mode 100644
index c2c5939676..0000000000
--- a/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/Application.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.web.support.SpringBootServletInitializer;
-
-@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
-public class Application extends SpringBootServletInitializer {
-
- @Override
- protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
- return application.sources(Application.class);
- }
-
- public static void main(String[] args) {
- SpringApplication.run(Application.class, args);
- }
-
-}
diff --git a/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/MvcConfig.java b/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/MvcConfig.java
deleted file mode 100644
index fa2a324146..0000000000
--- a/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/MvcConfig.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
-
-@Configuration
-public class MvcConfig extends WebMvcConfigurerAdapter {
-
- public MvcConfig() {
- super();
- }
-
- //
-
- @Override
- public void addViewControllers(final ViewControllerRegistry registry) {
- super.addViewControllers(registry);
- registry.addViewController("/").setViewName("forward:/index");
- registry.addViewController("/index");
- }
-
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/SecurityConfig.java
deleted file mode 100644
index bd6c56d38a..0000000000
--- a/spring-security-client/spring-security-jsp-authorize/src/main/java/org/baeldung/config/SecurityConfig.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.builders.WebSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-
-@Configuration
-@EnableWebSecurity
-public class SecurityConfig extends WebSecurityConfigurerAdapter {
-
- @Override
- protected void configure(final AuthenticationManagerBuilder auth) throws Exception {
- // @formatter:off
- auth.inMemoryAuthentication()
- .withUser("john").password("123").roles("USER")
- .and()
- .withUser("tom").password("111").roles("ADMIN");
- // @formatter:on
- }
-
- @Override
- public void configure(WebSecurity web) throws Exception {
- web.ignoring().antMatchers("/resources/**");
- }
-
- @Override
- protected void configure(final HttpSecurity http) throws Exception {
- // @formatter:off
- http.authorizeRequests()
- .antMatchers("/login").permitAll()
- .antMatchers("/admin").hasRole("ADMIN")
- .anyRequest().authenticated()
- .and().formLogin().permitAll()
- ;
- // @formatter:on
- }
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-authorize/src/main/resources/application.properties b/spring-security-client/spring-security-jsp-authorize/src/main/resources/application.properties
deleted file mode 100644
index 26a80c79f3..0000000000
--- a/spring-security-client/spring-security-jsp-authorize/src/main/resources/application.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-server.port: 8081
-spring.mvc.view.prefix: /WEB-INF/jsp/
-spring.mvc.view.suffix: .jsp
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-authorize/src/main/resources/logback.xml b/spring-security-client/spring-security-jsp-authorize/src/main/resources/logback.xml
deleted file mode 100644
index 7d900d8ea8..0000000000
--- a/spring-security-client/spring-security-jsp-authorize/src/main/resources/logback.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-authorize/src/main/webapp/WEB-INF/jsp/index.jsp b/spring-security-client/spring-security-jsp-authorize/src/main/webapp/WEB-INF/jsp/index.jsp
deleted file mode 100644
index 08af845bd4..0000000000
--- a/spring-security-client/spring-security-jsp-authorize/src/main/webapp/WEB-INF/jsp/index.jsp
+++ /dev/null
@@ -1,33 +0,0 @@
- <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
-
-
-
-
-Spring Security JSP Authorize
-
-
-
-
-
-
-
- Only admins can see this message
-
-
-
- Only users can see this message
-
-
-
-
- Only users who can call "/admin" URL can see this message
-
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-authorize/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-client/spring-security-jsp-authorize/src/test/java/org/baeldung/SpringContextIntegrationTest.java
deleted file mode 100644
index 66243ef00d..0000000000
--- a/spring-security-client/spring-security-jsp-authorize/src/test/java/org/baeldung/SpringContextIntegrationTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextIntegrationTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-security-client/spring-security-jsp-authorize/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-client/spring-security-jsp-authorize/src/test/java/org/baeldung/SpringContextTest.java
deleted file mode 100644
index 0afb3899db..0000000000
--- a/spring-security-client/spring-security-jsp-authorize/src/test/java/org/baeldung/SpringContextTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-security-client/spring-security-jsp-config/pom.xml b/spring-security-client/spring-security-jsp-config/pom.xml
deleted file mode 100644
index 02ea206738..0000000000
--- a/spring-security-client/spring-security-jsp-config/pom.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
- 4.0.0
- com.baeldung
- spring-security-jsp-config
- 0.0.1-SNAPSHOT
- spring-security-jsp-config
- Spring Security JSP configuration
- war
-
-
- parent-boot-1
- com.baeldung
- 0.0.1-SNAPSHOT
- ../../parent-boot-1
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-tomcat
-
-
- org.apache.tomcat.embed
- tomcat-embed-jasper
- provided
-
-
- javax.servlet
- jstl
-
-
- org.springframework.security
- spring-security-taglibs
-
-
-
-
diff --git a/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/Application.java b/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/Application.java
deleted file mode 100644
index c2c5939676..0000000000
--- a/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/Application.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.web.support.SpringBootServletInitializer;
-
-@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
-public class Application extends SpringBootServletInitializer {
-
- @Override
- protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
- return application.sources(Application.class);
- }
-
- public static void main(String[] args) {
- SpringApplication.run(Application.class, args);
- }
-
-}
diff --git a/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/MvcConfig.java b/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/MvcConfig.java
deleted file mode 100644
index fa2a324146..0000000000
--- a/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/MvcConfig.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
-
-@Configuration
-public class MvcConfig extends WebMvcConfigurerAdapter {
-
- public MvcConfig() {
- super();
- }
-
- //
-
- @Override
- public void addViewControllers(final ViewControllerRegistry registry) {
- super.addViewControllers(registry);
- registry.addViewController("/").setViewName("forward:/index");
- registry.addViewController("/index");
- }
-
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/SecurityConfig.java
deleted file mode 100644
index bd6c56d38a..0000000000
--- a/spring-security-client/spring-security-jsp-config/src/main/java/org/baeldung/config/SecurityConfig.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.builders.WebSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-
-@Configuration
-@EnableWebSecurity
-public class SecurityConfig extends WebSecurityConfigurerAdapter {
-
- @Override
- protected void configure(final AuthenticationManagerBuilder auth) throws Exception {
- // @formatter:off
- auth.inMemoryAuthentication()
- .withUser("john").password("123").roles("USER")
- .and()
- .withUser("tom").password("111").roles("ADMIN");
- // @formatter:on
- }
-
- @Override
- public void configure(WebSecurity web) throws Exception {
- web.ignoring().antMatchers("/resources/**");
- }
-
- @Override
- protected void configure(final HttpSecurity http) throws Exception {
- // @formatter:off
- http.authorizeRequests()
- .antMatchers("/login").permitAll()
- .antMatchers("/admin").hasRole("ADMIN")
- .anyRequest().authenticated()
- .and().formLogin().permitAll()
- ;
- // @formatter:on
- }
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-config/src/main/resources/application.properties b/spring-security-client/spring-security-jsp-config/src/main/resources/application.properties
deleted file mode 100644
index 26a80c79f3..0000000000
--- a/spring-security-client/spring-security-jsp-config/src/main/resources/application.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-server.port: 8081
-spring.mvc.view.prefix: /WEB-INF/jsp/
-spring.mvc.view.suffix: .jsp
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-config/src/main/resources/logback.xml b/spring-security-client/spring-security-jsp-config/src/main/resources/logback.xml
deleted file mode 100644
index 7d900d8ea8..0000000000
--- a/spring-security-client/spring-security-jsp-config/src/main/resources/logback.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-config/src/main/webapp/WEB-INF/jsp/index.jsp b/spring-security-client/spring-security-jsp-config/src/main/webapp/WEB-INF/jsp/index.jsp
deleted file mode 100644
index bd5ccb0c78..0000000000
--- a/spring-security-client/spring-security-jsp-config/src/main/webapp/WEB-INF/jsp/index.jsp
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-Spring Security JSP
-
-
-
-
-
-
- Welcome
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-jsp-config/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-client/spring-security-jsp-config/src/test/java/org/baeldung/SpringContextIntegrationTest.java
deleted file mode 100644
index 66243ef00d..0000000000
--- a/spring-security-client/spring-security-jsp-config/src/test/java/org/baeldung/SpringContextIntegrationTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextIntegrationTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-security-client/spring-security-jsp-config/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-client/spring-security-jsp-config/src/test/java/org/baeldung/SpringContextTest.java
deleted file mode 100644
index 0afb3899db..0000000000
--- a/spring-security-client/spring-security-jsp-config/src/test/java/org/baeldung/SpringContextTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-security-client/spring-security-mvc/pom.xml b/spring-security-client/spring-security-mvc/pom.xml
deleted file mode 100644
index 75298026a8..0000000000
--- a/spring-security-client/spring-security-mvc/pom.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
- 4.0.0
- com.baeldung
- spring-security-mvc
- 0.0.1-SNAPSHOT
- spring-security-mvc
- Spring Security MVC
- war
-
-
- parent-boot-1
- com.baeldung
- 0.0.1-SNAPSHOT
- ../../parent-boot-1
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
-
diff --git a/spring-security-client/spring-security-mvc/src/main/java/org/baeldung/config/Application.java b/spring-security-client/spring-security-mvc/src/main/java/org/baeldung/config/Application.java
deleted file mode 100644
index 34c43fbe5a..0000000000
--- a/spring-security-client/spring-security-mvc/src/main/java/org/baeldung/config/Application.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.web.support.SpringBootServletInitializer;
-
-@SpringBootApplication
-public class Application extends SpringBootServletInitializer {
-
- @Override
- protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
- return application.sources(Application.class);
- }
-
- public static void main(String[] args) {
- SpringApplication.run(Application.class, args);
- }
-
-}
diff --git a/spring-security-client/spring-security-mvc/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-client/spring-security-mvc/src/main/java/org/baeldung/config/SecurityConfig.java
deleted file mode 100644
index bd6c56d38a..0000000000
--- a/spring-security-client/spring-security-mvc/src/main/java/org/baeldung/config/SecurityConfig.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.builders.WebSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-
-@Configuration
-@EnableWebSecurity
-public class SecurityConfig extends WebSecurityConfigurerAdapter {
-
- @Override
- protected void configure(final AuthenticationManagerBuilder auth) throws Exception {
- // @formatter:off
- auth.inMemoryAuthentication()
- .withUser("john").password("123").roles("USER")
- .and()
- .withUser("tom").password("111").roles("ADMIN");
- // @formatter:on
- }
-
- @Override
- public void configure(WebSecurity web) throws Exception {
- web.ignoring().antMatchers("/resources/**");
- }
-
- @Override
- protected void configure(final HttpSecurity http) throws Exception {
- // @formatter:off
- http.authorizeRequests()
- .antMatchers("/login").permitAll()
- .antMatchers("/admin").hasRole("ADMIN")
- .anyRequest().authenticated()
- .and().formLogin().permitAll()
- ;
- // @formatter:on
- }
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-mvc/src/main/resources/application.properties b/spring-security-client/spring-security-mvc/src/main/resources/application.properties
deleted file mode 100644
index c2eee0d931..0000000000
--- a/spring-security-client/spring-security-mvc/src/main/resources/application.properties
+++ /dev/null
@@ -1 +0,0 @@
-server.port: 8081
\ No newline at end of file
diff --git a/spring-security-client/spring-security-mvc/src/main/resources/logback.xml b/spring-security-client/spring-security-mvc/src/main/resources/logback.xml
deleted file mode 100644
index 7d900d8ea8..0000000000
--- a/spring-security-client/spring-security-mvc/src/main/resources/logback.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-mvc/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-client/spring-security-mvc/src/test/java/org/baeldung/SpringContextIntegrationTest.java
deleted file mode 100644
index 66243ef00d..0000000000
--- a/spring-security-client/spring-security-mvc/src/test/java/org/baeldung/SpringContextIntegrationTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextIntegrationTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-security-client/spring-security-mvc/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-client/spring-security-mvc/src/test/java/org/baeldung/SpringContextTest.java
deleted file mode 100644
index 0afb3899db..0000000000
--- a/spring-security-client/spring-security-mvc/src/test/java/org/baeldung/SpringContextTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/pom.xml b/spring-security-client/spring-security-thymeleaf-authentication/pom.xml
deleted file mode 100644
index 01d2c6bdbe..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/pom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
- 4.0.0
-
- com.baeldung
- spring-security-thymeleaf-authentication
- 0.0.1-SNAPSHOT
- spring-security-thymeleaf-authentication
- Spring Security thymeleaf authentication tag sample
- war
-
-
- parent-boot-1
- com.baeldung
- 0.0.1-SNAPSHOT
- ../../parent-boot-1
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-tomcat
-
-
- org.springframework.boot
- spring-boot-starter-thymeleaf
-
-
- org.thymeleaf.extras
- thymeleaf-extras-springsecurity4
-
-
-
-
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/Application.java b/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/Application.java
deleted file mode 100644
index 329b104143..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/Application.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.web.support.SpringBootServletInitializer;
-
-@SpringBootApplication
-public class Application extends SpringBootServletInitializer {
-
- public static void main(String[] args) {
- SpringApplication.run(Application.class, args);
- }
-
-}
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/MvcConfig.java b/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/MvcConfig.java
deleted file mode 100644
index 259433f6ae..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/MvcConfig.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
-import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
-import org.springframework.web.servlet.config.annotation.EnableWebMvc;
-import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
-import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
-import org.springframework.context.annotation.Profile;
-
-@Configuration
-@EnableWebMvc
-@Profile("!manual")
-public class MvcConfig extends WebMvcConfigurerAdapter {
-
- public MvcConfig() {
- super();
- }
-
- //
- @Bean
- public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
- return new PropertySourcesPlaceholderConfigurer();
- }
-
- @Override
- public void configureDefaultServletHandling(final DefaultServletHandlerConfigurer configurer) {
- configurer.enable();
- }
-
- @Override
- public void addViewControllers(final ViewControllerRegistry registry) {
- super.addViewControllers(registry);
- registry.addViewController("/").setViewName("forward:/index");
- registry.addViewController("/index");
- }
-
- @Override
- public void addResourceHandlers(final ResourceHandlerRegistry registry) {
- registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
- }
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/MvcConfigManual.java b/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/MvcConfigManual.java
deleted file mode 100644
index d80527c30a..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/MvcConfigManual.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Profile;
-import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
-import org.springframework.web.servlet.config.annotation.EnableWebMvc;
-
-@Configuration
-@EnableWebMvc
-@Profile("manual")
-public class MvcConfigManual extends WebMvcConfigurerAdapter {
-
- @Override
- public void addViewControllers(ViewControllerRegistry registry) {
- registry.addViewController("/home").setViewName("home");
- registry.addViewController("/").setViewName("home");
- registry.addViewController("/hello").setViewName("hello");
- registry.addViewController("/login").setViewName("login");
- }
-
-}
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/RegistrationController.java b/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/RegistrationController.java
deleted file mode 100644
index 2414ff9cac..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/RegistrationController.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package org.baeldung.config;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Profile;
-import org.springframework.security.authentication.AbstractAuthenticationToken;
-import org.springframework.security.authentication.AuthenticationManager;
-import org.springframework.security.authentication.BadCredentialsException;
-import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.security.web.authentication.WebAuthenticationDetails;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Manually authenticate a user using Spring Security / Spring Web MVC' (upon successful account registration)
- * (http://stackoverflow.com/questions/4664893/how-to-manually-set-an-authenticated-user-in-spring-security-springmvc)
- *
- * @author jim clayson
- */
-@Controller
-@Profile("manual")
-public class RegistrationController {
- private static final Logger logger = LoggerFactory.getLogger(RegistrationController.class);
-
- @Autowired
- private AuthenticationManager authenticationManager;
-
- /**
- * For demo purposes this need only be a GET request method
- *
- * @param request
- * @param response
- * @return The view. Page confirming either successful registration (and/or
- * successful authentication) or failed registration.
- */
- @GetMapping("/register")
- public String registerAndAuthenticate(HttpServletRequest request, HttpServletResponse response) {
- logger.debug("registerAndAuthenticate: attempt to register, application should manually authenticate.");
-
- // Mocked values. Potentially could come from an HTML registration form,
- // in which case this mapping would match on an HTTP POST, rather than a GET
- String username = "user";
- String password = "password";
-
- if (requestQualifiesForManualAuthentication()) {
- try {
- authenticate(username, password, request, response);
- logger.debug("registerAndAuthenticate: authentication completed.");
- } catch (BadCredentialsException bce) {
- logger.debug("Authentication failure: bad credentials");
- bce.printStackTrace();
- return "systemError"; // assume a low-level error, since the registration
- // form would have been successfully validated
- }
- }
-
- return "registrationSuccess";
- }
-
- private boolean requestQualifiesForManualAuthentication() {
- // Some processing to determine that the user requires a Spring Security-recognized,
- // application-directed login e.g. successful account registration.
- return true;
- }
-
- private void authenticate(String username, String password, HttpServletRequest request, HttpServletResponse response) throws BadCredentialsException {
- logger.debug("attempting to authenticated, manually ... ");
-
- // create and populate the token
- AbstractAuthenticationToken authToken = new UsernamePasswordAuthenticationToken(username, password);
- authToken.setDetails(new WebAuthenticationDetails(request));
-
- // This call returns an authentication object, which holds principle and user credentials
- Authentication authentication = this.authenticationManager.authenticate(authToken);
-
- // The security context holds the authentication object, and is stored
- // in thread local scope.
- SecurityContextHolder.getContext().setAuthentication(authentication);
-
- logger.debug("User should now be authenticated.");
- }
-
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/SecurityConfig.java
deleted file mode 100644
index 153cc67661..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/SecurityConfig.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.builders.WebSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-import org.springframework.context.annotation.Profile;
-
-@Configuration
-@EnableWebSecurity
-@Profile("!manual")
-public class SecurityConfig extends WebSecurityConfigurerAdapter {
-
- @Override
- protected void configure(final AuthenticationManagerBuilder auth) throws Exception {
- // @formatter:off
- auth.inMemoryAuthentication()
- .withUser("john").password("123").roles("USER")
- .and()
- .withUser("tom").password("111").roles("ADMIN");
- // @formatter:on
- }
-
- @Override
- public void configure(WebSecurity web) throws Exception {
- web.ignoring().antMatchers("/resources/**");
- }
-
- @Override
- protected void configure(final HttpSecurity http) throws Exception {
- // @formatter:off
- http.authorizeRequests()
- .antMatchers("/login").permitAll()
- .antMatchers("/admin").hasRole("ADMIN")
- .anyRequest().authenticated()
- .and().formLogin().permitAll()
- ;
- // @formatter:on
- }
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/WebSecurityConfigManual.java b/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/WebSecurityConfigManual.java
deleted file mode 100644
index 180a53deba..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/java/org/baeldung/config/WebSecurityConfigManual.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Profile;
-import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-
-@Configuration
-@EnableWebSecurity
-@Profile("manual")
-public class WebSecurityConfigManual extends WebSecurityConfigurerAdapter {
-
- @Override
- protected void configure(HttpSecurity http) throws Exception {
- // @formatter:off
- http
- .authorizeRequests()
- .antMatchers("/", "/home", "/register").permitAll()
- .anyRequest().authenticated()
- .and()
- .formLogin()
- .loginPage("/login").permitAll()
- .and()
- .logout().permitAll();
- // @formatter:on
- }
-
- @Autowired
- public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
- auth.inMemoryAuthentication().withUser("user").password("password").roles("USER");
- }
-}
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/application.properties b/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/application.properties
deleted file mode 100644
index bafddced85..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/application.properties
+++ /dev/null
@@ -1 +0,0 @@
-server.port=8081
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/logback.xml b/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/logback.xml
deleted file mode 100644
index 7d900d8ea8..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/logback.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/hello.html b/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/hello.html
deleted file mode 100644
index b37731b0ed..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/hello.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- Hello World!
-
-
- Hello [[${#httpServletRequest.remoteUser}]]!
-
- Click here to go to the home page.
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/home.html b/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/home.html
deleted file mode 100644
index 6dbdf491c6..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/home.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- Spring Security Example
-
-
- Welcome!
-
- Click here to see a greeting.
- Click here to send a dummy registration request, where the application logs you in.
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/index.html b/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/index.html
deleted file mode 100644
index c65b5f092b..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/index.html
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-Spring Security Thymeleaf
-
-
-
-
-
-
- Current user name: Bob
-
- Current user roles: [ROLE_USER, ROLE_ADMIN]
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/login.html b/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/login.html
deleted file mode 100644
index 3f28efac69..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/login.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- Spring Security Example
-
-
-
- Invalid username and password.
-
-
- You have been logged out.
-
-
- Click here to go to the home page.
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/registrationError.html b/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/registrationError.html
deleted file mode 100644
index 756cc2390d..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/registrationError.html
+++ /dev/null
@@ -1 +0,0 @@
-Registration could not be completed at this time. Please try again later or contact support!
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/registrationSuccess.html b/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/registrationSuccess.html
deleted file mode 100644
index b1c4336f2f..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/main/resources/templates/registrationSuccess.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- Registration Success!
-
-
- Registration succeeded. You have been logged in by the system. Welcome [[${#httpServletRequest.remoteUser}]]!
-
- Click here to go to the home page.
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-client/spring-security-thymeleaf-authentication/src/test/java/org/baeldung/SpringContextIntegrationTest.java
deleted file mode 100644
index 66243ef00d..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/test/java/org/baeldung/SpringContextIntegrationTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextIntegrationTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-security-client/spring-security-thymeleaf-authentication/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-client/spring-security-thymeleaf-authentication/src/test/java/org/baeldung/SpringContextTest.java
deleted file mode 100644
index 0afb3899db..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authentication/src/test/java/org/baeldung/SpringContextTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-security-client/spring-security-thymeleaf-authorize/pom.xml b/spring-security-client/spring-security-thymeleaf-authorize/pom.xml
deleted file mode 100644
index 8c600c1f81..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authorize/pom.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
- 4.0.0
-
- com.baeldung
- spring-security-thymeleaf-authorize
- 0.0.1-SNAPSHOT
- spring-security-thymeleaf-authorize
- Spring Security thymeleaf authorize tag sample
- war
-
-
- parent-boot-1
- com.baeldung
- 0.0.1-SNAPSHOT
- ../../parent-boot-1
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-tomcat
-
-
- org.springframework.boot
- spring-boot-starter-thymeleaf
-
-
- org.thymeleaf.extras
- thymeleaf-extras-springsecurity4
-
-
-
-
diff --git a/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/Application.java b/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/Application.java
deleted file mode 100644
index 329b104143..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/Application.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.web.support.SpringBootServletInitializer;
-
-@SpringBootApplication
-public class Application extends SpringBootServletInitializer {
-
- public static void main(String[] args) {
- SpringApplication.run(Application.class, args);
- }
-
-}
diff --git a/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/MvcConfig.java b/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/MvcConfig.java
deleted file mode 100644
index 9ade60e54c..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/MvcConfig.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
-import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
-import org.springframework.web.servlet.config.annotation.EnableWebMvc;
-import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
-import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
-
-@Configuration
-@EnableWebMvc
-public class MvcConfig extends WebMvcConfigurerAdapter {
-
- public MvcConfig() {
- super();
- }
-
- //
- @Bean
- public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
- return new PropertySourcesPlaceholderConfigurer();
- }
-
- @Override
- public void configureDefaultServletHandling(final DefaultServletHandlerConfigurer configurer) {
- configurer.enable();
- }
-
- @Override
- public void addViewControllers(final ViewControllerRegistry registry) {
- super.addViewControllers(registry);
- registry.addViewController("/").setViewName("forward:/index");
- registry.addViewController("/index");
- }
-
- @Override
- public void addResourceHandlers(final ResourceHandlerRegistry registry) {
- registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
- }
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/SecurityConfig.java
deleted file mode 100644
index bd6c56d38a..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authorize/src/main/java/org/baeldung/config/SecurityConfig.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.builders.WebSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-
-@Configuration
-@EnableWebSecurity
-public class SecurityConfig extends WebSecurityConfigurerAdapter {
-
- @Override
- protected void configure(final AuthenticationManagerBuilder auth) throws Exception {
- // @formatter:off
- auth.inMemoryAuthentication()
- .withUser("john").password("123").roles("USER")
- .and()
- .withUser("tom").password("111").roles("ADMIN");
- // @formatter:on
- }
-
- @Override
- public void configure(WebSecurity web) throws Exception {
- web.ignoring().antMatchers("/resources/**");
- }
-
- @Override
- protected void configure(final HttpSecurity http) throws Exception {
- // @formatter:off
- http.authorizeRequests()
- .antMatchers("/login").permitAll()
- .antMatchers("/admin").hasRole("ADMIN")
- .anyRequest().authenticated()
- .and().formLogin().permitAll()
- ;
- // @formatter:on
- }
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/application.properties b/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/application.properties
deleted file mode 100644
index bafddced85..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/application.properties
+++ /dev/null
@@ -1 +0,0 @@
-server.port=8081
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/logback.xml b/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/logback.xml
deleted file mode 100644
index 7d900d8ea8..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/logback.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/templates/index.html b/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/templates/index.html
deleted file mode 100644
index fcbbfb4957..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authorize/src/main/resources/templates/index.html
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-Spring Security Thymeleaf
-
-
-
-
-
-
-
- Only admins can see this message
-
-
-
- Only users can see this message
-
-
-
-
- Only users who can call "/admin" URL can see this message
-
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-authorize/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-client/spring-security-thymeleaf-authorize/src/test/java/org/baeldung/SpringContextIntegrationTest.java
deleted file mode 100644
index 66243ef00d..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authorize/src/test/java/org/baeldung/SpringContextIntegrationTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextIntegrationTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-security-client/spring-security-thymeleaf-authorize/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-client/spring-security-thymeleaf-authorize/src/test/java/org/baeldung/SpringContextTest.java
deleted file mode 100644
index 0afb3899db..0000000000
--- a/spring-security-client/spring-security-thymeleaf-authorize/src/test/java/org/baeldung/SpringContextTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-security-client/spring-security-thymeleaf-config/pom.xml b/spring-security-client/spring-security-thymeleaf-config/pom.xml
deleted file mode 100644
index aeda999405..0000000000
--- a/spring-security-client/spring-security-thymeleaf-config/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
- 4.0.0
- com.baeldung
- spring-security-thymeleaf-config
- 0.0.1-SNAPSHOT
- spring-security-thymeleaf-config
- Spring Security thymeleaf configuration sample project
- war
-
-
- parent-boot-1
- com.baeldung
- 0.0.1-SNAPSHOT
- ../../parent-boot-1
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-tomcat
-
-
- org.springframework.boot
- spring-boot-starter-thymeleaf
-
-
- org.thymeleaf.extras
- thymeleaf-extras-springsecurity4
-
-
-
-
diff --git a/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/Application.java b/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/Application.java
deleted file mode 100644
index 329b104143..0000000000
--- a/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/Application.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.web.support.SpringBootServletInitializer;
-
-@SpringBootApplication
-public class Application extends SpringBootServletInitializer {
-
- public static void main(String[] args) {
- SpringApplication.run(Application.class, args);
- }
-
-}
diff --git a/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/MvcConfig.java b/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/MvcConfig.java
deleted file mode 100644
index 9ade60e54c..0000000000
--- a/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/MvcConfig.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
-import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
-import org.springframework.web.servlet.config.annotation.EnableWebMvc;
-import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
-import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
-
-@Configuration
-@EnableWebMvc
-public class MvcConfig extends WebMvcConfigurerAdapter {
-
- public MvcConfig() {
- super();
- }
-
- //
- @Bean
- public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
- return new PropertySourcesPlaceholderConfigurer();
- }
-
- @Override
- public void configureDefaultServletHandling(final DefaultServletHandlerConfigurer configurer) {
- configurer.enable();
- }
-
- @Override
- public void addViewControllers(final ViewControllerRegistry registry) {
- super.addViewControllers(registry);
- registry.addViewController("/").setViewName("forward:/index");
- registry.addViewController("/index");
- }
-
- @Override
- public void addResourceHandlers(final ResourceHandlerRegistry registry) {
- registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
- }
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/SecurityConfig.java b/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/SecurityConfig.java
deleted file mode 100644
index bd6c56d38a..0000000000
--- a/spring-security-client/spring-security-thymeleaf-config/src/main/java/org/baeldung/config/SecurityConfig.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.baeldung.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.builders.WebSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-
-@Configuration
-@EnableWebSecurity
-public class SecurityConfig extends WebSecurityConfigurerAdapter {
-
- @Override
- protected void configure(final AuthenticationManagerBuilder auth) throws Exception {
- // @formatter:off
- auth.inMemoryAuthentication()
- .withUser("john").password("123").roles("USER")
- .and()
- .withUser("tom").password("111").roles("ADMIN");
- // @formatter:on
- }
-
- @Override
- public void configure(WebSecurity web) throws Exception {
- web.ignoring().antMatchers("/resources/**");
- }
-
- @Override
- protected void configure(final HttpSecurity http) throws Exception {
- // @formatter:off
- http.authorizeRequests()
- .antMatchers("/login").permitAll()
- .antMatchers("/admin").hasRole("ADMIN")
- .anyRequest().authenticated()
- .and().formLogin().permitAll()
- ;
- // @formatter:on
- }
-}
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-config/src/main/resources/application.properties b/spring-security-client/spring-security-thymeleaf-config/src/main/resources/application.properties
deleted file mode 100644
index bafddced85..0000000000
--- a/spring-security-client/spring-security-thymeleaf-config/src/main/resources/application.properties
+++ /dev/null
@@ -1 +0,0 @@
-server.port=8081
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-config/src/main/resources/logback.xml b/spring-security-client/spring-security-thymeleaf-config/src/main/resources/logback.xml
deleted file mode 100644
index 7d900d8ea8..0000000000
--- a/spring-security-client/spring-security-thymeleaf-config/src/main/resources/logback.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-config/src/main/resources/templates/index.html b/spring-security-client/spring-security-thymeleaf-config/src/main/resources/templates/index.html
deleted file mode 100644
index 8e7394ad6a..0000000000
--- a/spring-security-client/spring-security-thymeleaf-config/src/main/resources/templates/index.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-Spring Security Thymeleaf
-
-
-
-
-
-
- Welcome
-
-
-
\ No newline at end of file
diff --git a/spring-security-client/spring-security-thymeleaf-config/src/test/java/org/baeldung/SpringContextIntegrationTest.java b/spring-security-client/spring-security-thymeleaf-config/src/test/java/org/baeldung/SpringContextIntegrationTest.java
deleted file mode 100644
index 66243ef00d..0000000000
--- a/spring-security-client/spring-security-thymeleaf-config/src/test/java/org/baeldung/SpringContextIntegrationTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextIntegrationTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-security-client/spring-security-thymeleaf-config/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-client/spring-security-thymeleaf-config/src/test/java/org/baeldung/SpringContextTest.java
deleted file mode 100644
index 0afb3899db..0000000000
--- a/spring-security-client/spring-security-thymeleaf-config/src/test/java/org/baeldung/SpringContextTest.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.config.Application;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = Application.class)
-public class SpringContextTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/spring-thymeleaf-2/README.md b/spring-thymeleaf-2/README.md
new file mode 100644
index 0000000000..9bd441a6bd
--- /dev/null
+++ b/spring-thymeleaf-2/README.md
@@ -0,0 +1,3 @@
+## Relevant Articles:
+
+- [Working with Enums in Thymeleaf](https://www.baeldung.com/thymeleaf-enums)
diff --git a/spring-userservice/src/test/java/org/baeldung/SpringContextTest.java b/spring-userservice/src/test/java/org/baeldung/SpringContextTest.java
deleted file mode 100644
index 2853a955fa..0000000000
--- a/spring-userservice/src/test/java/org/baeldung/SpringContextTest.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.baeldung;
-
-import org.baeldung.custom.config.MvcConfig;
-import org.baeldung.custom.config.PersistenceDerbyJPAConfig;
-import org.baeldung.custom.config.SecSecurityConfig;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringRunner;
-
-@RunWith(SpringRunner.class)
-@SpringBootTest(classes = { MvcConfig.class, PersistenceDerbyJPAConfig.class, SecSecurityConfig.class })
-public class SpringContextTest {
-
- @Test
- public void whenSpringContextIsBootstrapped_thenNoExceptions() {
- }
-}
diff --git a/testing-modules/easy-random/README.md b/testing-modules/easy-random/README.md
new file mode 100644
index 0000000000..117d636bcc
--- /dev/null
+++ b/testing-modules/easy-random/README.md
@@ -0,0 +1,3 @@
+## Relevant Articles:
+
+- [Quick Guide to EasyRandom in Java](https://www.baeldung.com/java-easy-random)
diff --git a/testing-modules/junit-5-advanced/README.md b/testing-modules/junit-5-advanced/README.md
index 7282a4efad..61a65b2e5a 100644
--- a/testing-modules/junit-5-advanced/README.md
+++ b/testing-modules/junit-5-advanced/README.md
@@ -1,3 +1,4 @@
-### Relevant Articles
+## Relevant Articles:
- [JUnit 5 TestWatcher API](https://www.baeldung.com/junit-testwatcher)
+- [JUnit Custom Display Name Generator API](https://www.baeldung.com/junit-custom-display-name-generator)
diff --git a/testing-modules/spring-testing/README.md b/testing-modules/spring-testing/README.md
index 0970eabeff..1b06c13953 100644
--- a/testing-modules/spring-testing/README.md
+++ b/testing-modules/spring-testing/README.md
@@ -1,8 +1,8 @@
-### Relevant Articles:
+## Relevant Articles:
- [Mockito.mock() vs @Mock vs @MockBean](http://www.baeldung.com/java-spring-mockito-mock-mockbean)
- [A Quick Guide to @TestPropertySource](https://www.baeldung.com/spring-test-property-source)
- [Guide to ReflectionTestUtils for Unit Testing](https://www.baeldung.com/spring-reflection-test-utils)
- [How to Test the @Scheduled Annotation](https://www.baeldung.com/spring-testing-scheduled-annotation)
- [Using SpringJUnit4ClassRunner with Parameterized](https://www.baeldung.com/springjunit4classrunner-parameterized)
-- [Override properties in Spring]()
+- [Override Properties in Spring’s Tests](https://www.baeldung.com/spring-tests-override-properties)
diff --git a/twitter4j/src/test/java/com/baeldung/ApplicationIntegrationTest.java b/twitter4j/src/test/java/com/baeldung/ApplicationLiveTest.java
similarity index 95%
rename from twitter4j/src/test/java/com/baeldung/ApplicationIntegrationTest.java
rename to twitter4j/src/test/java/com/baeldung/ApplicationLiveTest.java
index 4696283faa..0d4114e72d 100644
--- a/twitter4j/src/test/java/com/baeldung/ApplicationIntegrationTest.java
+++ b/twitter4j/src/test/java/com/baeldung/ApplicationLiveTest.java
@@ -9,7 +9,7 @@ import org.junit.Test;
import twitter4j.TwitterException;
-public class ApplicationIntegrationTest {
+public class ApplicationLiveTest {
/**
* In order run this jUnit test you need to configure your API details in the twitter4j.properties
diff --git a/xstream/README.md b/xstream/README.md
index e8302c14ef..bf917e81fb 100644
--- a/xstream/README.md
+++ b/xstream/README.md
@@ -1,4 +1,6 @@
-### Relevant Articles:
+## Relevant Articles:
+
- [XStream User Guide: JSON](http://www.baeldung.com/xstream-json-processing)
- [XStream User Guide: Converting XML to Objects](http://www.baeldung.com/xstream-deserialize-xml-to-object)
- [XStream User Guide: Converting Objects to XML](http://www.baeldung.com/xstream-serialize-object-to-xml)
+- [Remote Code Execution with XStream](https://www.baeldung.com/java-xstream-remote-code-execution)