You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2021/12/21 13:59:35 UTC
[wicket] 01/01: WICKET-6940 Update Spring to 6.0.0-M1
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch upgrade-to-spring-6
in repository https://gitbox.apache.org/repos/asf/wicket.git
commit 3b6c455674c387a79b441f1742b2327cf3d80604
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Tue Dec 21 15:59:03 2021 +0200
WICKET-6940 Update Spring to 6.0.0-M1
Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
pom.xml | 16 +++++++++++++---
.../wicket/spring/SpringWebApplicationFactory.java | 4 ++--
.../injection/annot/AnnotProxyFieldValueFactory.java | 2 +-
.../spring/injection/annot/SpringComponentInjector.java | 4 ++--
.../JakartaInjectAnnotProxyFieldValueFactoryTest.java | 2 +-
5 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/pom.xml b/pom.xml
index 5dec096..4305f2a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -94,6 +94,16 @@
<url>http://git-wip-us.apache.org/repos/asf/wicket/repo?p=wicket.git</url>
<tag>HEAD</tag>
</scm>
+
+ <repositories>
+ <!-- TODO Wicket 10: Use stable release instead of a milestone one -->
+ <repository>
+ <id>repository.spring.milestone</id>
+ <name>Spring Milestone Repository</name>
+ <url>https://repo.spring.io/milestone</url>
+ </repository>
+ </repositories>
+
<modules>
<!-- wicket-eclipse-settings is separate released -->
<module>wicket</module>
@@ -130,8 +140,8 @@
<maven.compiler.optimize>true</maven.compiler.optimize>
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
<maven.compiler.showWarnings>true</maven.compiler.showWarnings>
- <maven.compiler.source>11</maven.compiler.source>
- <maven.compiler.target>11</maven.compiler.target>
+ <maven.compiler.source>17</maven.compiler.source>
+ <maven.compiler.target>17</maven.compiler.target>
<!-- Project Versions -->
<asm.version>9.2</asm.version>
@@ -172,7 +182,7 @@
<objenesis.version>3.2</objenesis.version>
<openjson.version>1.0.12</openjson.version>
<slf4j.version>2.0.0-alpha5</slf4j.version>
- <spring.version>5.3.13</spring.version>
+ <spring.version>6.0.0-M1</spring.version>
<wagon-ssh-external.version>3.4.3</wagon-ssh-external.version>
<weld.version>4.0.2.Final</weld.version>
<velocity-engine-core.version>2.3</velocity-engine-core.version>
diff --git a/wicket-spring/src/main/java/org/apache/wicket/spring/SpringWebApplicationFactory.java b/wicket-spring/src/main/java/org/apache/wicket/spring/SpringWebApplicationFactory.java
index 61e0e36..f5b1476 100644
--- a/wicket-spring/src/main/java/org/apache/wicket/spring/SpringWebApplicationFactory.java
+++ b/wicket-spring/src/main/java/org/apache/wicket/spring/SpringWebApplicationFactory.java
@@ -140,7 +140,7 @@ public class SpringWebApplicationFactory implements IWebApplicationFactory
{
ServletContext servletContext = filter.getFilterConfig().getServletContext();
- WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(new javax.servlet.ServletContext.Impl(servletContext));
+ WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);
if (getContextConfigLocation(filter) != null)
{
@@ -204,7 +204,7 @@ public class SpringWebApplicationFactory implements IWebApplicationFactory
{
webApplicationContext = newApplicationContext();
webApplicationContext.setParent(parent);
- webApplicationContext.setServletContext(new javax.servlet.ServletContext.Impl(filter.getFilterConfig().getServletContext()));
+ webApplicationContext.setServletContext(filter.getFilterConfig().getServletContext());
webApplicationContext.setConfigLocation(getContextConfigLocation(filter));
postProcessWebApplicationContext(webApplicationContext, filter);
diff --git a/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java b/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java
index 57caa9b..14d6f93 100644
--- a/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java
+++ b/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java
@@ -287,7 +287,7 @@ public class AnnotProxyFieldValueFactory implements IFieldValueFactory
msg.append("More than one bean of type [");
msg.append(clazz.getName());
msg.append("] found, you have to specify the name of the bean ");
- msg.append("(@SpringBean(name=\"foo\")) or (@Named(\"foo\") if using @javax.inject classes) in order to resolve this conflict. ");
+ msg.append("(@SpringBean(name=\"foo\")) or (@Named(\"foo\") if using @jakarta.inject classes) in order to resolve this conflict. ");
msg.append("Matched beans: ");
msg.append(Strings.join(",", names));
throw new IllegalStateException(msg.toString());
diff --git a/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/SpringComponentInjector.java b/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/SpringComponentInjector.java
index 02f27d2..7d08c44 100644
--- a/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/SpringComponentInjector.java
+++ b/wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/SpringComponentInjector.java
@@ -69,7 +69,7 @@ public class SpringComponentInjector extends Injector
/**
* Constructor used when spring application context is declared in the spring standard way and
* can be located through
- * {@link WebApplicationContextUtils#getRequiredWebApplicationContext(javax.servlet.ServletContext)}.
+ * {@link WebApplicationContextUtils#getRequiredWebApplicationContext(jakarta.servlet.ServletContext)}.
*
* @param webapp
* wicket web application
@@ -172,7 +172,7 @@ public class SpringComponentInjector extends Injector
ApplicationContext context = webapp.getMetaData(CONTEXT_KEY);
if (context == null)
{
- context = WebApplicationContextUtils.getRequiredWebApplicationContext(new javax.servlet.ServletContext.Impl(webapp.getServletContext()));
+ context = WebApplicationContextUtils.getRequiredWebApplicationContext(webapp.getServletContext());
}
return context;
}
diff --git a/wicket-spring/src/test/java/org/apache/wicket/spring/injection/annot/JakartaInjectAnnotProxyFieldValueFactoryTest.java b/wicket-spring/src/test/java/org/apache/wicket/spring/injection/annot/JakartaInjectAnnotProxyFieldValueFactoryTest.java
index eb4dbdc..b4bf77a 100644
--- a/wicket-spring/src/test/java/org/apache/wicket/spring/injection/annot/JakartaInjectAnnotProxyFieldValueFactoryTest.java
+++ b/wicket-spring/src/test/java/org/apache/wicket/spring/injection/annot/JakartaInjectAnnotProxyFieldValueFactoryTest.java
@@ -25,7 +25,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
/**
- * Tests for Spring injection with {@literal @javax.inject.Inject} annotation
+ * Tests for Spring injection with {@literal @jakarta.inject.Inject} annotation
*/
public class JakartaInjectAnnotProxyFieldValueFactoryTest extends AnnotProxyFieldValueFactoryTest
{