Package com.lei.test

Source Code of com.lei.test.Test

package com.lei.test;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.lei.bean.User;
import com.lei.dao.UserDao;

public class Test {
 
  public static void main(String[] args) {
   
   
    ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
    UserDao dao=(UserDao) ctx.getBean("userDao");
    User u=new User();
    u.setUsername("aa");
    u.setRole("admin");
    u.setPassword("111");
   
    dao.save(u);
  }

}
TOP

Related Classes of com.lei.test.Test

TOP
Copyright © 2018 www.massapi.com. 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.