I have a Spring based application and using a software approach ( AbstractAnnotationConfigDispatcherServletInitializer ) to configure the application.
To make tomcat session replication, I need to "mark" the distribution application using the <distributable/> in web.xml , however, as I said, I use a program style, for example
public class WebInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { @Override public void onStartup(ServletContext servletContext) throws ServletException { String activeProfile = activeProfile(); if (isNotEmpty(activeProfile)) { servletContext.setInitParameter("spring.profiles.active", activeProfile); } super.onStartup(servletContext); } }
I can't find any documents on how to do this using Spring configs, so my question here is, is it possible to have a redistributable application without web.xml? I cannot move all configs to web.xml, so any help would be appreciated.
source share