Add convenience factory method for Managed[List|Set|Map]
Closes gh-28026
This commit is contained in:
@@ -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");
|
||||
* 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.add("order", "0");
|
||||
pvs.add("exceptionMappings", "java.lang.Exception=failed1");
|
||||
List<RuntimeBeanReference> mappedHandlers = new ManagedList<>();
|
||||
mappedHandlers.add(new RuntimeBeanReference("anotherLocaleHandler"));
|
||||
pvs.add("mappedHandlers", mappedHandlers);
|
||||
pvs.add("mappedHandlers", ManagedList.of(new RuntimeBeanReference("anotherLocaleHandler")));
|
||||
pvs.add("defaultStatusCode", "500");
|
||||
pvs.add("defaultErrorView", "failed2");
|
||||
registerSingleton("handlerExceptionResolver", SimpleMappingExceptionResolver.class, pvs);
|
||||
|
||||
Reference in New Issue
Block a user