chore: 优化部分代码

This commit is contained in:
2024-05-20 22:57:13 +08:00
parent 1faa46e125
commit 9bee01baa3
2 changed files with 4 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ import top.continew.starter.core.constant.PropertiesConstants;
* @author Charles7c * @author Charles7c
* @since 1.1.0 * @since 1.1.0
*/ */
@AutoConfiguration() @AutoConfiguration
public class BehaviorCaptchaCacheAutoConfiguration { public class BehaviorCaptchaCacheAutoConfiguration {
private static final Logger log = LoggerFactory.getLogger(BehaviorCaptchaCacheAutoConfiguration.class); private static final Logger log = LoggerFactory.getLogger(BehaviorCaptchaCacheAutoConfiguration.class);

View File

@@ -36,11 +36,11 @@ public class StrUtils {
* *
* @param str 要转换的字符串 * @param str 要转换的字符串
* @param defaultValue 默认值 * @param defaultValue 默认值
* @param mapping 针对字符串的转换方法 * @param mapper 针对字符串的转换方法
* @return 转换后的字符串或指定的默认字符串 * @return 转换后的字符串或指定的默认字符串
* @since 2.0.1 * @since 2.0.1
*/ */
public static <T> T blankToDefault(CharSequence str, T defaultValue, Function<String, T> mapping) { public static <T> T blankToDefault(CharSequence str, T defaultValue, Function<String, T> mapper) {
return CharSequenceUtil.isBlank(str) ? defaultValue : mapping.apply(str.toString()); return CharSequenceUtil.isBlank(str) ? defaultValue : mapper.apply(str.toString());
} }
} }