Skip to content

Commit 03bcc28

Browse files
committed
feat: SpringIntegrationAwsSupportNamespaceHandler
1 parent 3824fba commit 03bcc28

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package org.springframework.integration.aws.support.config.xml;
2+
3+
import org.springframework.integration.aws.config.xml.SpringIntegrationAwsNamespaceHandler;
4+
5+
public class SpringIntegrationAwsSupportNamespaceHandler extends SpringIntegrationAwsNamespaceHandler {
6+
7+
SpringIntegrationAwsSupportNamespaceHandler() {
8+
super("META-INF/spring-integration-aws-support-element-parser.mapping");
9+
}
10+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
http\://www.springframework.org/schema/integration/aws=org.springframework.integration.aws.config.xml.SpringIntegrationAwsNamespaceHandler
2-
https\://www.springframework.org/schema/integration/aws=org.springframework.integration.aws.config.xml.SpringIntegrationAwsNamespaceHandler
1+
http\://www.springframework.org/schema/integration/aws=org.springframework.integration.aws.support.config.xml.SpringIntegrationAwsSupportNamespaceHandler
2+
https\://www.springframework.org/schema/integration/aws=org.springframework.integration.aws.support.config.xml.SpringIntegrationAwsSupportNamespaceHandler

int-aws-support/src/test/java/org/springframework/integration/aws/support/config/xml/SpringIntegrationAwsNamespaceHandlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class SpringIntegrationAwsNamespaceHandlerTest {
1919

20-
private final SpringIntegrationAwsNamespaceHandler handler = new SpringIntegrationAwsNamespaceHandler();
20+
private final SpringIntegrationAwsNamespaceHandler handler = new SpringIntegrationAwsSupportNamespaceHandler();
2121

2222
@Test
2323
void test() {

int-aws/src/main/java/org/springframework/integration/aws/config/xml/SpringIntegrationAwsNamespaceHandler.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,22 @@
1111

1212
public class SpringIntegrationAwsNamespaceHandler extends NamespaceHandlerSupport {
1313

14+
private final String mappingOverride;
15+
16+
SpringIntegrationAwsNamespaceHandler() {
17+
this("META-INF/spring-integration-aws-element-parser.mapping");
18+
}
19+
20+
public SpringIntegrationAwsNamespaceHandler(String mappingOverrides) {
21+
this.mappingOverride = mappingOverrides;
22+
}
23+
1424
@Override
1525
public void init() {
1626
var mapping = new Properties();
1727
try (var defaults = getClass().getResourceAsStream("element-parser.mapping")) {
1828
mapping.load(defaults);
19-
mapping.putAll(PropertiesLoaderUtils.loadAllProperties("META-INF/spring-integration-aws-element-parser.mapping"));
29+
mapping.putAll(PropertiesLoaderUtils.loadAllProperties(mappingOverride));
2030
} catch (IOException e) {
2131
throw new UncheckedIOException("Error load spring-integration-aws element-parser mapping", e);
2232
}

0 commit comments

Comments
 (0)