摘要: package com.itheima.utils;import org.springframework.context.ApplicationContext;import org.springframework.context.annotation.AnnotationConfigApplicat 阅读全文
posted @ 2020-10-14 21:00 尘缘01 阅读(146) 评论(0) 推荐(0) 编辑
摘要: execution(* *(..))execution(* *..*(..))execution(* *..*.*(..))execution(public * *..*.*(..))execution(public int *..*.*(..))execution(public void *..* 阅读全文
posted @ 2020-10-11 18:31 尘缘01 阅读(51) 评论(0) 推荐(0) 编辑
摘要: <bean class="com.aaa.beans.list.Student" id="student1" p:name="张三" p:age="18" p:grade-ref="grade" /> <!-- stu2 --> <bean class="com.aaa.beans.list.Stu 阅读全文
posted @ 2020-10-10 16:01 尘缘01 阅读(247) 评论(0) 推荐(0) 编辑
摘要: Statement和PreparedStatement都是用于执行SQL语句的句柄,但是PreparedStatement代表的是一个预编译的SQL。这两种对象的区别主要体现在以下的三个方面: 第一是使用方面的区别,statement执行的SQL语句必须是一个完整的SQL,而对于PreparedSt 阅读全文
posted @ 2020-10-10 08:43 尘缘01 阅读(534) 评论(0) 推荐(0) 编辑
摘要: 1、未提交读。 最低的隔离级别(是一种危险的隔离级别,会出现脏读),其含义是允许一个事务读取另外一个事务没有提交的数据。 T2时刻中事务1中扣减了库存,T3时刻中事务2也扣减了库存,但是它也读取到了T2时刻中事务1的操作,因此T3时刻扣减后库存为0,这个时候T5在提交事务后事务1进行回滚,因为第一类 阅读全文
posted @ 2020-10-10 08:41 尘缘01 阅读(862) 评论(0) 推荐(0) 编辑
摘要: <!--引入配置文件--><context:property-placeholder location="classpath:jdbc.properties"/><!--搞定drui--><bean id="dataSource" class="com.alibaba.druid.pool.Drui 阅读全文
posted @ 2020-10-09 15:35 尘缘01 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 引入依赖 spring-webmvc 控制反转 让spring管理对象的创建 依赖注入 创建对象的同时给成员变量赋值 property name ref 引用,类型 property name value 基本类型 简单啊 创建spring 核心容器对象 获取容器中的bean 对象 阅读全文
posted @ 2020-10-08 20:20 尘缘01 阅读(98) 评论(0) 推荐(0) 编辑
摘要: <resource> <directory>src/main/resources</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering> 阅读全文
posted @ 2020-10-07 19:17 尘缘01 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 在做web案例的时候 由于创建了多个servlet 每个servlet都会创建一个SQLSession 一个SQLSession注重于查询 每次都会查询 所以走的是缓存 而这个时候 其他的SQLSession增删改 并不能影响查询的SQLSession 解决方案 getMapper那里加一个stat 阅读全文
posted @ 2020-09-29 09:24 尘缘01 阅读(223) 评论(0) 推荐(0) 编辑
摘要: public staticT getSqlSession(Class clz)throws IOException { InputStream is = Resources.getResourceAsStream("MyBatisConfig.xml"); SqlSessionFactory fac 阅读全文
posted @ 2020-09-28 18:05 尘缘01 阅读(431) 评论(0) 推荐(0) 编辑