摘要: mysql 创建表: mysql> create table user( -> userid int(4) primary key not null auto_increment, -> username varchar(16) not null, -> userpassword varchar(3 阅读全文
posted @ 2016-02-23 16:20 wjj1013 阅读(7975) 评论(0) 推荐(0)
摘要: Mybatis中resultMap MyBatis中在查询进行select映射的时候,返回类型可以用resultType,也可以用resultMap,resultType是直接表示返回类型的,而resultMap则是对外部ResultMap的引用,但是resultType跟resultMap不能同时 阅读全文
posted @ 2016-02-23 16:12 wjj1013 阅读(242) 评论(0) 推荐(0)
摘要: 1.创建一个实体包entity,用来与数据库中表一一对应 2.创建一个DAO包,用来处理对应的表操作 @Component(value="adminDAOImpl")public class AdminDAOImpl implements AdminDAO { private AdminUserMa 阅读全文
posted @ 2016-02-23 11:32 wjj1013 阅读(206) 评论(0) 推荐(0)
摘要: 1.配置Spring和Mybatis 1.beans.xml配置文件 <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:aop="http:// 阅读全文
posted @ 2016-02-23 11:10 wjj1013 阅读(148) 评论(0) 推荐(0)
摘要: spring项目中监听器作用-ContextLo 1 spring框架的启动入口 ContextLoaderListener <context-param> <param-name>contextConfigLocation</param-name> <param-value>contextConf 阅读全文
posted @ 2016-02-23 10:38 wjj1013 阅读(859) 评论(0) 推荐(0)