MyBatis是一个半ORM框架,它内部封装了JDBC,开发的时候只需要关注SQL语句本身就可以了,我们不需要花太多精力去处理原生的JDBC那一套流程,比如 加载驱动、创建connection连接、创建statement、创建SqlSesssionFactory、创建SQLSession等一系列比较 ...
分类:
其他好文 时间:
2021-04-30 12:12:11
阅读次数:
0
最近碰到一个奇怪问题,调用第三方接口时,返回{resultCode=INVALID_PARAMETER, resultMsg=too long time span between now and req_time}, 参数异常,请求时间离现在时间太久. 于是把参数打印出来,一切正常,参数也就一个流程 ...
分类:
其他好文 时间:
2021-04-30 12:08:57
阅读次数:
0
Mybatis入门 MyBatis和Hibernate一样,是一个优秀的持久层框架。已经说过很多次了,原生的jdbc操作存在大量的重复性代码(如注册驱动,创建连接,创建statement,结果集检测等)。框架的作用就是把这些繁琐的代码封装,这样可以让程序员专注于sql语句本身。 MyBatis通过X ...
分类:
其他好文 时间:
2021-04-29 11:51:02
阅读次数:
0
#include <bits/stdc++.h> typedef unsigned long long ll; const ll P=1331; using namespace std; ll hash1[1000000],u[1000000]; ll get(int l,int r){ retur ...
分类:
其他好文 时间:
2021-04-27 15:00:27
阅读次数:
0
#是占位符 $是字符串替换 会为参数自动拼接引号 不会自动拼接引号 #是preparedstatement 的set方法实现的 ¥是statement 实现的 PreparedStatement是预编译的,对于批量处理可以 大大提高效率. 也叫JDBC存储过程 使用 Statement 对象。在对数 ...
分类:
其他好文 时间:
2021-04-27 15:00:09
阅读次数:
0
#include <iostream> #include <stack> #include <cstring> #include <unordered_map> using namespace std; typedef long long ll; stack<int>num; stack<char> ...
分类:
其他好文 时间:
2021-04-27 14:59:52
阅读次数:
0
ESLint模式下for in遍历对象会报错,可以这样解决: let val = { shu: [1, 2, 3] }; for (let item in val) { if (val.hasOwnProperty(item)) { console.log(item); } } 因为我们在遍历一个对 ...
分类:
移动开发 时间:
2021-04-27 14:25:28
阅读次数:
0
今天我来分享一下如何利用素数分解定理求解与n互质的数的个数。 下面是代码 #include<bits/stdc++.h> using namespace std; long long fun(int x) { long long ans=x; int t=sqrt(x); int cnt; for( ...
分类:
其他好文 时间:
2021-04-26 14:12:06
阅读次数:
0
1. 判断是否是基础数据类型 /** * 判断是否是基础数据类型,即 int,double,long等类似格式 */ public static boolean isCommonDataType(Class clazz){ return clazz.isPrimitive(); } 2、 判断是否是 ...
分类:
其他好文 时间:
2021-04-26 13:54:00
阅读次数:
0
作用:自动生成模板代码和实体类,简化开发人员工作,降低错误率。 1.entity ##导入宏定义 $!define ##保存文件(宏定义) #save("/entity", ".java") ##包路径(宏定义) #setPackageSuffix("entity") ##自动导入包(全局变量) $ ...
分类:
其他好文 时间:
2021-04-26 13:23:45
阅读次数:
0