摘要: 12.整合Mybatis 12.1.步骤: 1.导入相关jar包 junit mybatis mysql数据库 spring相关的 aop织入 mybatis-spring【new】 2.编写配置文件 3.测试 12.2.回忆Mybatis 编写实体类 编写核心配置文件 编写接口 编写Mapper. 阅读全文
posted @ 2022-10-31 19:11 It小飞呀 阅读(16) 评论(0) 推荐(0) 编辑
摘要: ## 注解说明- @Autowired:自动装配通过类型,名字- @nullable:字段标记了这个注解,说明这个字段可以为null。- @Resource:自动装配通过名字,类型- @Component:组件,放在类上,说明这个类被,Spring管理了,就是bean。【@Component、@Re 阅读全文
posted @ 2022-10-31 09:45 It小飞呀 阅读(19) 评论(0) 推荐(0) 编辑
摘要: <!--导入junit包--> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </dependency> <!--导入mysql的包--> <dependenc 阅读全文
posted @ 2022-10-31 09:43 It小飞呀 阅读(19) 评论(0) 推荐(0) 编辑