添加rocksdb初始化代码 #2

Merged
zeekling merged 2 commits from rosksdb into main 2023-09-16 16:36:00 +00:00
3 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1 @@
package com.zeekling.cn;

View File

@ -0,0 +1,15 @@
package com.zeekling.cn.rocksdb;
import org.junit.Test;
import org.rocksdb.RocksDB;
public class RocksDbLoadTest {
@Test
public void rocksdbLoad() {
RocksDB.loadLibrary();
RocksDB.Version version = RocksDB.rocksdbVersion();
System.out.println(version);
}
}

View File

@ -0,0 +1,16 @@
package com.zeekling.cn.string;
import org.junit.Assert;
import org.junit.Test;
public class RegexTest {
@Test
public void testRegex() {
String regex = "test//";
String replaceAll = regex.replaceAll("[^a-zA-Z0-9\\-]", "_");
Assert.assertTrue("test__".equalsIgnoreCase(replaceAll));
System.out.println(replaceAll);
}
}