一.原始Dao开发方式 UserDao.java public interface UserDao{ public User findUserByID(Serializable id); public List<User> findUsersByName(String name); } UserDaoImpl.java public class UserDaoImpl implements UserDao{ //SqlSessionFactory是单例存在,不应该在具体实例中创建,需要外部依赖
留着参考 makeData.sql delimiter // create procedure make_data() begin declare i int ; do insert into message values(i, 'a', 'b', 'c'); ; end while; end; // call make_data(); DROP PROCEDURE IF EXISTS make_data; Message.xml <?xml version="1.0" enco
一.先创建数据脚本,这里用的mysql数据脚本 drop table VOTE_ITEM; drop table VOTE_OPTION; drop table VOTE_SUBJECT; drop table VOTE_USER; create table VOTE_USER ( VU_USER_ID int(8) primary key, VU_USER_NAME VARCHAR(20) not null, VU_PASSWORD VARCHAR(20) n