
javaweb
文章平均质量分 74
boat824109722
这个作者很懒,什么都没留下…
展开
-
ajax跨域cors请求拦截器
/** * @Description: ajax跨域cors请求拦截器 * @author boat * @date 2015年11月6日 上午11:30:36 * @version V1.0 */public class CorsInterceptor implements HandlerInterceptor { @Override public boolean preHa原创 2017-12-20 16:37:12 · 2289 阅读 · 0 评论 -
springboot druid 数据库批量更新错误 multi-statement not allow
springboot druid 数据库多SQL错误 multi-statement not allowCaused by: java.sql.SQLException: sql injection violation, multi-statement not allow com.alibaba.druid.wall.WallFilter.check(WallFilter.java:714原创 2017-12-20 09:11:11 · 3076 阅读 · 0 评论 -
Oauth2单点登录
OAuth 2.0是一种设计思路,不是一个框架Oauth2的4种模式:1、授权码模式(获取code、code换取access_token)2、简化模式(直接换取access_token,基本不用)3、密码模式(客户端像用户索取账号密码,然后客户端向服务端索取授权,基本不用)4、客户端模式(客户端以自己的名义要求"服务提供商"提供服务;场景:提供接口服务)Oa原创 2017-12-21 09:49:27 · 25452 阅读 · 4 评论 -
mysql批量执行Sql,批量插入
/*** 批量执行sql* * @param sqls*/public void batchExecute(String[] sqls) { Connection connection = null; Statement statement = null; try { connection = dataSource.getConnection(); boolean auto原创 2018-01-22 16:08:56 · 2224 阅读 · 0 评论 -
代码执行时间计算
long starTime=System.currentTimeMillis();//要执行的代码,例如批量插入10万条数据long endTime=System.currentTimeMillis();long Time=endTime-starTime;System.out.println(Time);备注:循环多次求平均值更准确原创 2018-01-18 15:58:02 · 286 阅读 · 0 评论