后端
火鸡味锅巴。
这个作者很懒,什么都没留下…
展开
-
反射获取集合中范型的具体类型
private static List<String> arr = new ArrayList<>(); public static void main(String[] args) throws Exception { Class<本类> aClass = 本类.class; //通过反射获取arr属性 Field arr1 = aClass.getDeclaredField("arr"); //通过属性获取泛型 Type generi原创 2022-03-02 10:59:13 · 469 阅读 · 0 评论 -
PostgreSQL跨库--postgres_fdw
新建postgres_fdw插件 create extension postgres_fdw; 新建远程数据库服务器。 连接自身跨库操作时,host请填写localhost,port请填写show port命令返回的本地端口 CREATE SERVER NxDocExchange_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS ( HOST 'localhost', port '3034', dbname'Wangda_NxDocExchange'.原创 2022-02-24 11:01:01 · 840 阅读 · 0 评论 -
java8 ConcurrentHashMap的computeIfAbsent方法的性能问题
If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map unless {@code null}. The entire method invocation is performed atomically, so the function is applied a原创 2021-04-25 10:10:28 · 1033 阅读 · 0 评论 -
一些算法模板
并查集 class UnionFind{ int[] p; UnionFind(int num){ //方便数组操作 for(int i=0;i<=num;i++){ p[i]=i; } } int find(int x){ //递归 将每个元素指向最终的老大,缩短路径 if(p[x]!=x) p[x]=find(p[x]); return p[原创 2021-03-07 16:56:56 · 82 阅读 · 0 评论 -
java8日期类
java8日期类 LocalDate now = LocalDate.now(); System.out.println("今天:"+now); int year = now.getYear(); int month = now.getMonthValue(); int dayOfMonth = now.getDayOfMonth(); DayOfWeek dayOfWeek = now.getDayOfWeek(); System.out.println(year+"年"+month+"月"+dayOfM原创 2021-02-04 11:02:01 · 67 阅读 · 0 评论 -
poi IFERROR的使用记录
poi IFERROR的使用记录 使用poi导出excel使用了iferror,但是导出的excel中显示iferror公式处为#NAME?,双击编辑后公式生效 百度查找使用 sheet.setForceFormulaRecalculation(true); 但是并未生效 百般查找后终于找到了根源问题 Apache poi's HSSF produces *.xls files in binary BIFF format of Excel 97 - 2003. But the IFERROR funct原创 2021-02-01 15:37:04 · 361 阅读 · 0 评论 -
sql记录
将动态列值作为表头 SELECT CONCAT( 'SELECT `v_sys_user`.id', GROUP_CONCAT(' , `t_', REPLACE(name, '`', '``'), '`.roleName AS `', REPLACE(name, '`', '``'), '`' SEPARATOR ''), ' FROM `v_sys_user` ', GROUP_CONCAT(' LEFT JOIN `v_sys_user`原创 2020-07-03 09:52:38 · 99 阅读 · 0 评论 -
git操作
合并 git merge 变基 将当前分支的提交复制到指定的分支之上。 gir rebase 交互式变基 在我们正在 rebase 的提交上,我们可以执行以下 6 个动作: reword:修改提交信息; edit:修改此提交; squash:将提交融合到前一个提交中; fixup:将提交融合到前一个提交中,不保留该提交的日志消息; exec:在每个提交上运行我们想要 rebase 的命令; drop:移除该提交 重置 git reset 默认 git reset --.原创 2020-07-03 09:53:50 · 143 阅读 · 0 评论 -
Docker
Docker 由镜像(Image)、容器(Container)、仓库(Repository) 三部分组成。 docker安装 卸载旧版本 sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \原创 2020-08-08 09:09:39 · 78 阅读 · 0 评论