摘要: <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 阅读全文
posted @ 2017-11-16 10:20 蕉叶 阅读(244) 评论(0) 推荐(0) 编辑
摘要: ${pageContext.request.contextPath} 阅读全文
posted @ 2017-11-15 23:08 蕉叶 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 实例化spring ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml"); context.getBean("名字"); applicationContext.xml <bean 阅读全文
posted @ 2017-11-10 12:34 蕉叶 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 1.@Param("XX")String XXX 注入到SQL语句中#{XX} 2.controller (@RequestParam String XX) 阅读全文
posted @ 2017-11-09 23:09 蕉叶 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 1.读取全局配置文件String resource="mybatis-config.xml"; InputStream is=Resources.getResourceAsStream(resource); 2.创建SqlSessionFactory对象 SqlSessionFactory fact 阅读全文
posted @ 2017-11-09 23:07 蕉叶 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 1.读取并解析配置文件及映射文件 Configuration conf=new Configuration().configure(); 2.依据配置文件和映射文件中的信息,创建SessionFactory对象 1.2.3通常写在HbiernateUtil静态方法中 SessionFactory s 阅读全文
posted @ 2017-11-08 22:02 蕉叶 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 1.第一范式(1NF)无重复的列 2.第二范式(2NF)属性完全依赖于主键 [ 消除部分子函数依赖 ] 3.第三范式(3NF)属性不依赖于其它非主属性 [ 消除传递依赖 ] 阅读全文
posted @ 2017-11-08 08:44 蕉叶 阅读(85) 评论(0) 推荐(0) 编辑
摘要: web.xml 配置核心控制器dispatcherServlet 加载spring-servlet.xml的配置文件 <servlet> <servlet-name>springmvc</servlet-name> <servlet-class>org.springframework.web.ser 阅读全文
posted @ 2017-10-07 20:37 蕉叶 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 使用注释添加对context声明,自动扫描 <context:component-scan base-package="service,dao"/> @Component("xx") == <bean id ="xx" class=""/> @Repository DAO类标注 @Service 业 阅读全文
posted @ 2017-09-21 10:08 蕉叶 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 命名空间自动生成xmlns:beans="http://www.springframework.org/schema/beans" 测试正常 加载tomcat会报出 cvc-elt.1: 找不到元素 'beans' 的声明 的异常 修改成 xmlns="http://www.springframew 阅读全文
posted @ 2017-09-18 20:51 蕉叶 阅读(256) 评论(0) 推荐(0) 编辑