Package org.springframework.integration.samples.jdbc.service

Examples of org.springframework.integration.samples.jdbc.service.PersonService


 
  @Test
  public void insertPersonRecord() { 
    ApplicationContext context
        = new ClassPathXmlApplicationContext("/META-INF/spring/integration/spring-integration-context.xml");
    PersonService service = context.getBean(PersonService.class);
    logger.info("Creating person Instance");
    Person person = new Person();
    Calendar dateOfBirth = Calendar.getInstance();
    dateOfBirth.set(1980, 0, 1);
    person.setDateOfBirth(dateOfBirth.getTime());
    person.setName("Name Of The Person");
    person.setGender(Gender.MALE);
    person = service.createPerson(person);
    Assert.assertNotNull("Expected a non null instance of Person, got null", person);
    logger.info("\n\tGenerated person with id: " + person.getPersonId() + ", with name: " + person.getName());
  }
View Full Code Here


    context.registerShutdownHook();

    final Scanner scanner = new Scanner(System.in);


    final PersonService personService = context.getBean(PersonService.class);

    LOGGER.info("\n========================================================="
          + "\n                                                         "
          + "\n    Please press 'q + Enter' to quit the application.    "
          + "\n                                                         "
View Full Code Here

TOP

Related Classes of org.springframework.integration.samples.jdbc.service.PersonService

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.