随笔分类 -  java

摘要:缺点 需要另外同步表结构到目标数据库 代码 import java.sql.*; public class EsqTableController { public static void main(String[] args) throws SQLException { migrateData(); 阅读全文
posted @ 2023-02-14 10:17 黒马 阅读(957) 评论(0) 推荐(0)
摘要:匹配符 [] 单字符匹配限定, 例如 [1234]能匹配的字符有1,2,3,4; [^] 单字符匹不配限定, 例如 [^1234]能匹配的字符除了1,2,3,4都可以 . 任意字符匹配, 除了\n - 连续匹配, 例如 [1-9]能匹配的字符有1,2,3,4,5,6,7,8,9 \\d 匹配数字同[ 阅读全文
posted @ 2022-12-06 22:57 黒马 阅读(24) 评论(0) 推荐(0)
摘要:构成 // 1. 匹配规则 Pattern compile = Pattern.compile("匹配规则"); // 2. 构成构造器 Matcher matcher = compile.matcher("指定的字符串"); // 3. 查询方法 boolean flag = matcher.fi 阅读全文
posted @ 2022-12-05 22:48 黒马 阅读(27) 评论(0) 推荐(0)
摘要:问题 springboot项目, 本地开发测试时是可以获取到模板文件, 但打成jar包部署后报错文件不存在 为什么 因为jar包是一个单独的文件而非文件夹,绝对不可能通过"file:/e:/.../ResourceJar.jar/resource /res.txt"这种形式的文件URL来定位res. 阅读全文
posted @ 2021-07-29 13:48 黒马 阅读(666) 评论(0) 推荐(0)