- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
23-Spring MVC - Project Work | Login Task List & Business Method (Contact App) - By eZeon
This Project Work(Contact App) video is based on LOGIN TASKS AND AUTHENTICATION LOGIC.
TASK LIST FOR LOGIN OPERATION:
1. UserService - check business logic implementation code for user authentication
2. Prepare Dashboard Pages for - Admin and User Roles (link to UserController)
3. Login Form + LoginCommand + Spring MVC Form Taglib
4. Show error messages correctly + JSTL Core Tablib
5. Bind Logged in user with HttpSession scope for further use
6. Role wise menu display
AUTHENTICATION LOGIC:
//UserService.java
public interface UserService {
/**
* The method handles login operation(authentication) using given credentials,
* it returns User object when success and null when failed.
* When user account is blocked an exception will be thrown by this method.
* @param loginName
* @param password
* @return
* @throws in.ezeon.capp.exception.UserBlockedException When user account is blocked.
*/
public User login(String loginName, String password) throws UserBlockedException;
//other method goes here...
}
//UserServiceImpl.java
/**
*
* @author Vikram
*/
@Service
public class UserServiceImpl extends BaseDAO implements UserService {
@Autowired
private UserDAO userDAO;
@Override
public void register(User u) {
userDAO.save(u);
}
@Override
public User login(String loginName, String password) throws UserBlockedException {
String sql = "SELECT userId, name, phone, email, address, role, loginStatus, loginName"
+ " FROM user WHERE loginName=:ln AND password=:pw";
Map m = new HashMap();
m.put("ln", loginName);
m.put("pw", password);
try {
User u = getNamedParameterJdbcTemplate().queryForObject(sql, m, new UserRowMapper());
if(u.getLoginStatus().equals(UserService.LOGIN_STATUS_BLOCKED)){
throw new UserBlockedException("Your accout has been blocked. Contact to admin.");
}else{
return u;
}
} catch (EmptyResultDataAccessException ex) {
return null;
}
}
//impl of other method goes here
}
Don't skip or miss any video, just follow step by step video series.
Also check the source code listing in our
blog http://ezeon.in/blog
SUBSCRUBE my channel for more videos on Java Technologies and Software Development including all advanced development frameworks and technologies.
Видео 23-Spring MVC - Project Work | Login Task List & Business Method (Contact App) - By eZeon канала Vikram Thakur
TASK LIST FOR LOGIN OPERATION:
1. UserService - check business logic implementation code for user authentication
2. Prepare Dashboard Pages for - Admin and User Roles (link to UserController)
3. Login Form + LoginCommand + Spring MVC Form Taglib
4. Show error messages correctly + JSTL Core Tablib
5. Bind Logged in user with HttpSession scope for further use
6. Role wise menu display
AUTHENTICATION LOGIC:
//UserService.java
public interface UserService {
/**
* The method handles login operation(authentication) using given credentials,
* it returns User object when success and null when failed.
* When user account is blocked an exception will be thrown by this method.
* @param loginName
* @param password
* @return
* @throws in.ezeon.capp.exception.UserBlockedException When user account is blocked.
*/
public User login(String loginName, String password) throws UserBlockedException;
//other method goes here...
}
//UserServiceImpl.java
/**
*
* @author Vikram
*/
@Service
public class UserServiceImpl extends BaseDAO implements UserService {
@Autowired
private UserDAO userDAO;
@Override
public void register(User u) {
userDAO.save(u);
}
@Override
public User login(String loginName, String password) throws UserBlockedException {
String sql = "SELECT userId, name, phone, email, address, role, loginStatus, loginName"
+ " FROM user WHERE loginName=:ln AND password=:pw";
Map m = new HashMap();
m.put("ln", loginName);
m.put("pw", password);
try {
User u = getNamedParameterJdbcTemplate().queryForObject(sql, m, new UserRowMapper());
if(u.getLoginStatus().equals(UserService.LOGIN_STATUS_BLOCKED)){
throw new UserBlockedException("Your accout has been blocked. Contact to admin.");
}else{
return u;
}
} catch (EmptyResultDataAccessException ex) {
return null;
}
}
//impl of other method goes here
}
Don't skip or miss any video, just follow step by step video series.
Also check the source code listing in our
blog http://ezeon.in/blog
SUBSCRUBE my channel for more videos on Java Technologies and Software Development including all advanced development frameworks and technologies.
Видео 23-Spring MVC - Project Work | Login Task List & Business Method (Contact App) - By eZeon канала Vikram Thakur
Java Tutorial Java By Vikram Java By EZEON Java Training Bhopal Best Java Coaching Learn from Developer Core Java Tutorial Java Tutorial For Beginner Java Training Institute Free Java Training Best Java Training Step by Step Java Tutorial OOPS in Java Spring MVC Tutorial Spring MVC Project Development Spring Project Requirement Contact Application Spring Login Task List Spring Login Login Form Authentication Logic How to Login Login Code
Комментарии отсутствуют
Информация о видео
4 мая 2017 г. 0:07:29
00:10:18
Другие видео канала




















