Skip to content

Instantly share code, notes, and snippets.

@chrismrgn
Created July 14, 2016 02:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrismrgn/3e409b00ef4a9950bf0d68bef3742325 to your computer and use it in GitHub Desktop.
Save chrismrgn/3e409b00ef4a9950bf0d68bef3742325 to your computer and use it in GitHub Desktop.
Fragment from dispatcher-servlet.xml to wire up Sitemap in DD4T 2 Java
<!-- Sitemap -->
<bean id="sitemap" class="com.xxx.xxx.navigation.SitemapImpl">
</bean>
<bean id="navigationController" class="com.xxx.xxx.controller.NavigationController">
<property name="navigationViewPath" value="navigation/"/>
<property name="publicationResolver" ref="publicationResolver" />
<property name="sitemapFactory" ref="sitemapFactory"/>
<property name="sitemap" ref="sitemap"/>
</bean>
<!-- Custom Factory -->
<bean id="sitemapFactory" class="com.xxx.xxx.xxx.SitemapFactoryImpl" factory-method="getInstance">
<property name="pageProvider" ref="pageProvider" />
<property name="cacheProvider" ref="cacheProvider" />
</bean>
<!-- Custom Databinder -->
<bean id="customDataBinder" class="com.xxx.xxx.databind.DataBinderImpl" factory-method="getInstance">
</bean>
<bean id="customDataBindFactory" class="com.xxx.xxx.databind.CustomDataBindFactory" factory-method="getInstance">
<property name="customDataBinder" ref="customDataBinder" />
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment