Spring 如何解决我在春天的豆豆异常

Spring 如何解决我在春天的豆豆异常,spring,Spring,我是spring技术的新手。我正在尝试使用j2ee容器创建简单的spring独立应用程序 为此,我添加了4个jar文件 1)commons-loggins-1.3 jar 2)spring_bean_3.0.5 3)spring_core_3.0.0 4)Spring_context_3.0.2 我试图在我的客户机类中创建应用程序上下文实例 Exception in thread "main" java.lang.Error: Unresolved compilation problems:

我是spring技术的新手。我正在尝试使用j2ee容器创建简单的spring独立应用程序

为此,我添加了4个jar文件

1)commons-loggins-1.3 jar
2)spring_bean_3.0.5
3)spring_core_3.0.0
4)Spring_context_3.0.2
我试图在我的客户机类中创建应用程序上下文实例

Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
    The type org.springframework.beans.BeansException cannot be resolved. It is indirectly referenced from required .class files
    The constructor ClassPathXmlApplicationContext(String) refers to the missing type BeansException

    at test.Core_J2ee_Client.main(Core_J2ee_Client.java:12)
这是我的密码

这是我的客户端类

package test;

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

import beans.Test;

public class Core_J2ee_Client {

    public static void main(String[] args) {

        ConfigurableApplicationContext ap = new ClassPathXmlApplicationContext("resource/spring.xml");

    }

}
这是我的pojo课程

package beans;

public class Test {

    public Test(){
        System.out.println("this is test cons---");
    }
    public void hello(){
        System.out.println("this is hello method");
    }
}
这是我的spring.xml文件

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"  
        "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="t" class="beans.Test">
</bean>

</beans>


可能是版本冲突问题。使用相同版本的不同spring模块,也使用当前版本的spring框架,即
4.2.4
。为了获得更愉快的java开发,请使用
maven
gradle
进行依赖关系管理。