// Path: src/main/java/security/entity/User.java
// @SuppressWarnings("serial")
// @Entity
// @Table(name = "user")
// public class User extends AbstractAuditableEntity {
// 
// 	@NotNull
// 	private String email;
// 
// 	@NotNull
// 	private String password;
// 
// 	public String getEmail() {
// 		return email;
// 	}
// 
// 	public void setEmail(String email) {
// 		this.email = email;
// 	}
// 
// 	public String getPassword() {
// 		return password;
// 	}
// 
// 	public void setPassword(String password) {
// 		this.password = password;
// 	}
// 
// }
// 
// Path: src/main/java/security/repository/UserRepository.java
// @Repository
// public interface UserRepository extends JpaRepository<User, Long> {
// 
// 	@Transactional(readOnly = true)
// 	User findByEmail(String email);
// }


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import security.entity.User;
import security.repository.UserRepository;
package security.service.impl;



/**
 * @author abidk
 * 
 */
@Service
public class UserDetailServiceImpl implements UserDetailsService {

	@Autowired
	private UserRepository userRepository;

	@Override
	public UserDetails loadUserByUsername(String arg0)
			throws UsernameNotFoundException {

// Path: src/main/java/security/entity/User.java
// @SuppressWarnings("serial")
// @Entity
// @Table(name = "user")
// public class User extends AbstractAuditableEntity {
// 
// 	@NotNull
// 	private String email;
// 
// 	@NotNull
// 	private String password;
// 
// 	public String getEmail() {
// 		return email;
// 	}
// 
// 	public void setEmail(String email) {
// 		this.email = email;
// 	}
// 
// 	public String getPassword() {
// 		return password;
// 	}
// 
// 	public void setPassword(String password) {
// 		this.password = password;
// 	}
// 
// }
// 
// Path: src/main/java/security/repository/UserRepository.java
// @Repository
// public interface UserRepository extends JpaRepository<User, Long> {
// 
// 	@Transactional(readOnly = true)
// 	User findByEmail(String email);
// }


// Path: src/main/java/security/service/impl/UserDetailServiceImpl.java
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import security.entity.User;
import security.repository.UserRepository;

package security.service.impl;



/**
 * @author abidk
 * 
 */
@Service
public class UserDetailServiceImpl implements UserDetailsService {

	@Autowired
	private UserRepository userRepository;

	@Override
	public UserDetails loadUserByUsername(String arg0)
			throws UsernameNotFoundException {

		User user = userRepository.findByEmail(arg0);