mirror of
https://github.com/chillzhuang/blade-tool
synced 2024-11-05 10:09:32 +08:00
⚡ enable配置关键字统一改为enabled
This commit is contained in:
parent
b560c9d097
commit
c9f1774fc7
@ -44,7 +44,7 @@ public class MybatisPlusConfiguration {
|
|||||||
* @return SqlLogInterceptor
|
* @return SqlLogInterceptor
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnProperty(value = "blade.mybatis-plus.sql-log.enable", matchIfMissing = true)
|
@ConditionalOnProperty(value = "blade.mybatis-plus.sql-log", matchIfMissing = true)
|
||||||
public SqlLogInterceptor sqlLogInterceptor() {
|
public SqlLogInterceptor sqlLogInterceptor() {
|
||||||
return new SqlLogInterceptor();
|
return new SqlLogInterceptor();
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ public class OssProperties {
|
|||||||
/**
|
/**
|
||||||
* 是否启用
|
* 是否启用
|
||||||
*/
|
*/
|
||||||
private Boolean enable;
|
private Boolean enabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对象存储名称
|
* 对象存储名称
|
||||||
|
@ -57,7 +57,7 @@ public class SecureConfiguration implements WebMvcConfigurer {
|
|||||||
public void addInterceptors(InterceptorRegistry registry) {
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
clientProperties.getClient().forEach(cs -> registry.addInterceptor(new ClientInterceptor(cs.getClientId())).addPathPatterns(cs.getPathPatterns()));
|
clientProperties.getClient().forEach(cs -> registry.addInterceptor(new ClientInterceptor(cs.getClientId())).addPathPatterns(cs.getPathPatterns()));
|
||||||
|
|
||||||
if (secureRegistry.isEnable()) {
|
if (secureRegistry.isEnabled()) {
|
||||||
registry.addInterceptor(new SecureInterceptor())
|
registry.addInterceptor(new SecureInterceptor())
|
||||||
.excludePathPatterns(secureRegistry.getExcludePatterns())
|
.excludePathPatterns(secureRegistry.getExcludePatterns())
|
||||||
.excludePathPatterns(secureRegistry.getDefaultExcludePatterns())
|
.excludePathPatterns(secureRegistry.getDefaultExcludePatterns())
|
||||||
|
@ -29,7 +29,7 @@ import java.util.List;
|
|||||||
@Data
|
@Data
|
||||||
public class SecureRegistry {
|
public class SecureRegistry {
|
||||||
|
|
||||||
private boolean enable = false;
|
private boolean enabled = false;
|
||||||
|
|
||||||
private final List<String> defaultExcludePatterns = new ArrayList<>();
|
private final List<String> defaultExcludePatterns = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ import javax.servlet.DispatcherType;
|
|||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@ConditionalOnProperty(value = "blade.xss.enable", havingValue = "true")
|
@ConditionalOnProperty(value = "blade.xss.enabled", havingValue = "true")
|
||||||
@EnableConfigurationProperties({XssProperties.class, XssUrlProperties.class})
|
@EnableConfigurationProperties({XssProperties.class, XssUrlProperties.class})
|
||||||
public class XssConfiguration {
|
public class XssConfiguration {
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ public class XssProperties {
|
|||||||
/**
|
/**
|
||||||
* 开启xss
|
* 开启xss
|
||||||
*/
|
*/
|
||||||
private Boolean enable = true;
|
private Boolean enabled = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 放行url
|
* 放行url
|
||||||
|
Loading…
Reference in New Issue
Block a user