| 1 | <aop:config> |
---|
| 2 | |
---|
| 3 | <aop:aspect ref="audience"> |
---|
| 4 | |
---|
| 5 | <aop:before pointcut="" method="takeSeats"/> |
---|
| 6 | |
---|
| 7 | <aop:before pointcut="" method="turnOffCellPhones"/> |
---|
| 8 | |
---|
| 9 | <aop:after-returning pointcut="" method="applaud"/> |
---|
| 10 | |
---|
| 11 | <aop:after-throwing pointcut="" method="demandRefund"/> |
---|
| 12 | |
---|
| 13 | </aop:aspect> |
---|
| 14 | |
---|
| 15 | </aop:config> |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | <bean id="audience" class="com.springinactin.springidol.Audience"/> |
---|
| 19 | |
---|
| 20 | public class Audience{ |
---|
| 21 | |
---|
| 22 | //공연 전 |
---|
| 23 | public void takeSeats(){ |
---|
| 24 | |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | //공연 전 |
---|
| 28 | public void turnOffCellPhones(){ |
---|
| 29 | |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | //공연 후 |
---|
| 33 | public void applaud(){ |
---|
| 34 | |
---|
| 35 | } |
---|
| 36 | |
---|
| 37 | //공연 실패 후 |
---|
| 38 | public void demandRefund(){ |
---|
| 39 | |
---|
| 40 | } |
---|
| 41 | } |