import javax.annotation.Resource;

 

import org.junit.Test;

import org.springframework.context.annotation.Configuration;

import org.springframework.test.context.ContextConfiguration;

import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;

 

import com.bjsxt.spring30.model.User;

 

@ContextConfiguration("classpath:beans.xml")

public class UserDAOTest extends AbstractJUnit4SpringContextTests{

      

       @Resource(name="userDAO")

       private UserDAO userDAO;

      

       @Test

       public void testSave() {

              this.userDAO.save(new User());

       }

 

}

相关文章:

  • 2021-09-01
  • 2021-12-31
  • 2021-06-25
  • 2022-12-23
  • 2021-07-12
  • 2021-07-10
  • 2021-10-23
猜你喜欢
  • 2022-01-21
  • 2022-02-21
  • 2021-09-06
  • 2022-02-04
  • 2021-06-26
  • 2022-12-23
相关资源
相似解决方案