问题描述
<?xmlversion="1.0"encoding="UTF-8"?><beansxmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:p="http://www.springframework.org/schema/p"xmlns:tx="http://www.springframework.org/schema/tx"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-3.0.xsd"><beanid="txManager"class="org.springframework.orm.hibernate3.HibernateTransactionManager"><propertyname="sessionFactory"ref="hibernateSessionFactory"/></bean><tx:annotation-driventransaction-manager="txManager"/><beanid="dataSource"class="org.apache.commons.dbcp.BasicDataSource"><propertyname="driverClassName"value="com.mysql.jdbc.Driver"></property><propertyname="url"value="jdbc:mysql://localhost:3306/ant1k"></property><propertyname="username"value="ant1k"></property><propertyname="password"value="67173181"></property></bean><beanid="hibernateSessionFactory"class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><propertyname="dataSource"><refbean="dataSource"/></property><propertyname="hibernateProperties"><props><propkey="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop><propkey="show_sql">true</prop><propkey="current_session_context_class">thread</prop><propkey="format_sql">true</prop><propkey="hbm2ddl.auto">update</prop></props></property><propertyname="mappingDirectoryLocations"><list><value>file:src</value></list></property></bean></beans><beanid="txManager"在此行报错class="org.springframework.orm.hibernate3.HibernateTransactionManager">buildpathisincomplete.Cannotfindclassfilefororg/hibernate/HibernateException开发环境是myeclipse已导入了springcore,jdbcpersistence,persistencecore,aoplibraries我不明白为什么报错怎样解决求高手解答!!
解决方案
解决方案二:
应该是<propertyname="mappingDirectoryLocations"><list><value>file:src</value></list>配置有问题你想通过它来加载什么?