跳到主要内容

MVC 配置 API

DeepSeek V3 中英对照 MVC Config API

在 Java 配置中,你可以实现 WebMvcConfigurer 接口,如下例所示:

@Configuration
public class WebConfiguration implements WebMvcConfigurer {

// Implement configuration methods...
}
java

在 XML 中,你可以检查 <mvc:annotation-driven/> 的属性和子元素。你可以查看 Spring MVC XML schema 或使用 IDE 的代码补全功能来发现可用的属性和子元素。