mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 08:57:17 +08:00
chore: 优化部分代码
This commit is contained in:
@@ -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);
|
||||||
|
@@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user