2)更改测试类
package com.steven.spring.sysmgr.action; import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import com.steven.spring.sysmgr.dao.impl.UserDaoImplJdbc; import com.steven.spring.sysmgr.service.UserService; public class LoginTest { @Test public void loginUsinSpring(){ ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml"); UserService userService = (UserService)ac.getBean("userService"); userService.loginUser("abc", "123"); } }SSM框架学习笔记_第1章_SpringIOC概述 (2)
内容版权声明:除非注明,否则皆为本站原创文章。