spring--day02笔记

2026/4/27 20:10:06

配置例如: 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笔记.doc 将本文的Word文档下载到电脑
搜索更多关于: spring--day02笔记 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219