Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate mvc XML configuration namespace #34063

Closed
bclozel opened this issue Dec 10, 2024 · 1 comment
Closed

Deprecate mvc XML configuration namespace #34063

bclozel opened this issue Dec 10, 2024 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Dec 10, 2024

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.

@bclozel bclozel added in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task labels Dec 10, 2024
@bclozel bclozel added this to the 7.0.x milestone Dec 10, 2024
@bclozel bclozel self-assigned this Dec 10, 2024
@bclozel bclozel added type: enhancement A general enhancement and removed type: task A general task labels Dec 11, 2024
@bclozel bclozel modified the milestones: 7.0.x, 7.0.0-M1 Dec 17, 2024
@bclozel
Copy link
Member Author

bclozel commented Dec 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant