[controller]UserController.java
강의노트/Spring
2013. 9. 4. 11:56
@Controller public class UserController { @Autowired IUserService userService; @RequestMapping(value="/", method=RequestMethod.GET) public String moveLoginPage(){ return "loginForm"; } @RequestMapping(value="/login.action", method=RequestMethod.POST) public String checkLogin(@ModelAttribute UserInfo user, Model model) throws SQLException, LoginException{ //사용자의 정보가 있는지 조회를 하는 기능을 호출 UserInfo uIn..
[service]UserServiceImpl.java
강의노트/Spring
2013. 9. 4. 11:55
@Service("userService")public class UserServiceImpl implements IUserService {@AutowiredIUserDao userDao; @Overridepublic UserInfo findUserInfo(UserInfo user) throws SQLException {// TODO Auto-generated method stubUserInfo uInfo = userDao.findUserInfo(user);if(uInfo==null){//ID없음uInfo = user;}else if(uInfo.getUser_pass() != user.getUser_pass()){//비밀번호 불일치uInfo.setResult(UserInfo.NOT_MATCH_PASS);}..
[service]IUserService.java
강의노트/Spring
2013. 9. 4. 11:55
public interface IUserService {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;}