@Configuration
@ConditionalOnProperty(prefix="sohelp-boot.dev",
name="enabled",
havingValue="true",
matchIfMissing=true)
@ComponentScan(basePackages="net.sohelp.boot.dev.web")
public class DevWebConfiguration
extends Object
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
| 构造器和说明 |
|---|
DevWebConfiguration() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
重写addResourceHandlers方法,用于配置静态资源的映射路径。
|
void |
addViewControllers(org.springframework.web.servlet.config.annotation.ViewControllerRegistry viewControllerRegistry)
重写addViewControllers方法,用于向ViewControllerRegistry注册视图控制器
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddArgumentResolvers, addCorsMappings, addFormatters, addInterceptors, addReturnValueHandlers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidatorpublic void addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
addResourceHandlers 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurerregistry - ResourceHandlerRegistry对象,用于注册静态资源的处理规则。public void addViewControllers(org.springframework.web.servlet.config.annotation.ViewControllerRegistry viewControllerRegistry)
addViewControllers 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurerviewControllerRegistry - 视图控制器注册表Copyright © 2025. All rights reserved.