The MVC XML configuration namespace (like <mvc:annotation-driven>
, <mvc:resources>
and <mvc:cors>
) has been supported for a long time and naturally phased out over the years in favor of the Java configuration model and Spring Boot auto-configurations in general. It is defined in https://www.springframework.org/schema/mvc/spring-mvc.xsd.
This configuration model is lagging behind in the 6.x generation already and we don't intend to invest in this space to close that gap.
As of Spring Framework 7.0, we intend to declare this namespace as deprecated. We should log WARN messages if it's being used and look into providing hints at the IDE level if possible.
Note: this is selectively being considered for the <mvc:*
namespace and other namespaces like <bean>
(as in https://www.springframework.org/schema/beans/spring-beans.xsd) are not deprecated.
Comment From: bclozel
We considered working on deprecation warnings in the IDE while editing XML configuration file in #24237 but declined it given the investment required.
We can warn developers about this deprecation by logging a WARN message if the <mvc:*
namespace is used, and by documenting this in the reference docs.