@Configuration
@ConditionalOnProperty(prefix="sohelp-boot.dev",
name="enabled",
havingValue="true",
matchIfMissing=true)
@ComponentScan(basePackages="net.sohelp.boot.dev")
public class DevCoreConfiguration
extends Object
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
| 构造器和说明 |
|---|
DevCoreConfiguration() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
添加拦截器的方法。
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddArgumentResolvers, addCorsMappings, addFormatters, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidatorpublic void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
addInterceptors 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurerregistry - 拦截器注册表
- 通过该注册表,可以添加自定义的拦截器,以拦截HTTP请求并处理特定的逻辑。
- 该方法通常用于在Spring MVC应用程序中配置全局拦截器。Copyright © 2025. All rights reserved.