摘要: 阅读全文
posted @ 2023-01-25 14:58 LaViez 阅读(14) 评论(0) 推荐(0)
摘要: Listener 监听 xxx 对象的 xxx 过程 ServletContextListener 监听ServletContext对象的创建与销毁 | 方法名 | 作用 | | : : | : : | | contextInitialized(ServletContextEvent sce) | 阅读全文
posted @ 2023-01-25 14:38 LaViez 阅读(26) 评论(0) 推荐(0)
摘要: ThreadLocal 线程本地变量,常用方法 get() set(obj),通过 set 方法在当前线程上存储数据,通过 get 方法在当前线程中获取数据 set 方法源码分析 public void set(T value) { Thread t = Thread.currentThread() 阅读全文
posted @ 2023-01-25 11:22 LaViez 阅读(31) 评论(0) 推荐(0)
摘要: 事务管理 什么是事务? try{ setAutoCommit(false); 事务操作... commit(); }catch(Exception e){ rollback(); } 目的是为了事务操作结果的一致性,事务操作中的所有操作必须同时成功,否则所有操作都回滚。 1 - DAO层进行事务管理 阅读全文
posted @ 2023-01-25 10:53 LaViez 阅读(72) 评论(0) 推荐(0)