java spring 最基础的有关问题
java spring 最基础的问题
package junit.test;
import org.junit.BeforeClass;
import org.junit.Test;
public class SpringTest {
@BeforeClass
public static void setUpBeforeClass() throws Exception {
}
@Test public void instanceSpring(){
ApplicationContext ctx=new ClassPathXmlApplicationContext("beans.xml");
}
}
ApplicationContext ctx=new ClassPathXmlApplicationContext("beans.xml");
ApplicationContext 为什么不能import 呢?
------解决方案--------------------
jar引入了么
------解决方案--------------------
没包吧
package junit.test;
import org.junit.BeforeClass;
import org.junit.Test;
public class SpringTest {
@BeforeClass
public static void setUpBeforeClass() throws Exception {
}
@Test public void instanceSpring(){
ApplicationContext ctx=new ClassPathXmlApplicationContext("beans.xml");
}
}
ApplicationContext ctx=new ClassPathXmlApplicationContext("beans.xml");
ApplicationContext 为什么不能import 呢?
------解决方案--------------------
jar引入了么
------解决方案--------------------
没包吧