Package org.dedeler.template.service

Examples of org.dedeler.template.service.UserService


          System.out.println("=====================================================");
          // Thanks: http://stackoverflow.com/a/8687676/878361
          ApplicationContext applicationContext = ((ContextRefreshedEvent) event).getApplicationContext();

          RoleService roleService = applicationContext.getBean(RoleService.class);
          UserService userService = applicationContext.getBean(UserService.class);
         
          Role role = new Role("ROLE_USER");

          User user = new User();
          user.setUsername("admin");
          user.setPassword("7lLEodyoRSvB9W6Rhjc+xfabU0ITmcdbjaW4MfARG5TOb/N7TeMxDB85j/HSm8t1h6pTrATIXySR+yQ5jMo39Q==");// admin
          user.setFirstName("Destan");
          user.setAuthorities(Arrays.asList(role));

          roleService.save(role);
          userService.save(user);

          initialized = true;
          System.out.println("----------------------------------------------------");
        }
        catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.dedeler.template.service.UserService

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.