Reputation: 478
In my pre-spring code I had following configuration:
@VaadinServletConfiguration(productionMode = false, ui = AppUI.class, closeIdleSessions = true)
public class AppServlet extends VaadinServlet {
}
But the Book of Vaadin says in 11.18.9. Deploying Spring UIs and Servlets: Custom Servlets
When customizing the Vaadin servlet, as outlined in Section 4.8.2, “Vaadin Servlet, Portlet, and Service”, you simply need to extend com.vaadin.spring.internal.VaadinSpringServlet instead of com.vaadin.servlet.VaadinServlet.
@WebServlet(value = "/*", asyncSupported = true) public class MySpringServlet extends SpringVaadinServlet { }
The custom servlet must not have @VaadinServletConfiguration, as you would normally with a Vaadin servlet, as described in Section 4.9, “Deploying an Application”.
My question is: Where do I pass parameters from @VaadinServletConfiguration?
Upvotes: 3
Views: 2530
Reputation: 11
This annotation just add init params to your vaadin servlet.
You ca override method, and add all manual
@WebServlet(value = "/*", asyncSupported = true)
public class WebServletVaadinConfiguration extends VaadinServlet {
@Override
public void init(ServletConfig servletConfig) throws ServletException {
servletConfig.getServletContext().setInitParameter("productionMode","true");
super.init(servletConfig);}
}
Upvotes: 1
Reputation: 4967
You can define those in the application.properties
file. For example:
vaadin.servlet.production-mode=true
I am using IntelliJ IDEA 14 and I am able to autocomplete those settings.
Upvotes: 4