I'm currently trying to move my project from Java EE to Spring Boot project. However, i've been stucked and confused on the part with dispatcher servlet and web.xml and it seems like web.xml is no longer being read by the project anymore. The current project is running on tomcat 7.
In my web.xml
file, I have lots of servlet
, servlet-mapping
, filter
and filter mapping
and I don't really understand how to do the mapping in the dispatcher.
I've attached a sample of my web.xml
below and the version is 2.5.
Qns:
web.xml
to rely on the spring dispatcher, if yes how can I achieve that? web.xml
the way to go for spring boot project?Can anyone please guide me along here? Thanks!!
pom.xml
. The way to go with spring boot is moving all your xml configuration, web.xml etc to spring boot's auto configuration + your java configuration.Spring boot works very good when you do everything in java configuration and follow its principals. From my experience with it, when you start merging XML configuration and the legacy spring it starts breaking the auto configuration process and its much better to try as much as you can to comply with the new spring boot best practices.