Configuring a spring-boot application using web.xml

后端 未结 1 1443
小鲜肉
小鲜肉 2020-12-08 05:17

I\'m bootifying an existing Spring Web application so the generated war file embed a Jetty web server. I want to stick to the existing configuration as much as I can in orde

相关标签:
1条回答
  • 2020-12-08 05:48

    If I were you I would slowly try to peel away the layers in web.xml and remove it altogether. That way you will only have one configuration for the whole application including all filters and servlets (that's the idea anyway). You can do some parallel running while you stabilize where the filters are duplicated in web.xml, and then when you have the same functionality in a main application you can just delete web.xml. To add filters to your main application just create @Bean definitions for Filter or FilterRegistrationBean instances.

    You can always support a war deployment through SpringBootServletInitializer as well if needed.

    0 讨论(0)
提交回复
热议问题