云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > spring--day02笔记

spring--day02笔记

  • 62 次阅读
  • 3 次下载
  • 2025/7/8 12:07:46

配置例如: 1.6.4.4 测试

@Test public void demo01(){ String xmlPath = \; ApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlPath); CategoryService categoryService = applicationContext.getBean(\,CategoryService.class); categoryService.addCategory(); categoryService.updateCategory(); } 1.6.4.5 JoinPoint介绍

1.7 aop aspectJ 基于 注解 1.7.1 spring注解

@Service //取代:

@Aspect 用于配置切面 @Before 前置通知

@AfterReturning 后置通知 @Around 环绕前

@AfterThrowing 抛出异常通知 @After 最终

@Pointcut ,将注解类中 切入点共享 共享表达式,添加到一个特殊的方法上,私有,没有返回值,方法名称自定义 使用时,在注解中,当成方法调用。例如:@After(\ @Component //取代:

@RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations=\eans.xml\) public class TestApp { @Autowired private OrderService orderService; @Test public void demo01(){ orderService.addOrder(); orderService.updateOrder(); } }

2 JdbcTemplate

? spring 对操作JDBC提供工具类,JdbcTemplate ,jdbc模板。 ? spring对 持久技术的支持

搜索更多关于: spring--day02笔记 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

配置例如: