@Configuration @EnableConfigurationProperties(value=FrameworkWebProperties.class) public class FrameworkWebConfig extends Object
Framework web config
0.0.4: Add setDownloadCacheSize method; Add config GlobalExceptionHandler, WebLogAspect, PreventRepeatSubmitAspect
1.0.2: 修改配置属性前缀;删除DownloadUtil cacheSize, RequestContextListener配置
1.0.4: 添加配置中的全局异常处理信息
1.0.7: 删除webLog、删除角色控制配置, 添加防重复提交配置
| 构造器和说明 |
|---|
FrameworkWebConfig() |
| 限定符和类型 | 方法和说明 |
|---|---|
GlobalExceptionHandler |
globalExceptionHandler()
Config global exception handler
|
PreventRepeat |
preventRepeat()
Config timed cache prevent repeat, Conditional on missing bean
StringRedisTemplate |
PreventRepeatKey |
preventRepeatKey()
Config prevent repeat submit key service, Conditional on missing bean
|
PreventRepeatSubmitAspect |
preventRepeatSubmitAspect(PreventRepeat preventRepeat,
PreventRepeatKey preventRepeatKey)
Config prevent repeat submit aspect
|
@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty(value="framework.web.global-exception-handle.enabled",
havingValue="true",
matchIfMissing=true)
public GlobalExceptionHandler globalExceptionHandler()
@Bean @ConditionalOnMissingBean public PreventRepeat preventRepeat()
StringRedisTemplate@Bean @ConditionalOnMissingBean public PreventRepeatKey preventRepeatKey()
@Bean
@ConditionalOnProperty(value="framework.web.prevent-repeat-submit.enabled",
havingValue="true",
matchIfMissing=true)
public PreventRepeatSubmitAspect preventRepeatSubmitAspect(PreventRepeat preventRepeat,
PreventRepeatKey preventRepeatKey)
preventRepeat - the prevent repeat submit servicepreventRepeatKey - the submit key generate serviceCopyright © 2020. All rights reserved.