From 9d27aa25a4b9e468a0c256f8092387ff81805de2 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Wed, 7 Feb 2018 15:05:58 -0500 Subject: [PATCH] Upgrade to SWF 2.5 snapshots booking-mvc does not work yet due to the lack of Spring Framework 5 based Thymeleaf deps. Issue: SWF-1717 --- booking-faces/pom.xml | 24 ++++---- .../booking/config/SecurityConfig.java | 13 ++-- booking-faces/src/main/resources/log4j2.xml | 14 +++++ booking-faces/src/main/resources/logback.xml | 20 ------- booking-mvc/pom.xml | 35 ++++++----- .../booking/config/SecurityConfig.java | 10 ++-- booking-mvc/src/main/resources/log4j2.xml | 14 +++++ booking-mvc/src/main/resources/logback.xml | 20 ------- pom.xml | 21 ++++--- primefaces-showcase/pom.xml | 24 ++++---- .../src/main/resources/log4j2.xml | 14 +++++ .../src/main/resources/logback.xml | 20 ------- .../webapp/WEB-INF/spring/security-config.xml | 54 ++++++----------- webflow-showcase/pom.xml | 60 +++++-------------- .../src/main/resources/log4j2.xml | 14 +++++ .../src/main/resources/logback.xml | 24 -------- .../main/webapp/WEB-INF/layouts/standard.jsp | 1 - .../spring/{appServlet => }/controllers.xml | 0 .../webapp/WEB-INF/spring/root-context.xml | 9 --- .../webapp/WEB-INF/spring/security-config.xml | 35 ----------- .../{appServlet => }/servlet-context.xml | 6 +- .../spring/{appServlet => }/webflow.xml | 11 +--- .../src/main/webapp/WEB-INF/web.xml | 43 +------------ 23 files changed, 164 insertions(+), 322 deletions(-) create mode 100644 booking-faces/src/main/resources/log4j2.xml delete mode 100644 booking-faces/src/main/resources/logback.xml create mode 100644 booking-mvc/src/main/resources/log4j2.xml delete mode 100644 booking-mvc/src/main/resources/logback.xml create mode 100644 primefaces-showcase/src/main/resources/log4j2.xml delete mode 100644 primefaces-showcase/src/main/resources/logback.xml create mode 100644 webflow-showcase/src/main/resources/log4j2.xml delete mode 100644 webflow-showcase/src/main/resources/logback.xml rename webflow-showcase/src/main/webapp/WEB-INF/spring/{appServlet => }/controllers.xml (100%) delete mode 100644 webflow-showcase/src/main/webapp/WEB-INF/spring/root-context.xml delete mode 100644 webflow-showcase/src/main/webapp/WEB-INF/spring/security-config.xml rename webflow-showcase/src/main/webapp/WEB-INF/spring/{appServlet => }/servlet-context.xml (93%) rename webflow-showcase/src/main/webapp/WEB-INF/spring/{appServlet => }/webflow.xml (80%) diff --git a/booking-faces/pom.xml b/booking-faces/pom.xml index f0c4b4b..09d6e82 100644 --- a/booking-faces/pom.xml +++ b/booking-faces/pom.xml @@ -104,24 +104,24 @@ - org.slf4j - slf4j-api - ${slf4j.version} + org.apache.logging.log4j + log4j-api + ${log4j.version} - org.slf4j - jcl-over-slf4j - ${slf4j.version} + org.apache.logging.log4j + log4j-core + ${log4j.version} - org.slf4j - jul-to-slf4j - ${slf4j.version} + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} - ch.qos.logback - logback-classic - 1.2.3 + org.apache.logging.log4j + log4j-jul + ${log4j.version} diff --git a/booking-faces/src/main/java/org/springframework/webflow/samples/booking/config/SecurityConfig.java b/booking-faces/src/main/java/org/springframework/webflow/samples/booking/config/SecurityConfig.java index 8898767..30aed80 100644 --- a/booking-faces/src/main/java/org/springframework/webflow/samples/booking/config/SecurityConfig.java +++ b/booking-faces/src/main/java/org/springframework/webflow/samples/booking/config/SecurityConfig.java @@ -1,11 +1,11 @@ package org.springframework.webflow.samples.booking.config; import org.springframework.context.annotation.Configuration; -import org.springframework.security.authentication.encoding.Md5PasswordEncoder; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.crypto.password.MessageDigestPasswordEncoder; import org.springframework.security.web.savedrequest.HttpSessionRequestCache; @Configuration @@ -33,17 +33,16 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { .csrf().disable() .requestCache() .requestCache(new HttpSessionRequestCache()); - } @Override + @SuppressWarnings("deprecation") protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.inMemoryAuthentication() - .passwordEncoder(new Md5PasswordEncoder()) - .withUser("keith").password("417c7382b16c395bc25b5da1398cf076").roles("USER", "SUPERVISOR").and() - .withUser("erwin").password("12430911a8af075c6f41c6976af22b09").roles("USER", "SUPERVISOR").and() - .withUser("jeremy").password("57c6cbff0d421449be820763f03139eb").roles("USER").and() - .withUser("scott").password("942f2339bf50796de535a384f0d1af3e").roles("USER"); + .withUser("keith").password("{MD5}417c7382b16c395bc25b5da1398cf076").roles("USER", "SUPERVISOR").and() + .withUser("erwin").password("{MD5}12430911a8af075c6f41c6976af22b09").roles("USER", "SUPERVISOR").and() + .withUser("jeremy").password("{MD5}57c6cbff0d421449be820763f03139eb").roles("USER").and() + .withUser("scott").password("{MD5}942f2339bf50796de535a384f0d1af3e").roles("USER"); } } diff --git a/booking-faces/src/main/resources/log4j2.xml b/booking-faces/src/main/resources/log4j2.xml new file mode 100644 index 0000000..f495463 --- /dev/null +++ b/booking-faces/src/main/resources/log4j2.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/booking-faces/src/main/resources/logback.xml b/booking-faces/src/main/resources/logback.xml deleted file mode 100644 index 1202bc6..0000000 --- a/booking-faces/src/main/resources/logback.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - - - - \ No newline at end of file diff --git a/booking-mvc/pom.xml b/booking-mvc/pom.xml index a762437..5c4e55c 100644 --- a/booking-mvc/pom.xml +++ b/booking-mvc/pom.xml @@ -35,7 +35,7 @@ org.springframework.webflow - spring-js + spring-js-resources ${webflow.version} @@ -101,27 +101,27 @@ org.apache.tiles tiles-core - 2.2.2 + ${tiles.version} org.apache.tiles tiles-api - 2.2.2 + ${tiles.version} org.apache.tiles tiles-template - 2.2.2 + ${tiles.version} org.apache.tiles tiles-servlet - 2.2.2 + ${tiles.version} org.apache.tiles tiles-jsp - 2.2.2 + ${tiles.version} @@ -161,19 +161,24 @@ - org.slf4j - slf4j-api - ${slf4j.version} + org.apache.logging.log4j + log4j-api + ${log4j.version} - org.slf4j - jcl-over-slf4j - ${slf4j.version} + org.apache.logging.log4j + log4j-core + ${log4j.version} - ch.qos.logback - logback-classic - ${logback.version} + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} + + + org.apache.logging.log4j + log4j-jul + ${log4j.version} diff --git a/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/config/SecurityConfig.java b/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/config/SecurityConfig.java index a359a85..c31f82b 100644 --- a/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/config/SecurityConfig.java +++ b/booking-mvc/src/main/java/org/springframework/webflow/samples/booking/config/SecurityConfig.java @@ -1,7 +1,6 @@ package org.springframework.webflow.samples.booking.config; import org.springframework.context.annotation.Configuration; -import org.springframework.security.authentication.encoding.Md5PasswordEncoder; 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; @@ -28,11 +27,10 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.inMemoryAuthentication() - .passwordEncoder(new Md5PasswordEncoder()) - .withUser("keith").password("417c7382b16c395bc25b5da1398cf076").roles("USER", "SUPERVISOR").and() - .withUser("erwin").password("12430911a8af075c6f41c6976af22b09").roles("USER", "SUPERVISOR").and() - .withUser("jeremy").password("57c6cbff0d421449be820763f03139eb").roles("USER").and() - .withUser("scott").password("942f2339bf50796de535a384f0d1af3e").roles("USER"); + .withUser("keith").password("{MD5}417c7382b16c395bc25b5da1398cf076").roles("USER", "SUPERVISOR").and() + .withUser("erwin").password("{MD5}12430911a8af075c6f41c6976af22b09").roles("USER", "SUPERVISOR").and() + .withUser("jeremy").password("{MD5}57c6cbff0d421449be820763f03139eb").roles("USER").and() + .withUser("scott").password("{MD5}942f2339bf50796de535a384f0d1af3e").roles("USER"); } } diff --git a/booking-mvc/src/main/resources/log4j2.xml b/booking-mvc/src/main/resources/log4j2.xml new file mode 100644 index 0000000..f495463 --- /dev/null +++ b/booking-mvc/src/main/resources/log4j2.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/booking-mvc/src/main/resources/logback.xml b/booking-mvc/src/main/resources/logback.xml deleted file mode 100644 index 1202bc6..0000000 --- a/booking-mvc/src/main/resources/logback.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index 228d5c6..5bd0d02 100644 --- a/pom.xml +++ b/pom.xml @@ -18,19 +18,19 @@ 3.4 2.4.0 - 3.6.9.Final - 4.3.2.Final + 5.2.12.Final + 6.0.7.Final 2.2.3 9.4.8.v20171121 4.12 - 1.2.3 + 2.10.0 2.2.16 2.2.12 6.1 - 3.0.1 - 1.7.25 - 4.2.4.RELEASE - 2.4.7.RELEASE + 3.1.0 + 5.0.1.RELEASE + 3.0.8 + 2.5.0.BUILD-SNAPSHOT @@ -38,10 +38,15 @@ org.springframework spring-framework-bom - 4.3.13.RELEASE + 5.0.3.RELEASE pom import + + org.slf4j + slf4j-api + 1.7.25 + diff --git a/primefaces-showcase/pom.xml b/primefaces-showcase/pom.xml index db12f97..9dbee5a 100644 --- a/primefaces-showcase/pom.xml +++ b/primefaces-showcase/pom.xml @@ -101,24 +101,24 @@ - org.slf4j - slf4j-api - ${slf4j.version} + org.apache.logging.log4j + log4j-api + ${log4j.version} - org.slf4j - jcl-over-slf4j - ${slf4j.version} + org.apache.logging.log4j + log4j-core + ${log4j.version} - org.slf4j - jul-to-slf4j - ${slf4j.version} + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} - ch.qos.logback - logback-classic - ${logback.version} + org.apache.logging.log4j + log4j-jul + ${log4j.version} diff --git a/primefaces-showcase/src/main/resources/log4j2.xml b/primefaces-showcase/src/main/resources/log4j2.xml new file mode 100644 index 0000000..f495463 --- /dev/null +++ b/primefaces-showcase/src/main/resources/log4j2.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/primefaces-showcase/src/main/resources/logback.xml b/primefaces-showcase/src/main/resources/logback.xml deleted file mode 100644 index 1202bc6..0000000 --- a/primefaces-showcase/src/main/resources/logback.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - - - - \ No newline at end of file diff --git a/primefaces-showcase/src/main/webapp/WEB-INF/spring/security-config.xml b/primefaces-showcase/src/main/webapp/WEB-INF/spring/security-config.xml index 3048456..a359a72 100644 --- a/primefaces-showcase/src/main/webapp/WEB-INF/spring/security-config.xml +++ b/primefaces-showcase/src/main/webapp/WEB-INF/spring/security-config.xml @@ -1,42 +1,22 @@ - + - - - + - - - - - + + + + + - - - - - - - - - - + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/webflow-showcase/pom.xml b/webflow-showcase/pom.xml index 1239a4c..fce2aa7 100644 --- a/webflow-showcase/pom.xml +++ b/webflow-showcase/pom.xml @@ -35,42 +35,9 @@ org.springframework.webflow - spring-js + spring-js-resources ${webflow.version} - - org.springframework.security - spring-security-web - ${spring-security.version} - - - org.springframework - spring-aop - - - - - org.springframework.security - spring-security-taglibs - ${spring-security.version} - - - org.springframework - spring-aop - - - - - org.springframework.security - spring-security-config - ${spring-security.version} - - - org.springframework - spring-aop - - - javax.servlet @@ -93,7 +60,7 @@ org.apache.tiles tiles-jsp - 2.2.2 + ${tiles.version} @@ -103,19 +70,24 @@ - org.slf4j - slf4j-api - ${slf4j.version} + org.apache.logging.log4j + log4j-api + ${log4j.version} - org.slf4j - jcl-over-slf4j - ${slf4j.version} + org.apache.logging.log4j + log4j-core + ${log4j.version} - ch.qos.logback - logback-classic - ${logback.version} + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} + + + org.apache.logging.log4j + log4j-jul + ${log4j.version} diff --git a/webflow-showcase/src/main/resources/log4j2.xml b/webflow-showcase/src/main/resources/log4j2.xml new file mode 100644 index 0000000..956373e --- /dev/null +++ b/webflow-showcase/src/main/resources/log4j2.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/webflow-showcase/src/main/resources/logback.xml b/webflow-showcase/src/main/resources/logback.xml deleted file mode 100644 index 799e50e..0000000 --- a/webflow-showcase/src/main/resources/logback.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/webflow-showcase/src/main/webapp/WEB-INF/layouts/standard.jsp b/webflow-showcase/src/main/webapp/WEB-INF/layouts/standard.jsp index 4601210..9db1b88 100644 --- a/webflow-showcase/src/main/webapp/WEB-INF/layouts/standard.jsp +++ b/webflow-showcase/src/main/webapp/WEB-INF/layouts/standard.jsp @@ -1,6 +1,5 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %> -<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> diff --git a/webflow-showcase/src/main/webapp/WEB-INF/spring/appServlet/controllers.xml b/webflow-showcase/src/main/webapp/WEB-INF/spring/controllers.xml similarity index 100% rename from webflow-showcase/src/main/webapp/WEB-INF/spring/appServlet/controllers.xml rename to webflow-showcase/src/main/webapp/WEB-INF/spring/controllers.xml diff --git a/webflow-showcase/src/main/webapp/WEB-INF/spring/root-context.xml b/webflow-showcase/src/main/webapp/WEB-INF/spring/root-context.xml deleted file mode 100644 index 486e22d..0000000 --- a/webflow-showcase/src/main/webapp/WEB-INF/spring/root-context.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/webflow-showcase/src/main/webapp/WEB-INF/spring/security-config.xml b/webflow-showcase/src/main/webapp/WEB-INF/spring/security-config.xml deleted file mode 100644 index 8dc75ec..0000000 --- a/webflow-showcase/src/main/webapp/WEB-INF/spring/security-config.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/webflow-showcase/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml b/webflow-showcase/src/main/webapp/WEB-INF/spring/servlet-context.xml similarity index 93% rename from webflow-showcase/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml rename to webflow-showcase/src/main/webapp/WEB-INF/spring/servlet-context.xml index b7c8452..e59e9e1 100644 --- a/webflow-showcase/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml +++ b/webflow-showcase/src/main/webapp/WEB-INF/spring/servlet-context.xml @@ -33,12 +33,12 @@ - - + + - + /WEB-INF/**/views.xml diff --git a/webflow-showcase/src/main/webapp/WEB-INF/spring/appServlet/webflow.xml b/webflow-showcase/src/main/webapp/WEB-INF/spring/webflow.xml similarity index 80% rename from webflow-showcase/src/main/webapp/WEB-INF/spring/appServlet/webflow.xml rename to webflow-showcase/src/main/webapp/WEB-INF/spring/webflow.xml index ac8d281..8588f3f 100644 --- a/webflow-showcase/src/main/webapp/WEB-INF/spring/appServlet/webflow.xml +++ b/webflow-showcase/src/main/webapp/WEB-INF/spring/webflow.xml @@ -9,12 +9,8 @@ http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.4.xsd"> - - - - - - + + @@ -33,7 +29,4 @@ - - - diff --git a/webflow-showcase/src/main/webapp/WEB-INF/web.xml b/webflow-showcase/src/main/webapp/WEB-INF/web.xml index 15f8c88..e80260c 100755 --- a/webflow-showcase/src/main/webapp/WEB-INF/web.xml +++ b/webflow-showcase/src/main/webapp/WEB-INF/web.xml @@ -3,55 +3,18 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> - - - contextConfigLocation - - /WEB-INF/spring/root-context.xml - - - - - - org.springframework.web.context.ContextLoaderListener - - - - - httpMethodFilter - org.springframework.web.filter.HiddenHttpMethodFilter - - - - httpMethodFilter - Spring MVC Dispatcher Servlet - - - - - springSecurityFilterChain - org.springframework.web.filter.DelegatingFilterProxy - - - - springSecurityFilterChain - Spring MVC Dispatcher Servlet - - - - Spring MVC Dispatcher Servlet + DispatcherServlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation - /WEB-INF/spring/appServlet/servlet-context.xml + /WEB-INF/spring/servlet-context.xml 1 - - Spring MVC Dispatcher Servlet + DispatcherServlet /