Package com.hmkcode.spring.mybatis.service

Examples of com.hmkcode.spring.mybatis.service.Service


    public static void main( String[] args )
    {

      ApplicationContext cxt = new ClassPathXmlApplicationContext("spring-config.xml");
      Service service = (Service) cxt.getBean("service");
   
      log.info("Running App...");

     
      //( 1 ) INSERT MYOBJECT
      System.out.println("( 1 ) insertMyObject(myObject)");
      MyObject myObject = new MyObject();
      myObject.setObjectName("name-2");
      service.insertMyObject(myObject);
      System.out.println("myObject.objectId = "+myObject.getObjectId());
     
      System.out.println("\n********************************\n");
     
      //( 2 ) INSERT MYOBJECT
      System.out.println("( 2 ) insertMyObject_Annotation(myObject)");
      myObject = new MyObject();
      myObject.setObjectName("name-3");
      service.insertMyObject_Annotation(myObject);
      System.out.println("myObject.objectId = "+myObject.getObjectId());
     
      System.out.println("\n********************************\n");
     
      //( 3 ) SELECT ALL MYOBJECTS
      System.out.println("( 3 ) selectAllMyObjects()");
      List<MyObject> myObjects = service.selectAllMyObjects();
      System.out.println(myObjects);
   
     
    }
View Full Code Here

TOP

Related Classes of com.hmkcode.spring.mybatis.service.Service

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.