2018年10月26日

Error updating database. Cause:java.sql.SQLException: Lock wait timeout exceeded; try restartingtransaction

摘要: select * from information_schema.innodb_trx查看 trx_mysql_thread_id show processlist kill 100070; 引起的问题:并发下spring事务造成了死锁。 为什么会造成死锁呢? start transaction;u 阅读全文

posted @ 2018-10-26 18:57 一个很帅的男人 阅读(2046) 评论(0) 推荐(0) 编辑

2018年10月24日

docker环境下的rabbitmq安装

摘要: 1,docker run -d --hostname my-rabbit --name some-rabbit -e RABBITMQ_DEFAULT_USER=user -e RABBITMQ_DEFAULT_PASS=password -p 9091:5672 -p 15672:15672 ra 阅读全文

posted @ 2018-10-24 11:17 一个很帅的男人 阅读(154) 评论(0) 推荐(0) 编辑

2018年9月30日

tomcat容器与spring容器和spring mvc框架的关系流程

摘要: 1.tomcat容器结构 阅读全文

posted @ 2018-09-30 14:57 一个很帅的男人 阅读(1625) 评论(0) 推荐(0) 编辑

2018年9月26日

spring 解析bean

摘要: ** * Parse the elements at the root level in the document: * "import", "alias", "bean". * @param root the DOM root element of the document */ protected void parseBeanDefinitio... 阅读全文

posted @ 2018-09-26 16:21 一个很帅的男人 阅读(135) 评论(0) 推荐(0) 编辑

2018年9月21日

Spring Cloud

摘要: 1.spring cloud概论 Spring Cloud Netflix :Eureka服务中心、Hystrix(熔断器)、Zuul(路由拦截)、Archaius(配置管理)… Spring Cloud Config Spring Cloud Bus 2. 阅读全文

posted @ 2018-09-21 17:37 一个很帅的男人 阅读(84) 评论(0) 推荐(0) 编辑

2018年9月17日

Spring

摘要: 1.spring的体系结构:五部分:test,core,aop,data access,web. https://blog.csdn.net/u012075383/article/details/53837695 2.spring的ioc原理 http://www.360doc.com/conten 阅读全文

posted @ 2018-09-17 11:53 一个很帅的男人 阅读(140) 评论(0) 推荐(0) 编辑

2018年9月8日

JDK动态代理源码实现深入分析

摘要: 恢复内容开始 谈一谈JDK动态代理学习的一些坑,基于JDK8。 先来看一下JDK的动态是怎么用的。 执行结果如下: before add after 首先来看一下JDK是怎样生成代理对象的。既然生成代理对象是用的Proxy类的静态方newProxyInstance,那么我们就去它的源码里看一下它到底 阅读全文

posted @ 2018-09-08 18:18 一个很帅的男人 阅读(117) 评论(0) 推荐(0) 编辑

2017年9月28日

一个很坑的问题,button 的onclick方法失效了

摘要: 还好f12调试给力,发现是方法中出现了编译错误,字符串没有被“”“”包围,导致了,onclick方法失效。 还有一个前端比较坑的:<button type="button"> 不这样写,再加上点击事件就直接把表单提交了,很是坑。 阅读全文

posted @ 2017-09-28 16:38 一个很帅的男人 阅读(669) 评论(0) 推荐(0) 编辑

2017年9月5日

web总结

摘要: 一,web.xml的加载过程:当我们启动一个web项目时,容器(Tomcat)会首先读取web.xml,如果web.xml没有错,项目就会正常的起来。 1,容器首先回去web.xml读取他的两个节点, <listener></listener>和<context-param></context-pa 阅读全文

posted @ 2017-09-05 17:07 一个很帅的男人 阅读(89) 评论(0) 推荐(0) 编辑

2017年8月31日

字符串编码

摘要: public static String getEncoding(String str) { String encode = "GB2312"; try { if (str.equals(new String(str.getBytes(encode), encode))) { //判断是不是GB23 阅读全文

posted @ 2017-08-31 16:38 一个很帅的男人 阅读(129) 评论(0) 推荐(0) 编辑

导航