mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-08 16:57:09 +08:00
chore: 优化部分代码
This commit is contained in:
@@ -42,7 +42,7 @@ import top.continew.starter.core.constant.PropertiesConstants;
|
||||
* @author Charles7c
|
||||
* @since 1.1.0
|
||||
*/
|
||||
@AutoConfiguration()
|
||||
@AutoConfiguration
|
||||
public class BehaviorCaptchaCacheAutoConfiguration {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(BehaviorCaptchaCacheAutoConfiguration.class);
|
||||
|
@@ -36,11 +36,11 @@ public class StrUtils {
|
||||
*
|
||||
* @param str 要转换的字符串
|
||||
* @param defaultValue 默认值
|
||||
* @param mapping 针对字符串的转换方法
|
||||
* @param mapper 针对字符串的转换方法
|
||||
* @return 转换后的字符串或指定的默认字符串
|
||||
* @since 2.0.1
|
||||
*/
|
||||
public static <T> T blankToDefault(CharSequence str, T defaultValue, Function<String, T> mapping) {
|
||||
return CharSequenceUtil.isBlank(str) ? defaultValue : mapping.apply(str.toString());
|
||||
public static <T> T blankToDefault(CharSequence str, T defaultValue, Function<String, T> mapper) {
|
||||
return CharSequenceUtil.isBlank(str) ? defaultValue : mapper.apply(str.toString());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user