diff --git a/.idea/$CACHE_FILE$ b/.idea/$CACHE_FILE$
new file mode 100644
index 00000000..b3418529
--- /dev/null
+++ b/.idea/$CACHE_FILE$
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Android
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 00000000..5c98b428
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,2 @@
+# Default ignored files
+/workspace.xml
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 00000000..c2bae49d
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 00000000..9b6c85f8
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/java.iml b/.idea/java.iml
new file mode 100644
index 00000000..d6ebd480
--- /dev/null
+++ b/.idea/java.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 00000000..28a804d8
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 00000000..a127731f
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 00000000..35eb1ddf
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/javaframework/spring/07SpringAOP\347\232\204\350\257\246\347\273\206\350\256\262\350\247\2432/spring_aop_study/spring_aop_tx (1).iml" "b/javaframework/spring/07SpringAOP\347\232\204\350\257\246\347\273\206\350\256\262\350\247\2432/spring_aop_study/spring_aop_tx (1).iml"
new file mode 100644
index 00000000..72bbca94
--- /dev/null
+++ "b/javaframework/spring/07SpringAOP\347\232\204\350\257\246\347\273\206\350\256\262\350\247\2432/spring_aop_study/spring_aop_tx (1).iml"
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/javaframework/spring/07SpringAOP\347\232\204\350\257\246\347\273\206\350\256\262\350\247\2432/spring_aop_tx/spring_aop_tx.iml" "b/javaframework/spring/07SpringAOP\347\232\204\350\257\246\347\273\206\350\256\262\350\247\2432/spring_aop_tx/spring_aop_tx.iml"
index 78b2cc53..8761fb7f 100644
--- "a/javaframework/spring/07SpringAOP\347\232\204\350\257\246\347\273\206\350\256\262\350\247\2432/spring_aop_tx/spring_aop_tx.iml"
+++ "b/javaframework/spring/07SpringAOP\347\232\204\350\257\246\347\273\206\350\256\262\350\247\2432/spring_aop_tx/spring_aop_tx.iml"
@@ -1,2 +1,47 @@
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/06Spring\345\216\237\347\220\206\350\256\262\350\247\243.md" "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/06Spring\345\216\237\347\220\206\350\256\262\350\247\243.md"
index 88f9ea80..ce1add25 100644
--- "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/06Spring\345\216\237\347\220\206\350\256\262\350\247\243.md"
+++ "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/06Spring\345\216\237\347\220\206\350\256\262\350\247\243.md"
@@ -60,7 +60,7 @@
### 6、BeanFactory和ApplicationContext的异同
-
+
相同:
@@ -79,7 +79,7 @@
### 7、Spring Bean 的生命周期?
-
+
总结:
@@ -167,7 +167,7 @@
### 10、Spring 的不同事务传播行为有哪些,干什么用的?
-
+
### 11、Spring 中用到了那些设计模式?
diff --git "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/main/java/com/mashibing/service/BookService.java" "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/main/java/com/mashibing/service/BookService.java"
index ba5fcaa8..67279e1a 100644
--- "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/main/java/com/mashibing/service/BookService.java"
+++ "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/main/java/com/mashibing/service/BookService.java"
@@ -31,7 +31,7 @@ public class BookService {
* rollBackfor:
* rollbackForClassName
* */
- @Transactional(propagation = Propagation.REQUIRES_NEW)
+ @Transactional(propagation = Propagation.REQUIRED)
public void buyBook() {
bookDao.getPrice(1);
bookDao.updateBalance("zhangsan", 100);
@@ -48,6 +48,8 @@ public void updatePrice() {
@Transactional
public void mult() {
buyBook();
+
+ System.out.println("---------------------------");
updatePrice();
}
}
diff --git "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/main/java/com/mashibing/service/MultService.java" "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/main/java/com/mashibing/service/MultService.java"
index 87ce4bb3..7259bc5e 100644
--- "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/main/java/com/mashibing/service/MultService.java"
+++ "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/main/java/com/mashibing/service/MultService.java"
@@ -12,14 +12,15 @@ public class MultService {
@Transactional
public void mult(){
+// bookService.buyBook();
try {
bookService.buyBook();
} catch (Exception e) {
- e.printStackTrace();
+// e.printStackTrace();
}
System.out.println("----------");
bookService.updatePrice();
- int i = 1/0;
+// int i = 1/0;
}
// @Transactional
diff --git "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/main/resources/db.properties" "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/main/resources/db.properties"
index 6a5136c5..69089fdc 100644
--- "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/main/resources/db.properties"
+++ "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/main/resources/db.properties"
@@ -1,4 +1,4 @@
jdbc.username=root
-jdbc.password=123456
+jdbc.password=root
jdbc.url=jdbc:mysql://localhost:3306/tx
jdbc.driverName=com.mysql.jdbc.Driver
\ No newline at end of file
diff --git "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/test/java/MyTest3.java" "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/test/java/MyTest3.java"
index 4d7aceda..4db59969 100644
--- "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/test/java/MyTest3.java"
+++ "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/src/test/java/MyTest3.java"
@@ -10,10 +10,10 @@ public class MyTest3 {
@Test
public void test01() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
-// MultService bean = context.getBean(MultService.class);
-// bean.mult();
-// bean.buyBook();
- BookService bean = context.getBean(BookService.class);
+ MultService bean = context.getBean(MultService.class);
bean.mult();
+// bean.buyBook();
+// BookService bean = context.getBean(BookService.class);
+// bean.mult();
}
}
diff --git "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/classes/com/mashibing/service/BookService.class" "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/classes/com/mashibing/service/BookService.class"
index 926b1ef5..31973e6a 100644
Binary files "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/classes/com/mashibing/service/BookService.class" and "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/classes/com/mashibing/service/BookService.class" differ
diff --git "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/classes/com/mashibing/service/MultService.class" "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/classes/com/mashibing/service/MultService.class"
index 66a0fc3a..18288639 100644
Binary files "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/classes/com/mashibing/service/MultService.class" and "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/classes/com/mashibing/service/MultService.class" differ
diff --git "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/classes/db.properties" "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/classes/db.properties"
index 6a5136c5..69089fdc 100644
--- "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/classes/db.properties"
+++ "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/classes/db.properties"
@@ -1,4 +1,4 @@
jdbc.username=root
-jdbc.password=123456
+jdbc.password=root
jdbc.url=jdbc:mysql://localhost:3306/tx
jdbc.driverName=com.mysql.jdbc.Driver
\ No newline at end of file
diff --git "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/test-classes/MyTest3.class" "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/test-classes/MyTest3.class"
index 0bd21f5a..4ae4539f 100644
Binary files "a/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/test-classes/MyTest3.class" and "b/javaframework/spring/08Spring\346\272\220\347\240\201\350\256\262\350\247\243/spring_aop_tx/target/test-classes/MyTest3.class" differ
diff --git "a/javaframework/springmvc/03SpringMVC\347\232\204\345\237\272\346\234\254\344\275\277\347\224\2502/springmvc_response/springmvc_response.iml" "b/javaframework/springmvc/03SpringMVC\347\232\204\345\237\272\346\234\254\344\275\277\347\224\2502/springmvc_response/springmvc_response.iml"
deleted file mode 100644
index cf17af26..00000000
--- "a/javaframework/springmvc/03SpringMVC\347\232\204\345\237\272\346\234\254\344\275\277\347\224\2502/springmvc_response/springmvc_response.iml"
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file