[java-identity-provider] branch main updated: IDP-2230 - Replace hardwired ViewResolver beans with autowiring

Scott Cantor cantor.2 at osu.edu
Mon Feb 5 16:12:12 UTC 2024


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=64587d3013c60401b08d53e24806ce58cd8797c3

The following commit(s) were added to refs/heads/main by this push:
     new 64587d301 IDP-2230 - Replace hardwired ViewResolver beans with autowiring
64587d301 is described below

commit 64587d3013c60401b08d53e24806ce58cd8797c3
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Feb 5 11:12:09 2024 -0500

    IDP-2230 - Replace hardwired ViewResolver beans with autowiring
    
    https://shibboleth.atlassian.net/browse/IDP-2230
    
    Auto-wire view resolvers with factory bean and use that for SWF config.
---
 .../resources/net/shibboleth/idp/conf/webflow-config.xml  | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/webflow-config.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/webflow-config.xml
index 4904f48e9..925ddd429 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/webflow-config.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/conf/webflow-config.xml
@@ -11,6 +11,9 @@
     <bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"
         p:placeholderPrefix="%{" p:placeholderSuffix="}" />
 
+    <!-- Needed to allow for auto-wiring of ViewResolvers. -->
+    <context:annotation-config />
+
     <!-- Default flow mappings. -->
     <bean id="shibboleth.DefaultFlowMap" lazy-init="true"
             class="org.springframework.beans.factory.config.MapFactoryBean">
@@ -198,15 +201,11 @@
 
     <webflow:flow-builder-services id="flowBuilderServices" view-factory-creator="mvcViewFactoryCreator" />
 
+    <!-- Collects all ViewResolver beans via auto-wiring and exposes as List for the SWF bean following it. -->
+    <bean id="mvcViewResolverFactory" class="net.shibboleth.shared.spring.factory.ViewResolversFactoryBean" />
+
     <bean id="mvcViewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator"
-            p:useSpringBeanBinding="true">
-        <property name="viewResolvers">
-            <list>
-                <ref bean="shibboleth.VelocityViewResolver" />
-                <ref bean="shibboleth.InternalViewResolver" />
-            </list>
-        </property>
-    </bean>
+        p:useSpringBeanBinding="true" p:viewResolvers-ref="mvcViewResolverFactory" />
 
     <bean id="profileRequestContextFlowExecutionListener"
           class="net.shibboleth.idp.profile.support.ProfileRequestContextFlowExecutionListener" />

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list