03 2022 档案

摘要:创建 maven工程 在pom.xml引入依赖: <dependencies> <!-- SpringMVC --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> 阅读全文
posted @ 2022-03-31 22:16 wiselee/ 阅读(26) 评论(0) 推荐(0) 编辑
摘要:xml注解:注解和xml混合使用 <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XM 阅读全文
posted @ 2022-03-22 23:35 wiselee/ 阅读(29) 评论(0) 推荐(0) 编辑
摘要:首先 dao层: dao -bookdao(interface) -bookdaoimpl service层: bookService 实体类对象 entiry-book 测试类 Test-TestBook 结构如图所示: xml配置: <?xml version="1.0" encoding="U 阅读全文
posted @ 2022-03-22 14:41 wiselee/ 阅读(37) 评论(0) 推荐(0) 编辑
摘要:1.bean管理 -spring创建对象 -在spring的配置文件中,使用bean标签、标签里添加对应的属性、就可以实现对象的创建 -在bean标签中有很多属性 -id属性:唯一的标识 -class属性:类全路径(包类的路径) -创建对象的时候:默认无参 -spring注入属性2.基于xml方式注 阅读全文
posted @ 2022-03-20 13:41 wiselee/ 阅读(65) 评论(0) 推荐(0) 编辑
摘要:xml的配置如下<bean id="userService" class="com.spring5.service.UserService"> <property name="userDAO" ref="userDAO"></property></bean><bean id="userDAO" cl 阅读全文
posted @ 2022-03-17 14:08 wiselee/ 阅读(61) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示