This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Framework 6.1.12! |
MVC Config API
In Java configuration, you can implement the WebMvcConfigurer
interface, as the
following example shows:
-
Java
-
Kotlin
@Configuration
public class WebConfiguration implements WebMvcConfigurer {
// Implement configuration methods...
}
@Configuration
class WebConfiguration : WebMvcConfigurer {
// Implement configuration methods...
}
In XML, you can check attributes and sub-elements of <mvc:annotation-driven/>
. You can
view the Spring MVC XML schema or use
the code completion feature of your IDE to discover what attributes and
sub-elements are available.