This commit is contained in:
罗祥
2018-12-28 18:01:03 +08:00
parent 38eebc98ae
commit 3cda29d3b9
16 changed files with 575 additions and 0 deletions

View File

@ -0,0 +1,35 @@
package com.heibaiying.aop;
import com.heibaiying.config.AopConfig;
import com.heibaiying.service.OrderService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;
/**
* @author : heibaiying
* @description : 关于多个切面在同一个切入点上执行顺序的例子 可以在spring-aop-annotation 中查看
*/
@RunWith(SpringRunner.class)
@ContextConfiguration(classes = AopConfig.class)
public class AopTest {
@Autowired
private OrderService orderService;
@Test
public void saveAndQuery() {
orderService.createOrder(1283929319L, "手机");
//orderService.queryOrder(4891894129L);
}
@Test
public void delete() {
orderService.deleteOrder(12793179L);
}
}