1.split使用特殊符号拆分需要添加转义字符
public static void main(String[] args) {
String name = "Prometheus.png";
String[] split = name.split("\\.");
System.out.println("split[0] = " + split[0]);
System.out.println("split[1] = " + split[1]);
}
2.pg数据库新建序列并且设置主键自增
1、先建序列
create sequence 表名_id_seq start with 1 increment by 1 no minvalue no maxvalue cache 1;
语句解释
start with 1 --- 从1开始
increment by