Package net.dontdrinkandroot.example.angularrestspringsecurity.entity

Examples of net.dontdrinkandroot.example.angularrestspringsecurity.entity.User


  @Override
  @Transactional(readOnly = true)
  public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException
  {
    User user = this.findByName(username);
    if (null == user) {
      throw new UsernameNotFoundException("The user with name " + username + " was not found");
    }

    return user;
View Full Code Here


  }


  public void initDataBase()
  {
    User userUser = new User("user", this.passwordEncoder.encode("user"));
    userUser.addRole("user");
    this.userDao.save(userUser);

    User adminUser = new User("admin", this.passwordEncoder.encode("admin"));
    adminUser.addRole("user");
    adminUser.addRole("admin");
    this.userDao.save(adminUser);

    long timestamp = System.currentTimeMillis() - 1000 * 60 * 60 * 24;
    for (int i = 0; i < 10; i++) {
      NewsEntry newsEntry = new NewsEntry();
View Full Code Here

TOP

Related Classes of net.dontdrinkandroot.example.angularrestspringsecurity.entity.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.