Merge branch 'master' into v2.6-better

This commit is contained in:
devezhao 2021-10-25 22:16:47 +08:00
commit c340e9e0b5
2 changed files with 7 additions and 4 deletions

View file

@ -117,10 +117,10 @@ public class DataExporter extends SetUser {
boolean b = true;
for (String s : line) {
if (b) b = false;
else sb.append(", ");
else sb.append(",");
if (s.contains(",")) {
s = s.replace(",", "");
s = s.replace(",", ""); // 转义 ,
}
sb.append(s);
}

View file

@ -31,14 +31,17 @@ public interface UseRedis {
default boolean testJedisPool(JedisPool pool) {
if (pool == BootConfiguration.USE_EHCACHE) return false;
Jedis jedis = null;
try {
Jedis jedis = pool.getResource();
IOUtils.closeQuietly(jedis);
jedis = pool.getResource();
_log.debug("Use redis server : {}", jedis.info("server")); // test NOAUTH
return true;
} catch (Exception ex) {
_log.warn("Acquisition J/Redis failed : " + ThrowableUtils.getRootCause(ex).getLocalizedMessage()
+ " !!! falling back to EhCache");
return false;
} finally {
IOUtils.closeQuietly(jedis);
}
}