mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-11-10 17:04:33 +08:00
Merge branch 'master' into v2.6-better
This commit is contained in:
commit
c340e9e0b5
2 changed files with 7 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue