ApplicationContext.xml文件报错:
cvc-complex-type.2.3: Element 'props' cannot have character [children], because the type's content type is element-only.ApplicationContext.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="com.mysql.jdbc.Driver">
</property>
<property name="url"
value="jdbc:mysql://localhost:3306/study">
</property>
<property name="username" value="root"></property>
<property name="password" value="zjm1982"></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
     <prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
</props><!--此行报错-->
</property>
<property name="mappingResources">
<list>
<value>com/zjm/books/pojo/Tree.hbm.xml</value>
<value>com/zjm/books/pojo/Userdb.hbm.xml</value>
<value>com/zjm/books/pojo/Codedb.hbm.xml</value>
<value>com/zjm/books/pojo/Popedom.hbm.xml</value></list>
</property>
</bean>
</beans>
ehcache.xml
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xsi:noNamespaceSchemaLocation="ehcache.xsd">
       <diskStore path="java.io.tmpdir" />
       <defaultCache 
              maxElementsInMemory="10000"
              eternal="false" 
              timeToIdleSeconds="120" 
              timeToLiveSeconds="120" 
              overflowToDisk="true" 
              diskPersistent="false" 
              diskExpiryThreadIntervalSeconds="120" 
              memoryStoreEvictionPolicy="LRU" />
</ehcache>