mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 08:57:17 +08:00
style: StringConsts => StringConstants
This commit is contained in:
@@ -27,7 +27,7 @@ import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
import org.springframework.web.filter.CorsFilter;
|
||||
import top.charles7c.continew.starter.core.constant.StringConsts;
|
||||
import top.charles7c.continew.starter.core.constant.StringConstants;
|
||||
|
||||
/**
|
||||
* 跨域自动配置
|
||||
@@ -53,8 +53,8 @@ public class CorsAutoConfiguration {
|
||||
// 设置跨域允许时间
|
||||
config.setMaxAge(1800L);
|
||||
// 配置允许跨域的域名
|
||||
if (properties.getAllowedOrigins().contains(StringConsts.ASTERISK)) {
|
||||
config.addAllowedOriginPattern(StringConsts.ASTERISK);
|
||||
if (properties.getAllowedOrigins().contains(StringConstants.ASTERISK)) {
|
||||
config.addAllowedOriginPattern(StringConstants.ASTERISK);
|
||||
} else {
|
||||
// 配置为 true 后则必须配置允许跨域的域名,且不允许配置为 *
|
||||
config.setAllowCredentials(true);
|
||||
|
@@ -27,7 +27,7 @@ import lombok.NoArgsConstructor;
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public class StringConsts implements StrPool {
|
||||
public class StringConstants implements StrPool {
|
||||
|
||||
/**
|
||||
* 空字符串
|
@@ -19,7 +19,7 @@ package top.charles7c.continew.starter.core.util;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import top.charles7c.continew.starter.core.constant.StringConsts;
|
||||
import top.charles7c.continew.starter.core.constant.StringConstants;
|
||||
|
||||
import java.util.concurrent.CancellationException;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
@@ -99,7 +99,7 @@ public class ExceptionUtils {
|
||||
* @return /
|
||||
*/
|
||||
public static String exToBlank(ExSupplier<String> exSupplier) {
|
||||
return exToDefault(exSupplier, StringConsts.EMPTY);
|
||||
return exToDefault(exSupplier, StringConstants.EMPTY);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user