♻️ 重构配置类名称 config -> configuration
This commit is contained in:
1 parent
dbc3b9e05e
commit
7679b8dbd3
9 files changed
+16
-17
No files matched your search
+1
-1
@@ -36,7 +36,7 @@ import java.util.TimeZone;
|
||||
@ConditionalOnClass(ObjectMapper.class)
|
||||
@AutoConfigureBefore(JacksonAutoConfiguration.class)
|
||||
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
|
||||
public class JacksonConfig implements WebMvcConfigurer {
|
||||
public class JacksonConfiguration implements WebMvcConfigurer {
|
||||
|
||||
private static final String ASIA_SHANGHAI = "Asia/Shanghai";
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import org.springframework.context.support.ReloadableResourceBundleMessageSource
|
||||
* 国际化配置
|
||||
*/
|
||||
@Configuration
|
||||
public class MessageSourceConfig {
|
||||
public class MessageSourceConfiguration {
|
||||
|
||||
@Bean
|
||||
public MessageSource messageSource() {
|
||||
+1
-1
@@ -26,7 +26,7 @@ import org.springframework.web.client.RestTemplate;
|
||||
* @date 2018/8/16 RestTemplate
|
||||
*/
|
||||
@Configuration
|
||||
public class RestTemplateConfig {
|
||||
public class RestTemplateConfiguration {
|
||||
|
||||
@Bean
|
||||
public RestTemplate restTemplate() {
|
||||
@@ -1,5 +1,5 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.pig4cloud.pigx.common.core.config.JacksonConfig,\
|
||||
com.pig4cloud.pigx.common.core.config.MessageSourceConfig,\
|
||||
com.pig4cloud.pigx.common.core.config.RestTemplateConfig,\
|
||||
com.pig4cloud.pigx.common.core.config.JacksonConfiguration,\
|
||||
com.pig4cloud.pigx.common.core.config.MessageSourceConfiguration,\
|
||||
com.pig4cloud.pigx.common.core.config.RestTemplateConfiguration,\
|
||||
com.pig4cloud.pigx.common.core.util.SpringContextHolder
|
||||
+1
-1
@@ -33,7 +33,7 @@ import java.util.List;
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnMissingBean(CacheManagerCustomizers.class)
|
||||
public class RedisCacheManagerConfig {
|
||||
public class RedisCacheManagerConfiguration {
|
||||
|
||||
@Bean
|
||||
public CacheManagerCustomizers cacheManagerCustomizers(
|
||||
+1
-2
@@ -35,10 +35,9 @@ import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||
*/
|
||||
@EnableCaching
|
||||
@Configuration
|
||||
@AllArgsConstructor
|
||||
@AutoConfigureBefore(name = { "org.redisson.spring.starter.RedissonAutoConfiguration",
|
||||
"org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration" })
|
||||
public class RedisTemplateConfig {
|
||||
public class RedisTemplateConfiguration {
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
@@ -1,7 +1,7 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.pig4cloud.pigx.common.data.cache.RedisTemplateConfig,\
|
||||
com.pig4cloud.pigx.common.data.cache.RedisTemplateConfiguration,\
|
||||
com.pig4cloud.pigx.common.data.cache.RedisMessageConfiguration,\
|
||||
com.pig4cloud.pigx.common.data.cache.RedisCacheManagerConfig,\
|
||||
com.pig4cloud.pigx.common.data.cache.RedisCacheManagerConfiguration,\
|
||||
com.pig4cloud.pigx.common.data.cache.RedisCacheAutoConfiguration,\
|
||||
com.pig4cloud.pigx.common.data.tenant.PigxTenantConfigProperties,\
|
||||
com.pig4cloud.pigx.common.data.tenant.TenantContextHolderFilter,\
|
||||
|
||||
+4
-4
@@ -19,11 +19,11 @@ package com.pig4cloud.pigx.common.datasource;
|
||||
|
||||
import com.baomidou.dynamic.datasource.processor.DsProcessor;
|
||||
import com.baomidou.dynamic.datasource.provider.DynamicDataSourceProvider;
|
||||
import com.pig4cloud.pigx.common.datasource.config.ClearTtlDsConfiguration;
|
||||
import com.pig4cloud.pigx.common.datasource.config.DruidDataSourceProperties;
|
||||
import com.pig4cloud.pigx.common.datasource.config.JdbcDynamicDataSourceProvider;
|
||||
import com.pig4cloud.pigx.common.datasource.config.LastParamDsProcessor;
|
||||
import com.pig4cloud.pigx.common.datasource.config.WebMvcConfig;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.jasypt.encryption.StringEncryptor;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
@@ -39,7 +39,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
* 动态数据源切换配置
|
||||
*/
|
||||
@Configuration
|
||||
@AllArgsConstructor
|
||||
@RequiredArgsConstructor
|
||||
@AutoConfigureAfter(DataSourceAutoConfiguration.class)
|
||||
@EnableConfigurationProperties(DruidDataSourceProperties.class)
|
||||
public class DynamicDataSourceAutoConfiguration {
|
||||
@@ -60,7 +60,7 @@ public class DynamicDataSourceAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
public WebMvcConfigurer webMvcConfigurer() {
|
||||
return new WebMvcConfig();
|
||||
return new ClearTtlDsConfiguration();
|
||||
}
|
||||
|
||||
}
|
||||
+2
-2
@@ -7,11 +7,11 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
* @author lengleng
|
||||
* @date 2020/12/11
|
||||
*/
|
||||
public class WebMvcConfig implements WebMvcConfigurer {
|
||||
public class ClearTtlDsConfiguration implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(new ClearTtlDsInterceptor()).addPathPatterns("/**");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user