File tree Expand file tree Collapse file tree 13 files changed +20
-16
lines changed
spring-aop/src/main/resources/com/brianway/learning/spring/aop
spring-ioc/src/main/resources/com/brianway/learning/spring/ioc Expand file tree Collapse file tree 13 files changed +20
-16
lines changed Original file line number Diff line number Diff line change 3
3
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
4
xmlns : p =" http://www.springframework.org/schema/p"
5
5
xsi : schemaLocation =" http://www.springframework.org/schema/beans
6
- http://www.springframework.org/schema/beans/spring-beans-3.0 .xsd" >
6
+ http://www.springframework.org/schema/beans/spring-beans-4.2 .xsd" >
7
7
8
8
<bean id =" greetingBefore" class =" com.brianway.learning.spring.aop.advice.GreetingBeforeAdvice" />
9
9
<bean id =" greetingAfter" class =" com.brianway.learning.spring.aop.advice.GreetingAfterAdvice" />
Original file line number Diff line number Diff line change 3
3
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
4
xmlns : p =" http://www.springframework.org/schema/p"
5
5
xsi : schemaLocation =" http://www.springframework.org/schema/beans
6
- http://www.springframework.org/schema/beans/spring-beans-3.0 .xsd" >
6
+ http://www.springframework.org/schema/beans/spring-beans-4.2 .xsd" >
7
7
8
8
<!-- 普通方法名匹配切面 -->
9
9
<bean id =" waiterTarget" class =" com.brianway.learning.spring.aop.advisor.Waiter" />
Original file line number Diff line number Diff line change 2
2
<beans xmlns =" http://www.springframework.org/schema/beans"
3
3
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
4
xmlns : aop =" http://www.springframework.org/schema/aop"
5
- xsi : schemaLocation =" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
6
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd" >
5
+ xsi : schemaLocation =" http://www.springframework.org/schema/beans
6
+ http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
7
+ http://www.springframework.org/schema/aop
8
+ http://www.springframework.org/schema/aop/spring-aop-3.0.xsd" >
7
9
8
10
<!-- 基于@Aspect切面的驱动器 -->
9
11
<aop : aspectj-autoproxy />
Original file line number Diff line number Diff line change 3
3
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
4
xmlns : p =" http://www.springframework.org/schema/p"
5
5
xsi : schemaLocation =" http://www.springframework.org/schema/beans
6
- http://www.springframework.org/schema/beans/spring-beans-3.0 .xsd" >
6
+ http://www.springframework.org/schema/beans/spring-beans-4.2 .xsd" >
7
7
8
8
<bean id =" waiter" class =" com.brianway.learning.spring.aop.advisor.Waiter" />
9
9
<bean id =" seller" class =" com.brianway.learning.spring.aop.advisor.Seller" />
Original file line number Diff line number Diff line change 3
3
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
4
xmlns : p =" http://www.springframework.org/schema/p"
5
5
xsi : schemaLocation =" http://www.springframework.org/schema/beans
6
- http://www.springframework.org/schema/beans/spring-beans-3.0 .xsd" >
6
+ http://www.springframework.org/schema/beans/spring-beans-4.2 .xsd" >
7
7
8
8
<bean id =" greetingAdvice" class =" com.brianway.learning.spring.aop.advisor.GreetingBeforeAdvice" />
9
9
Original file line number Diff line number Diff line change 2
2
<beans xmlns =" http://www.springframework.org/schema/beans"
3
3
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xmlns : p =" http://www.springframework.org/schema/p"
4
4
xsi : schemaLocation =" http://www.springframework.org/schema/beans
5
- http://www.springframework.org/schema/beans/spring-beans-3.0 .xsd" >
5
+ http://www.springframework.org/schema/beans/spring-beans-4.2 .xsd" >
6
6
7
7
<bean id =" pmonitor" class =" com.brianway.learning.spring.aop.introduce.ControllablePerformaceMonitor" />
8
8
<bean id =" forumServiceTarget" class =" com.brianway.learning.spring.aop.introduce.ForumService" />
Original file line number Diff line number Diff line change 3
3
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
4
xmlns : context =" http://www.springframework.org/schema/context"
5
5
xsi : schemaLocation =" http://www.springframework.org/schema/beans
6
- http://www.springframework.org/schema/beans/spring-beans-3.0 .xsd
6
+ http://www.springframework.org/schema/beans/spring-beans-4.2 .xsd
7
7
http://www.springframework.org/schema/context
8
- http://www.springframework.org/schema/context/spring-context-3.0 .xsd"
8
+ http://www.springframework.org/schema/context/spring-context-4.2 .xsd"
9
9
>
10
10
<context : component-scan base-package =" com.brianway.learning.spring.ioc.annotation" />
11
11
Original file line number Diff line number Diff line change 2
2
<beans xmlns =" http://www.springframework.org/schema/beans"
3
3
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
4
xsi : schemaLocation =" http://www.springframework.org/schema/beans
5
- http://www.springframework.org/schema/beans/spring-beans-3.0 .xsd" >
5
+ http://www.springframework.org/schema/beans/spring-beans-4.2 .xsd" >
6
6
7
7
<bean id =" car" class =" com.brianway.learning.spring.ioc.attr.Car" lazy-init =" default" >
8
8
<property name =" brand" >
Original file line number Diff line number Diff line change 2
2
<beans xmlns =" http://www.springframework.org/schema/beans"
3
3
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
4
xsi : schemaLocation =" http://www.springframework.org/schema/beans
5
- http://www.springframework.org/schema/beans/spring-beans-3.0 .xsd" >
5
+ http://www.springframework.org/schema/beans/spring-beans-4.2 .xsd" >
6
6
7
7
<bean id =" car" class =" com.brianway.learning.spring.ioc.attr.Car" >
8
8
<property name =" maxSpeed" value =" 200" />
Original file line number Diff line number Diff line change 2
2
<beans xmlns =" http://www.springframework.org/schema/beans"
3
3
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
4
xsi : schemaLocation =" http://www.springframework.org/schema/beans
5
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" >
5
+ http://www.springframework.org/schema/beans/spring-beans-4.2.xsd" >
6
+
6
7
<bean id =" car" class =" com.brianway.learning.spring.ioc.attr.Car" >
7
8
<property name =" brand" value =" 吉利CT5" />
8
9
<property name =" maxSpeed" value =" 100" />
9
10
<property name =" price" value =" 1000.00" />
10
11
</bean >
12
+
11
13
<bean id =" boss" class =" com.brianway.learning.spring.ioc.attr.Boss" >
12
14
<property name =" car" >
13
15
<ref parent =" car" />
You can’t perform that action at this time.
0 commit comments