Skip to content

asyncCacheUse

jwpttcg66 edited this page Apr 18, 2017 · 3 revisions

异步缓存使用

使用例子

OrderService orderService = (OrderService) classPathXmlApplicationContext.getBean("orderService");
EntityAysncServiceProxyFactory entityAysncServiceProxyFactory = (EntityAysncServiceProxyFactory) classPathXmlApplicationContext.getBean("entityAysncServiceProxyFactory");
orderService = entityAysncServiceProxyFactory.createProxyService(orderService);

Order order = new Order();
order.setUserId(TestConstants.userId);
order.setId((long) i);
order.setStatus("测试插入" + i);
orderService.insertOrder(order);
Clone this wiki locally