Merge branch '5.3.x'
This commit is contained in:
commit
7a2c9b80c2
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2018 the original author or authors.
|
* Copyright 2002-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
package org.springframework.beans.factory.support;
|
package org.springframework.beans.factory.support;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.beans.BeanMetadataElement;
|
import org.springframework.beans.BeanMetadataElement;
|
||||||
|
@ -53,6 +54,20 @@ public class ManagedList<E> extends ArrayList<E> implements Mergeable, BeanMetad
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a new instance containing an arbitrary number of elements.
|
||||||
|
* @param elements the elements to be contained in the list
|
||||||
|
* @param <E> the {@code List}'s element type
|
||||||
|
* @return a {@code List} containing the specified elements
|
||||||
|
* @since 5.3.16
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public static <E> ManagedList<E> of(E... elements) {
|
||||||
|
ManagedList<E> list = new ManagedList<>();
|
||||||
|
list.addAll(Arrays.asList(elements));
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the configuration source {@code Object} for this metadata element.
|
* Set the configuration source {@code Object} for this metadata element.
|
||||||
* <p>The exact type of the object will depend on the configuration mechanism used.
|
* <p>The exact type of the object will depend on the configuration mechanism used.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2018 the original author or authors.
|
* Copyright 2002-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -18,6 +18,7 @@ package org.springframework.beans.factory.support;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import org.springframework.beans.BeanMetadataElement;
|
import org.springframework.beans.BeanMetadataElement;
|
||||||
import org.springframework.beans.Mergeable;
|
import org.springframework.beans.Mergeable;
|
||||||
|
@ -56,6 +57,25 @@ public class ManagedMap<K, V> extends LinkedHashMap<K, V> implements Mergeable,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a new instance containing keys and values extracted from the
|
||||||
|
* given entries. The entries themselves are not stored in the map.
|
||||||
|
* @param entries {@code Map.Entry}s containing the keys and values
|
||||||
|
* from which the map is populated
|
||||||
|
* @param <K> the {@code Map}'s key type
|
||||||
|
* @param <V> the {@code Map}'s value type
|
||||||
|
* @return a {@code Map} containing the specified mappings
|
||||||
|
* @since 5.3.16
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public static <K,V> ManagedMap<K,V> ofEntries(Entry<? extends K, ? extends V>... entries) {
|
||||||
|
ManagedMap<K,V > map = new ManagedMap<>();
|
||||||
|
for (Entry<? extends K, ? extends V> entry : entries) {
|
||||||
|
map.put(entry.getKey(), entry.getValue());
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the configuration source {@code Object} for this metadata element.
|
* Set the configuration source {@code Object} for this metadata element.
|
||||||
* <p>The exact type of the object will depend on the configuration mechanism used.
|
* <p>The exact type of the object will depend on the configuration mechanism used.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2018 the original author or authors.
|
* Copyright 2002-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package org.springframework.beans.factory.support;
|
package org.springframework.beans.factory.support;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
@ -52,6 +53,20 @@ public class ManagedSet<E> extends LinkedHashSet<E> implements Mergeable, BeanMe
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a new instance containing an arbitrary number of elements.
|
||||||
|
* @param elements the elements to be contained in the set
|
||||||
|
* @param <E> the {@code Set}'s element type
|
||||||
|
* @return a {@code Set} containing the specified elements
|
||||||
|
* @since 5.3.16
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public static <E> ManagedSet<E> of(E... elements) {
|
||||||
|
ManagedSet<E> set = new ManagedSet<>();
|
||||||
|
set.addAll(Arrays.asList(elements));
|
||||||
|
return set;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the configuration source {@code Object} for this metadata element.
|
* Set the configuration source {@code Object} for this metadata element.
|
||||||
* <p>The exact type of the object will depend on the configuration mechanism used.
|
* <p>The exact type of the object will depend on the configuration mechanism used.
|
||||||
|
|
|
@ -2302,9 +2302,7 @@ class DefaultListableBeanFactoryTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void prototypeWithArrayConversionForConstructor() {
|
void prototypeWithArrayConversionForConstructor() {
|
||||||
List<String> list = new ManagedList<>();
|
List<String> list = ManagedList.of("myName", "myBeanName");
|
||||||
list.add("myName");
|
|
||||||
list.add("myBeanName");
|
|
||||||
RootBeanDefinition bd = new RootBeanDefinition(DerivedTestBean.class);
|
RootBeanDefinition bd = new RootBeanDefinition(DerivedTestBean.class);
|
||||||
bd.setScope(BeanDefinition.SCOPE_PROTOTYPE);
|
bd.setScope(BeanDefinition.SCOPE_PROTOTYPE);
|
||||||
bd.getConstructorArgumentValues().addGenericArgumentValue(list);
|
bd.getConstructorArgumentValues().addGenericArgumentValue(list);
|
||||||
|
@ -2320,9 +2318,7 @@ class DefaultListableBeanFactoryTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void prototypeWithArrayConversionForFactoryMethod() {
|
void prototypeWithArrayConversionForFactoryMethod() {
|
||||||
List<String> list = new ManagedList<>();
|
List<String> list = ManagedList.of("myName", "myBeanName");
|
||||||
list.add("myName");
|
|
||||||
list.add("myBeanName");
|
|
||||||
RootBeanDefinition bd = new RootBeanDefinition(DerivedTestBean.class);
|
RootBeanDefinition bd = new RootBeanDefinition(DerivedTestBean.class);
|
||||||
bd.setScope(BeanDefinition.SCOPE_PROTOTYPE);
|
bd.setScope(BeanDefinition.SCOPE_PROTOTYPE);
|
||||||
bd.setFactoryMethodName("create");
|
bd.setFactoryMethodName("create");
|
||||||
|
|
|
@ -357,22 +357,18 @@ public class PropertyResourceConfigurerTests {
|
||||||
MutablePropertyValues pvs = new MutablePropertyValues();
|
MutablePropertyValues pvs = new MutablePropertyValues();
|
||||||
pvs.add("stringArray", new String[] {"${os.name}", "${age}"});
|
pvs.add("stringArray", new String[] {"${os.name}", "${age}"});
|
||||||
|
|
||||||
List<Object> friends = new ManagedList<>();
|
List<Object> friends = ManagedList.of("na${age}me", new RuntimeBeanReference("${ref}"));
|
||||||
friends.add("na${age}me");
|
|
||||||
friends.add(new RuntimeBeanReference("${ref}"));
|
|
||||||
pvs.add("friends", friends);
|
pvs.add("friends", friends);
|
||||||
|
|
||||||
Set<Object> someSet = new ManagedSet<>();
|
Set<Object> someSet = ManagedSet.of("na${age}me",
|
||||||
someSet.add("na${age}me");
|
new RuntimeBeanReference("${ref}"), new TypedStringValue("${age}", Integer.class));
|
||||||
someSet.add(new RuntimeBeanReference("${ref}"));
|
|
||||||
someSet.add(new TypedStringValue("${age}", Integer.class));
|
|
||||||
pvs.add("someSet", someSet);
|
pvs.add("someSet", someSet);
|
||||||
|
|
||||||
Map<Object, Object> someMap = new ManagedMap<>();
|
Map<Object, Object> someMap = ManagedMap.ofEntries(
|
||||||
someMap.put(new TypedStringValue("key${age}"), new TypedStringValue("${age}"));
|
Map.entry(new TypedStringValue("key${age}"), new TypedStringValue("${age}")),
|
||||||
someMap.put(new TypedStringValue("key${age}ref"), new RuntimeBeanReference("${ref}"));
|
Map.entry(new TypedStringValue("key${age}ref"), new RuntimeBeanReference("${ref}")),
|
||||||
someMap.put("key1", new RuntimeBeanReference("${ref}"));
|
Map.entry("key1", new RuntimeBeanReference("${ref}")),
|
||||||
someMap.put("key2", "${age}name");
|
Map.entry("key2", "${age}name"));
|
||||||
MutablePropertyValues innerPvs = new MutablePropertyValues();
|
MutablePropertyValues innerPvs = new MutablePropertyValues();
|
||||||
innerPvs.add("country", "${os.name}");
|
innerPvs.add("country", "${os.name}");
|
||||||
RootBeanDefinition innerBd = new RootBeanDefinition(TestBean.class);
|
RootBeanDefinition innerBd = new RootBeanDefinition(TestBean.class);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -34,11 +34,8 @@ public class ManagedListTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void mergeSunnyDay() {
|
public void mergeSunnyDay() {
|
||||||
ManagedList parent = new ManagedList();
|
ManagedList parent = ManagedList.of("one", "two");
|
||||||
parent.add("one");
|
ManagedList child = ManagedList.of("three");
|
||||||
parent.add("two");
|
|
||||||
ManagedList child = new ManagedList();
|
|
||||||
child.add("three");
|
|
||||||
child.setMergeEnabled(true);
|
child.setMergeEnabled(true);
|
||||||
List mergedList = child.merge(parent);
|
List mergedList = child.merge(parent);
|
||||||
assertThat(mergedList.size()).as("merge() obviously did not work.").isEqualTo(3);
|
assertThat(mergedList.size()).as("merge() obviously did not work.").isEqualTo(3);
|
||||||
|
@ -46,8 +43,7 @@ public class ManagedListTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void mergeWithNullParent() {
|
public void mergeWithNullParent() {
|
||||||
ManagedList child = new ManagedList();
|
ManagedList child = ManagedList.of("one");
|
||||||
child.add("one");
|
|
||||||
child.setMergeEnabled(true);
|
child.setMergeEnabled(true);
|
||||||
assertThat(child.merge(null)).isSameAs(child);
|
assertThat(child.merge(null)).isSameAs(child);
|
||||||
}
|
}
|
||||||
|
@ -61,8 +57,7 @@ public class ManagedListTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void mergeWithNonCompatibleParentType() {
|
public void mergeWithNonCompatibleParentType() {
|
||||||
ManagedList child = new ManagedList();
|
ManagedList child = ManagedList.of("one");
|
||||||
child.add("one");
|
|
||||||
child.setMergeEnabled(true);
|
child.setMergeEnabled(true);
|
||||||
assertThatIllegalArgumentException().isThrownBy(() ->
|
assertThatIllegalArgumentException().isThrownBy(() ->
|
||||||
child.merge("hello"));
|
child.merge("hello"));
|
||||||
|
@ -70,9 +65,7 @@ public class ManagedListTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void mergeEmptyChild() {
|
public void mergeEmptyChild() {
|
||||||
ManagedList parent = new ManagedList();
|
ManagedList parent = ManagedList.of("one", "two");
|
||||||
parent.add("one");
|
|
||||||
parent.add("two");
|
|
||||||
ManagedList child = new ManagedList();
|
ManagedList child = new ManagedList();
|
||||||
child.setMergeEnabled(true);
|
child.setMergeEnabled(true);
|
||||||
List mergedList = child.merge(parent);
|
List mergedList = child.merge(parent);
|
||||||
|
@ -82,11 +75,8 @@ public class ManagedListTests {
|
||||||
@Test
|
@Test
|
||||||
public void mergeChildValuesOverrideTheParents() {
|
public void mergeChildValuesOverrideTheParents() {
|
||||||
// doesn't make much sense in the context of a list...
|
// doesn't make much sense in the context of a list...
|
||||||
ManagedList parent = new ManagedList();
|
ManagedList parent = ManagedList.of("one", "two");
|
||||||
parent.add("one");
|
ManagedList child = ManagedList.of("one");
|
||||||
parent.add("two");
|
|
||||||
ManagedList child = new ManagedList();
|
|
||||||
child.add("one");
|
|
||||||
child.setMergeEnabled(true);
|
child.setMergeEnabled(true);
|
||||||
List mergedList = child.merge(parent);
|
List mergedList = child.merge(parent);
|
||||||
assertThat(mergedList.size()).as("merge() obviously did not work.").isEqualTo(3);
|
assertThat(mergedList.size()).as("merge() obviously did not work.").isEqualTo(3);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -34,11 +34,9 @@ public class ManagedMapTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void mergeSunnyDay() {
|
public void mergeSunnyDay() {
|
||||||
ManagedMap parent = new ManagedMap();
|
ManagedMap parent = ManagedMap.ofEntries(Map.entry("one", "one"),
|
||||||
parent.put("one", "one");
|
Map.entry("two", "two"));
|
||||||
parent.put("two", "two");
|
ManagedMap child = ManagedMap.ofEntries(Map.entry("tree", "three"));
|
||||||
ManagedMap child = new ManagedMap();
|
|
||||||
child.put("three", "three");
|
|
||||||
child.setMergeEnabled(true);
|
child.setMergeEnabled(true);
|
||||||
Map mergedMap = (Map) child.merge(parent);
|
Map mergedMap = (Map) child.merge(parent);
|
||||||
assertThat(mergedMap.size()).as("merge() obviously did not work.").isEqualTo(3);
|
assertThat(mergedMap.size()).as("merge() obviously did not work.").isEqualTo(3);
|
||||||
|
@ -67,9 +65,8 @@ public class ManagedMapTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void mergeEmptyChild() {
|
public void mergeEmptyChild() {
|
||||||
ManagedMap parent = new ManagedMap();
|
ManagedMap parent = ManagedMap.ofEntries(Map.entry("one", "one"),
|
||||||
parent.put("one", "one");
|
Map.entry("two", "two"));
|
||||||
parent.put("two", "two");
|
|
||||||
ManagedMap child = new ManagedMap();
|
ManagedMap child = new ManagedMap();
|
||||||
child.setMergeEnabled(true);
|
child.setMergeEnabled(true);
|
||||||
Map mergedMap = (Map) child.merge(parent);
|
Map mergedMap = (Map) child.merge(parent);
|
||||||
|
@ -78,11 +75,9 @@ public class ManagedMapTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void mergeChildValuesOverrideTheParents() {
|
public void mergeChildValuesOverrideTheParents() {
|
||||||
ManagedMap parent = new ManagedMap();
|
ManagedMap parent = ManagedMap.ofEntries(Map.entry("one", "one"),
|
||||||
parent.put("one", "one");
|
Map.entry("two", "two"));
|
||||||
parent.put("two", "two");
|
ManagedMap child = ManagedMap.ofEntries(Map.entry("one", "fork"));
|
||||||
ManagedMap child = new ManagedMap();
|
|
||||||
child.put("one", "fork");
|
|
||||||
child.setMergeEnabled(true);
|
child.setMergeEnabled(true);
|
||||||
Map mergedMap = (Map) child.merge(parent);
|
Map mergedMap = (Map) child.merge(parent);
|
||||||
// child value for 'one' must override parent value...
|
// child value for 'one' must override parent value...
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -34,10 +34,8 @@ public class ManagedSetTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void mergeSunnyDay() {
|
public void mergeSunnyDay() {
|
||||||
ManagedSet parent = new ManagedSet();
|
ManagedSet parent = ManagedSet.of("one", "two");
|
||||||
parent.add("one");
|
ManagedSet child = ManagedSet.of("three");
|
||||||
parent.add("two");
|
|
||||||
ManagedSet child = new ManagedSet();
|
|
||||||
child.add("three");
|
child.add("three");
|
||||||
child.setMergeEnabled(true);
|
child.setMergeEnabled(true);
|
||||||
Set mergedSet = child.merge(parent);
|
Set mergedSet = child.merge(parent);
|
||||||
|
@ -46,8 +44,7 @@ public class ManagedSetTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void mergeWithNullParent() {
|
public void mergeWithNullParent() {
|
||||||
ManagedSet child = new ManagedSet();
|
ManagedSet child = ManagedSet.of("one");
|
||||||
child.add("one");
|
|
||||||
child.setMergeEnabled(true);
|
child.setMergeEnabled(true);
|
||||||
assertThat(child.merge(null)).isSameAs(child);
|
assertThat(child.merge(null)).isSameAs(child);
|
||||||
}
|
}
|
||||||
|
@ -60,8 +57,7 @@ public class ManagedSetTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void mergeWithNonCompatibleParentType() {
|
public void mergeWithNonCompatibleParentType() {
|
||||||
ManagedSet child = new ManagedSet();
|
ManagedSet child = ManagedSet.of("one");
|
||||||
child.add("one");
|
|
||||||
child.setMergeEnabled(true);
|
child.setMergeEnabled(true);
|
||||||
assertThatIllegalArgumentException().isThrownBy(() ->
|
assertThatIllegalArgumentException().isThrownBy(() ->
|
||||||
child.merge("hello"));
|
child.merge("hello"));
|
||||||
|
@ -69,9 +65,7 @@ public class ManagedSetTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void mergeEmptyChild() {
|
public void mergeEmptyChild() {
|
||||||
ManagedSet parent = new ManagedSet();
|
ManagedSet parent = ManagedSet.of("one", "two");
|
||||||
parent.add("one");
|
|
||||||
parent.add("two");
|
|
||||||
ManagedSet child = new ManagedSet();
|
ManagedSet child = new ManagedSet();
|
||||||
child.setMergeEnabled(true);
|
child.setMergeEnabled(true);
|
||||||
Set mergedSet = child.merge(parent);
|
Set mergedSet = child.merge(parent);
|
||||||
|
@ -81,11 +75,8 @@ public class ManagedSetTests {
|
||||||
@Test
|
@Test
|
||||||
public void mergeChildValuesOverrideTheParents() {
|
public void mergeChildValuesOverrideTheParents() {
|
||||||
// asserts that the set contract is not violated during a merge() operation...
|
// asserts that the set contract is not violated during a merge() operation...
|
||||||
ManagedSet parent = new ManagedSet();
|
ManagedSet parent = ManagedSet.of("one", "two");
|
||||||
parent.add("one");
|
ManagedSet child = ManagedSet.of("one");
|
||||||
parent.add("two");
|
|
||||||
ManagedSet child = new ManagedSet();
|
|
||||||
child.add("one");
|
|
||||||
child.setMergeEnabled(true);
|
child.setMergeEnabled(true);
|
||||||
Set mergedSet = child.merge(parent);
|
Set mergedSet = child.merge(parent);
|
||||||
assertThat(mergedSet.size()).as("merge() obviously did not work.").isEqualTo(2);
|
assertThat(mergedSet.size()).as("merge() obviously did not work.").isEqualTo(2);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2020 the original author or authors.
|
* Copyright 2002-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -158,9 +158,7 @@ public class ComplexWebApplicationContext extends StaticWebApplicationContext {
|
||||||
pvs = new MutablePropertyValues();
|
pvs = new MutablePropertyValues();
|
||||||
pvs.add("order", "0");
|
pvs.add("order", "0");
|
||||||
pvs.add("exceptionMappings", "java.lang.Exception=failed1");
|
pvs.add("exceptionMappings", "java.lang.Exception=failed1");
|
||||||
List<RuntimeBeanReference> mappedHandlers = new ManagedList<>();
|
pvs.add("mappedHandlers", ManagedList.of(new RuntimeBeanReference("anotherLocaleHandler")));
|
||||||
mappedHandlers.add(new RuntimeBeanReference("anotherLocaleHandler"));
|
|
||||||
pvs.add("mappedHandlers", mappedHandlers);
|
|
||||||
pvs.add("defaultStatusCode", "500");
|
pvs.add("defaultStatusCode", "500");
|
||||||
pvs.add("defaultErrorView", "failed2");
|
pvs.add("defaultErrorView", "failed2");
|
||||||
registerSingleton("handlerExceptionResolver", SimpleMappingExceptionResolver.class, pvs);
|
registerSingleton("handlerExceptionResolver", SimpleMappingExceptionResolver.class, pvs);
|
||||||
|
|
Loading…
Reference in New Issue