Java中可以使用String.format()方法替换字符串中的占位符。将log.error()方法改为以下形式即可:

log.error(String.format(">>>Current sharding upload failed, the sharding number is :%s", shardNumber));

Java中 logerrorCurrent sharding upload failed the sharding number is shardNumber; 用Stringformat怎么替换

原文地址: https://www.cveoy.top/t/topic/fjeZ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录