Handle multiple route files
bclozel opened this issue · comments
Brian Clozel commented
Modify HandlerMapping configuration to handle multiple route files (for modular projects).
Replace
<bean id="handlerMapping"
class="org.springframework.web.servlet.mvc.router.RouterHandlerMapping">
<property name="routeFile" value="routes.conf" />
<property name="servletPrefix" value="" />
</bean>
With something like
<bean id="handlerMapping"
class="org.springframework.web.servlet.mvc.router.RouterHandlerMapping">
<property name="routeFile" value="routes.conf" />
<property name="routeFiles">
<list>
<value>routes.conf</value>
<value>plugin1-routes.conf</value>
</list>
</property>
<property name="servletPrefix" value="" />
</bean>
Should we handle wildcards/regex for this?
<value>plugin*-routes.conf</value>
Warning: list order matters, handlerMapping bean should always append routes to Router.
Brian Clozel commented
Merged in master.
Support for wildcards not yet implemented.
Need to write more tests.
Brian Clozel commented
Wildcards support is fine by me.
Merged in master.