diff --git a/examples/helloworld-spring-annotations/README.MD b/examples/helloworld-spring-annotations/README.MD
index 63e6780f2e..cec2cf5fef 100644
--- a/examples/helloworld-spring-annotations/README.MD
+++ b/examples/helloworld-spring-annotations/README.MD
@@ -1,4 +1,4 @@
-[//]: # " Copyright (c) 2015, 2020 Oracle and/or its affiliates. All rights reserved. "
+[//]: # " Copyright (c) 2015, 2022 Oracle and/or its affiliates. All rights reserved. "
[//]: # " "
[//]: # " This program and the accompanying materials are made available under the "
[//]: # " terms of the Eclipse Distribution License v. 1.0, which is available at "
@@ -10,7 +10,7 @@ Jersey Spring Integration Spring Helloworld WebApp Example
==========================================================
This example demonstrates how to create simple Jersey application that
-utilises Spring 3 DI features based on Spring annotations, packaged into WAR file.
+utilises Spring 6 DI features based on Spring annotations, packaged into WAR file.
Contents
--------
diff --git a/examples/helloworld-spring-annotations/pom.xml b/examples/helloworld-spring-annotations/pom.xml
index 71a23917c6..26fe299dee 100644
--- a/examples/helloworld-spring-annotations/pom.xml
+++ b/examples/helloworld-spring-annotations/pom.xml
@@ -15,11 +15,19 @@
project
org.glassfish.jersey.examples
- 3.0.0-SNAPSHOT
+ 3.0.99-SNAPSHOT
4.0.0
helloworld-spring-annotations
- Spring 4 Integration Jersey Example
+ Spring 6 Integration Jersey Example
+
+
+
+ Spring Repository
+ spring-repository
+ https://repo.spring.io/milestone
+
+
@@ -32,15 +40,36 @@
org.glassfish.jersey.ext
- jersey-spring5
+ jersey-spring6
${project.version}
+
org.springframework
spring-web
- ${spring5.version}
- compile
+ ${spring6.version}
+
+
+ org.springframework
+ spring-beans
+ ${spring6.version}
+
+
+ org.springframework
+ spring-core
+ ${spring6.version}
+
+ org.springframework
+ spring-context
+ ${spring6.version}
+
+
+ org.springframework
+ spring-aop
+ ${spring6.version}
+
+
commons-logging
commons-logging
@@ -52,9 +81,9 @@
test
- javax.servlet
- javax.servlet-api
- 3.0.1
+ jakarta.servlet
+ jakarta.servlet-api
+ ${servlet5.version}
diff --git a/examples/helloworld-spring-annotations/src/main/java/org/glassfish/jersey/examples/hello/spring/annotations/App.java b/examples/helloworld-spring-annotations/src/main/java/org/glassfish/jersey/examples/hello/spring/annotations/App.java
index 35560347b3..d1451c8765 100644
--- a/examples/helloworld-spring-annotations/src/main/java/org/glassfish/jersey/examples/hello/spring/annotations/App.java
+++ b/examples/helloworld-spring-annotations/src/main/java/org/glassfish/jersey/examples/hello/spring/annotations/App.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
@@ -28,7 +28,7 @@ public class App {
private static final URI BASE_URI = URI.create("http://localhost:8080/base/");
- public static final String ROOT_PATH = "base";
+ public static final String ROOT_PATH = "spring-resource";
public static void main(String[] args) {
try {
diff --git a/examples/helloworld-spring-webapp/pom.xml b/examples/helloworld-spring-webapp/pom.xml
index d4e1eeef9f..7948f93dae 100644
--- a/examples/helloworld-spring-webapp/pom.xml
+++ b/examples/helloworld-spring-webapp/pom.xml
@@ -25,14 +25,22 @@
org.glassfish.jersey.examples
project
- 3.0.0-SNAPSHOT
+ 3.0.99-SNAPSHOT
helloworld-spring-webapp
war
jersey-examples-helloworld-spring-webapp
- Spring 4 Integration Jersey Example
+ Spring 6 Integration Jersey Example
+
+
+
+ Spring Repository
+ spring-repository
+ https://repo.spring.io/milestone
+
+
@@ -43,11 +51,37 @@
org.glassfish.jersey.inject
jersey-hk2
+
org.springframework
spring-web
- ${spring4.version}
- compile
+ ${spring6.version}
+
+
+ org.springframework
+ spring-beans
+ ${spring6.version}
+
+
+ org.springframework
+ spring-core
+ ${spring6.version}
+
+
+ org.springframework
+ spring-context
+ ${spring6.version}
+
+
+ org.springframework
+ spring-aop
+ ${spring6.version}
+
+
+
+ jakarta.servlet
+ jakarta.servlet-api
+ ${servlet5.version}
@@ -64,17 +98,10 @@
org.glassfish.jersey.ext
- jersey-spring4
+ jersey-spring6
${project.version}
-
- org.mortbay.jetty
- servlet-api-2.5
- ${jetty.servlet.api.25.version}
- provided
-
-
junit
junit
@@ -86,8 +113,13 @@
- org.mortbay.jetty
- maven-jetty-plugin
+ org.eclipse.jetty
+ jetty-maven-plugin
+
+
+ /helloworld-spring-webapp
+
+
diff --git a/examples/helloworld-spring-webapp/src/main/java/org/glassfish/jersey/examples/helloworld/spring/CustomExceptionMapper.java b/examples/helloworld-spring-webapp/src/main/java/org/glassfish/jersey/examples/helloworld/spring/CustomExceptionMapper.java
index 4ca8d6c5dd..a0deb27430 100644
--- a/examples/helloworld-spring-webapp/src/main/java/org/glassfish/jersey/examples/helloworld/spring/CustomExceptionMapper.java
+++ b/examples/helloworld-spring-webapp/src/main/java/org/glassfish/jersey/examples/helloworld/spring/CustomExceptionMapper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
@@ -10,8 +10,6 @@
package org.glassfish.jersey.examples.helloworld.spring;
-import org.springframework.stereotype.Component;
-
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.ext.ExceptionMapper;
import jakarta.ws.rs.ext.Provider;
diff --git a/examples/helloworld-spring-webapp/src/main/java/org/glassfish/jersey/examples/helloworld/spring/GreetingServiceImpl.java b/examples/helloworld-spring-webapp/src/main/java/org/glassfish/jersey/examples/helloworld/spring/GreetingServiceImpl.java
index 9b947887a1..652e763dfe 100644
--- a/examples/helloworld-spring-webapp/src/main/java/org/glassfish/jersey/examples/helloworld/spring/GreetingServiceImpl.java
+++ b/examples/helloworld-spring-webapp/src/main/java/org/glassfish/jersey/examples/helloworld/spring/GreetingServiceImpl.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2019 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2022 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
diff --git a/examples/pom.xml b/examples/pom.xml
index 70cf1629ce..7edd695773 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -78,8 +78,6 @@
helloworld-pure-jax-rs
helloworld-webapp
helloworld-weld
-
-
http-patch
http-trace
https-clientserver-grizzly
@@ -279,4 +277,17 @@
+
+
+ jdk17
+
+ [17,)
+
+
+ helloworld-spring-webapp
+ helloworld-spring-annotations
+
+
+
+