[dao]UserDaoImpl.java
강의노트/Spring
2013. 9. 4. 11:52
@Repository("userDao")public class UserDaoImpl implements IUserDao {@AutowiredSqlMapClientTemplate sqlMapClientTemplate;@AutowiredUserInfo user_info;@Overridepublic UserInfo findUserInfo(UserInfo user) throws SQLException {// TODO Auto-generated method stubUserInfo uInfo = (UserInfo)sqlMapClientTemplate.queryForObject("find_userinfo", user);return uInfo;} @Overridepublic UserInfo insertUserInfo(..
[dao]IUserDao.java
강의노트/Spring
2013. 9. 4. 11:50
public interface IUserDao { public UserInfo findUserInfo(UserInfo user) throws SQLException; public UserInfo insertUserInfo(UserInfo user) throws SQLException; public int updateUserInfo(UserInfo user) throws SQLException; public int deleteUserInfo(UserInfo user) throws SQLException; }
[resources]user_query.xml
강의노트/Spring
2013. 9. 4. 11:48
select * from p_userinfowhere 1=1user_id = #user_id#user_name = #user_name#insert into p_userinfo(user_id, user_pass, user_name, user_address, user_phone, user_email, user_sex, user_age)values(#user_id#, #user_pass#, #user_name#, #user_address#, #user_phone#, #user_email#, #user_sex#, #user_age#)update p_userinfo set user_pass="#user_pass#", user_name="#user_name#", user_address="#user_address#"..