摘要: throws 关键字和 throw 关键字在使用上的几点区别如下 1 throws 用来声明一个方法可能抛出的所有异常信息,throw 则是指拋出的一个具体的异常类型。 2 通常在一个方法(类)的声明处通过 throws 声明方法(类)可能拋出的异常信息,而在方法(类)内部通过 throw 声明一个 阅读全文
posted @ 2019-12-15 18:12 liubosong 阅读(911) 评论(0) 推荐(1) 编辑
摘要: mac 遇到的问题 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 1 sudo mysql.server start 无法启动 2 mysqld 还是不行 ve 阅读全文
posted @ 2019-12-14 20:25 liubosong 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 说明 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-insta 阅读全文
posted @ 2019-12-13 14:16 liubosong 阅读(544) 评论(0) 推荐(0) 编辑
摘要: spring mvc 请求处理 package com.itstaredu.springmvc.handler; import com.itstaredu.springmvc.beans.User; import org.springframework.stereotype.Controller; 阅读全文
posted @ 2019-12-12 18:03 liubosong 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 1 读未提交 脏读 2 读已提交 不可重复读(读到的数据不重复,不一样了) 数量不变的修改 4 可重复读 幻读 数量增加或减少 8 串行化 阅读全文
posted @ 2019-12-11 17:38 liubosong 阅读(180) 评论(0) 推荐(0) 编辑
摘要: aop的底层可以理解就是个动态代理 代理才是核心 基于注解使用aspectJ 主要的作用是 为 切面中的通知 能够作用到的目标类 生成代理 aop 底层的实现 是代理 <aop:aspectj-autoproxy/> 这个配置 可以为 我们写的切面类里面的通知所作用到的类 创建添加代理 而不用我们自 阅读全文
posted @ 2019-12-10 17:32 liubosong 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1 日志代理 实现方式 1 实现接口 jdk动态代理 2 继承 Cglib、Javassist 动态代理 java的动态代理 -> python的装饰器 -> golang和python函数的闭包 package com.itstaredu.spring.aop.before; import jav 阅读全文
posted @ 2019-12-10 13:51 liubosong 阅读(135) 评论(0) 推荐(0) 编辑
摘要: alt + 鼠标左键 接口方法 ctrl + alt + 鼠标左键 实现类方法 阅读全文
posted @ 2019-12-10 10:19 liubosong 阅读(4082) 评论(0) 推荐(0) 编辑
摘要: 社会其实更希望一个人能稳定的度过每一个阶段最后成长。 初中 高中 大学 拿到学位 拿到工作。这些都很普通。 你要么按照这个步骤来做,要么你就是个异类。 如果你真的是一个异类,你很有可能会因此饱受指责。 阅读全文
posted @ 2019-12-09 19:31 liubosong 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 对于 监听器的使用 package com.itstaredu.bookstore.listener; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servle 阅读全文
posted @ 2019-12-08 17:48 liubosong 阅读(615) 评论(0) 推荐(0) 编辑