Hi, Lars,
I have the same question, and I found one solution, I guess.
You may try to make yours components as fragment bundles, and create one host war bundle to expose the web application.
In the war module, declare application context in the XXX-servlet.xml like normal spring mvc application:
Code:
<context:component-scan base-package="example.**.web" />
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"
p:prefix="/WEB-INF/view/" p:suffix=".jsp" />
And in each fragment bundle, declare host bundle in the manifest file:
Code:
...
Fragment-Host: dmmvc.war
Import-Package:
...
create controllers under example.**.web package, they will be scanned and registered in the above web application context when spring framework starts,
and then place JSP files in the /WEB-INF/view folder.
But the problem of this solution is, the fragments cannot be stopped at run-time, and maybe not allow multiple versions co-existing, I don't know.
Best Regards
xinthink