Spring integration using @SpringUI path problem

Hi,

we are updating to Vaadin 7 and are using spring this is how we extend the UI, having one entry for the main application and another for the admin.

[code]
class Application extends UI { … }

class CoreApplication extends Application { … }

@SpringUI
MainApplication extends CoreApplication {
@WebServlet(urlPatterns={“/application/", "/VAADIN/”}, initParams = {@WebInitParam(name = “widgetset”, value = “se.reforce.fasthi.web.interfaces.ui.ReforceWidgetset”)}) public static class Servlet extends SpringVaadinServlet { }
}

@SpringUI
AdminApplication extends CoreApplication {
@WebServlet(urlPatterns={“/administration/*”}, initParams = {@WebInitParam(name = “widgetset”, value = “se.reforce.fasthi.web.interfaces.ui.ReforceWidgetset”)}) public static class Servlet extends SpringVaadinServlet { }
}
[/code]Problem:
This will not work since it is not okay to have two @SpringUI’s having the same path, and it works fine when removing one of the @SpringUI’s. But having both doesn’t work without using @SpringUI path property from what I understand.

So what I am wondering is how to use the @SpringUI path, I’ve tried to use the @SpringUI(path=“/application”) but this results in a HTTP Status 404, not sure how to use the path property. Does anyone have any clue how this can be done?

Thanks
Christopher

Hi Christopher.

Have you tried with setting the “path” value on the @SpringUI annotation like this?

@SpringUI(path = "application") / @SpringUI(path = "administration") Each for the different UI’s you have. Maybe the “/” you have is provoking the problem?

Hope it helps

Fran

Thanks for the reply,

Yes, and I’ve tried it with with both “/application” and “application”, but get a HTTP status 404 for both. But it seems like they are registered.

2015-04-15 09:41:12 INFO SpringUIProvider:65 - Checking the application context for Vaadin UIs
2015-04-15 09:41:12 INFO SpringUIProvider:71 - Found Vaadin UI [se.interfaces.ui.administration.AdminApplication]

2015-04-15 09:41:12 INFO SpringUIProvider:71 - Found Vaadin UI [se.web.interfaces.ui.application.MainApplication]
.

I have the same problem. Path seems to be broken: https://github.com/vaadin/spring/issues/23