类 DevCoreConfiguration
java.lang.Object
net.sohelp.boot.dev.config.DevCoreConfiguration
- 所有已实现的接口:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@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
开发平台核心配置类,用于启用开发模块相关功能。
该配置类在 sohelp-boot.dev.enabled=true(默认)时生效,
并扫描 net.sohelp.boot.dev 包下的组件。
同时实现了 WebMvcConfigurer 接口,用于注册拦截器。
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry) 添加拦截器到 Spring MVC 配置中。从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.springframework.web.servlet.config.annotation.WebMvcConfigurer
addArgumentResolvers, addCorsMappings, addErrorResponseInterceptors, addFormatters, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
-
构造器详细资料
-
DevCoreConfiguration
public DevCoreConfiguration()
-
-
方法详细资料
-
addInterceptors
public void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry) 添加拦截器到 Spring MVC 配置中。此方法将
LoginInterceptor拦截器应用到指定路径模式,并排除部分无需鉴权的静态资源和接口。- 指定者:
addInterceptors在接口中org.springframework.web.servlet.config.annotation.WebMvcConfigurer- 参数:
registry- 拦截器注册中心,用于添加、配置拦截器及其作用范围
-