摘要: 在spring配置文件中配置:<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLS 阅读全文
posted @ 2020-06-01 23:18 Pykingchen 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 编写spring的配置文件: <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLS 阅读全文
posted @ 2020-06-01 23:06 Pykingchen 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 编写sql语句: package cn.itcast.dao;import cn.itcast.domain.Account;import org.apache.ibatis.annotations.Insert;import org.apache.ibatis.annotations.Select 阅读全文
posted @ 2020-06-01 22:37 Pykingchen 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Spring整合SpringMVC:启动tomcat服务器的时候,需要加载Spring的配置文件 ServletContext域对象 服务器启动的时候创建ServletContext对象,服务器关闭才销毁 一类监听器,监听ServletContext域对象创建和销毁的(执行一次,服务器启动执行) 监 阅读全文
posted @ 2020-06-01 21:56 Pykingchen 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 搭建springmvc的环境: 在web.xml中配置前端控制器:(就是一个servlet) servlet的创建一般是访问的时候,配置<load-on-startup>1</load-on-startup>(为1)就是在服务器启动时就创建servlet 在servlet初始化的时候加载spring 阅读全文
posted @ 2020-06-01 21:26 Pykingchen 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 把类交给ioc进行管理 首先创建spring的配置文件 开启注解扫描: <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http:/ 阅读全文
posted @ 2020-06-01 20:33 Pykingchen 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 环境搭建: 1. 创建maven的wabapp项目,导入maven坐标: <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3 阅读全文
posted @ 2020-06-01 19:52 Pykingchen 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-05-28 21:31 Pykingchen 阅读(79) 评论(0) 推荐(0) 编辑
摘要: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.spring 阅读全文
posted @ 2020-05-27 22:45 Pykingchen 阅读(132) 评论(0) 推荐(0) 编辑
摘要: /** * 账户的业务层实现类 * 曾经xml的配置: * <bean id="accountService" class="com.itheima.service.impl.AccountServiceImpl" * scope="" init-method="" destory-method=" 阅读全文
posted @ 2020-05-27 22:17 Pykingchen 阅读(262) 评论(0) 推荐(0) 编辑