From a1c0cd5c1482c8fb0bf2cb09b4244b60af4930c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20de=20Parscau?=
<116000379+f2par0@users.noreply.github.com>
Date: Mon, 2 Dec 2024 13:59:16 +0100
Subject: [PATCH 1/2] [ARIES-2161] update destroy method to be compatible with
spring 6
---
blueprint/blueprint-spring/pom.xml | 11 +++++++++--
.../blueprint/spring/BlueprintBeanFactory.java | 16 ++++++++++++++++
.../spring/BlueprintNamespaceHandler.java | 2 +-
3 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/blueprint/blueprint-spring/pom.xml b/blueprint/blueprint-spring/pom.xml
index 7ce6dcabd9..d4333d9915 100644
--- a/blueprint/blueprint-spring/pom.xml
+++ b/blueprint/blueprint-spring/pom.xml
@@ -119,13 +119,13 @@
org.springframework
spring-context
- 4.2.2.RELEASE
+ 6.1.15
provided
org.springframework
spring-beans
- 4.2.2.RELEASE
+ 6.1.15
provided
@@ -191,6 +191,13 @@
+
+ maven-compiler-plugin
+
+ 1.7
+
+
+
org.apache.aries.versioning
org.apache.aries.versioning.plugin
diff --git a/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintBeanFactory.java b/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintBeanFactory.java
index 922e182999..aed999ace9 100644
--- a/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintBeanFactory.java
+++ b/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintBeanFactory.java
@@ -37,6 +37,7 @@
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanNotOfRequiredTypeException;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
+import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.core.ResolvableType;
@@ -231,6 +232,16 @@ public T getBean(Class requiredType, Object... args) throws BeansExceptio
throw new UnsupportedOperationException();
}
+ @Override
+ public ObjectProvider getBeanProvider(Class requiredType) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public ObjectProvider getBeanProvider(ResolvableType requiredType) {
+ throw new UnsupportedOperationException();
+ }
+
@Override
public boolean containsBean(String name) {
return container.getComponentIds().contains(name);
@@ -261,6 +272,11 @@ public Class> getType(String name) throws NoSuchBeanDefinitionException {
throw new UnsupportedOperationException();
}
+ @Override
+ public Class> getType(String name, boolean allowFactoryBeanInit) throws NoSuchBeanDefinitionException {
+ throw new UnsupportedOperationException();
+ }
+
@Override
public String[] getAliases(String name) {
throw new UnsupportedOperationException();
diff --git a/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintNamespaceHandler.java b/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintNamespaceHandler.java
index deee304e19..2547c5307c 100644
--- a/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintNamespaceHandler.java
+++ b/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/BlueprintNamespaceHandler.java
@@ -147,7 +147,7 @@ private org.springframework.beans.factory.xml.ParserContext getOrCreateParserCon
if (applicationContext == null) {
applicationContext = new SpringApplicationContext(container);
registry.registerComponentDefinition(createPassThrough(parserContext,
- SPRING_APPLICATION_CONTEXT_ID, applicationContext, "destroy"
+ SPRING_APPLICATION_CONTEXT_ID, applicationContext, "close"
));
}
// Create registry
From ceeba8f5e37000aeaf3cdb7d0b62c42b9d5fdbcd Mon Sep 17 00:00:00 2001
From: Francois de Parscau
Date: Mon, 2 Dec 2024 23:37:36 +0100
Subject: [PATCH 2/2] [ARIES-2161] change spring version to support java 8
---
blueprint/blueprint-spring/pom.xml | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/blueprint/blueprint-spring/pom.xml b/blueprint/blueprint-spring/pom.xml
index d4333d9915..8a3f2e09b6 100644
--- a/blueprint/blueprint-spring/pom.xml
+++ b/blueprint/blueprint-spring/pom.xml
@@ -64,6 +64,7 @@
+ 5.3.39
@@ -119,13 +120,13 @@
org.springframework
spring-context
- 6.1.15
+ ${spring.version}
provided
org.springframework
spring-beans
- 6.1.15
+ ${spring.version}
provided
@@ -178,13 +179,13 @@
org.springframework
spring-tx
- 4.2.2.RELEASE
+ ${spring.version}
test
org.springframework
spring-aop
- 4.2.2.RELEASE
+ ${spring.version}
test
@@ -194,8 +195,8 @@
maven-compiler-plugin
- 1.7
-
+ 1.8
+