Package es.udc.tfg.journals.model.userservice

Examples of es.udc.tfg.journals.model.userservice.UserService


  public static void main(String[] args) {

    /* Get service object. */
    ApplicationContext ctx = new ClassPathXmlApplicationContext(
        new String[] { SPRING_CONFIG_FILE, SPRING_CONFIG_TEST_FILE });
    UserService userService = ctx.getBean(UserService.class);

    try {
      // Register user.
      User userProfile = userService.registerUser("userPassword",
          new UserDetails("name", "lastName", "user@udc.es", "user"));
      System.out.println("User with userId '" + userProfile.getUserId()
          + "' has been created");
      System.out.println(userProfile);

      // Find user.
      userProfile = userService.login("serviceUser", "userPassword",
          false);
      System.out.println("User with userId '" + userProfile.getUserId()
          + "' has been retrieved");
      System.out.println(userProfile);

View Full Code Here

TOP

Related Classes of es.udc.tfg.journals.model.userservice.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.