@EnableAsync
@Configuration
@EnableConfigurationProperties(value={CoreProperties.class,GlobalProperties.class})
@ComponentScan(basePackages="com.diboot.core")
@MapperScan(basePackages="com.diboot.core.mapper")
public class CoreAutoConfig
extends Object
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
| 限定符和类型 | 字段和说明 |
|---|---|
private String |
defaultDatePattern |
private com.fasterxml.jackson.annotation.JsonInclude.Include |
defaultPropertyInclusion |
private String |
defaultTimeZone |
private static org.slf4j.Logger |
log |
| 构造器和说明 |
|---|
CoreAutoConfig() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addFormatters(org.springframework.format.FormatterRegistry registry)
默认支持String-Date类型转换
|
com.diboot.core.data.protect.DataEncryptHandler |
dataEncryptHandler()
数据加密解密处理器
|
com.diboot.core.data.protect.DataMaskHandler |
dataMaskHandler()
数据脱敏处理器
|
org.springframework.http.converter.json.Jackson2ObjectMapperBuilder |
jackson2ObjectMapperBuilder() |
org.springframework.http.converter.json.MappingJackson2HttpMessageConverter |
jacksonMessageConverter() |
org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer |
jsonCustomizer()
默认配置 ObjectMapper, 并允许用户覆盖
|
com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor |
mybatisPlusInterceptor()
Mybatis-plus分页插件
|
com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer |
typeHandlerRegistry()
扩展Mybatis 类型转换,支持日期类型转为LocalDate等
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddArgumentResolvers, addCorsMappings, addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidatorprivate static final org.slf4j.Logger log
@Value(value="${spring.jackson.date-format:yyyy-MM-dd HH:mm:ss}")
private String defaultDatePattern
@Value(value="${spring.jackson.time-zone:GMT+8}")
private String defaultTimeZone
@Value(value="${spring.jackson.default-property-inclusion:NON_NULL}")
private com.fasterxml.jackson.annotation.JsonInclude.Include defaultPropertyInclusion
@Bean @ConditionalOnMissingBean public org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer jsonCustomizer()
@Bean @ConditionalOnMissingBean public org.springframework.http.converter.json.Jackson2ObjectMapperBuilder jackson2ObjectMapperBuilder()
@Bean @ConditionalOnMissingBean public org.springframework.http.converter.json.MappingJackson2HttpMessageConverter jacksonMessageConverter()
@Bean @ConditionalOnMissingBean public com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor mybatisPlusInterceptor()
@Bean @ConditionalOnMissingBean(value=com.diboot.core.data.protect.DataEncryptHandler.class) public com.diboot.core.data.protect.DataEncryptHandler dataEncryptHandler()
@Bean @ConditionalOnMissingBean(value=com.diboot.core.data.protect.DataMaskHandler.class) public com.diboot.core.data.protect.DataMaskHandler dataMaskHandler()
public void addFormatters(org.springframework.format.FormatterRegistry registry)
addFormatters 在接口中 org.springframework.web.servlet.config.annotation.WebMvcConfigurerregistry - registry@Bean @ConditionalOnMissingBean public com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer typeHandlerRegistry()
Copyright © 2023. All rights reserved.