Skip to content

Commit

Permalink
[ARIES-2161] update destroy method to be compatible with spring 6
Browse files Browse the repository at this point in the history
  • Loading branch information
f2par0 committed Dec 2, 2024
1 parent 6629195 commit a1c0cd5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
11 changes: 9 additions & 2 deletions blueprint/blueprint-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.2.2.RELEASE</version>
<version>6.1.15</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>4.2.2.RELEASE</version>
<version>6.1.15</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -191,6 +191,13 @@

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<target>1.7</target>
<source>1.7</source>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.aries.versioning</groupId>
<artifactId>org.apache.aries.versioning.plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -231,6 +232,16 @@ public <T> T getBean(Class<T> requiredType, Object... args) throws BeansExceptio
throw new UnsupportedOperationException();
}

@Override
public <T> ObjectProvider<T> getBeanProvider(Class<T> requiredType) {
throw new UnsupportedOperationException();
}

@Override
public <T> ObjectProvider<T> getBeanProvider(ResolvableType requiredType) {
throw new UnsupportedOperationException();
}

@Override
public boolean containsBean(String name) {
return container.getComponentIds().contains(name);
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a1c0cd5

Please sign in to comment.