2016-08-02 117 views
0

我開始我的項目maven webapplication 和spring-servlet.xml我有這個錯誤我看它但我不明白這個錯誤我真的按照行我不認爲這是一個空間或卡拉科特,我錯過了或添加 請幫我spring servlet.xml的配置

我有這樣的錯誤:

產生的原因:org.xml.sax.SAXParseException; lineNumber:57; columnNumber:9; cvc-complex-type.2.3:L'élément'beans'ne doit comporter aucun enfant([children])de typecaractère,car le type porte le type de contenu「element-only」。

這是我CONFI-servlet.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:context="http://www.springframework.org/schema/context" 
     xmlns:tx="http://www.springframework.org/schema/tx" 
     xmlns:util="http://www.springframework.org/schema/util" 
     xmlns:mvc="http://www.springframework.org/schema/mvc" 
     xsi:schemaLocation= 
"http://www.springframework.org/schema/mvc  http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd 
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd 
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd 
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd 
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd 
"> 
<context:component-scan base-package="ibansys"/> 
<!-- data source--> 
<bean id="dataSourceRef" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> 
    <property name="datasource" ref="datasourceRef"/> 
    <property name="annotatedClasses"> 
     <list> 
      <value>ibansys.model.ref.Activite </value> 
      <value>ibansys.model.ref.Agence </value> 
      <value>ibansys.model.ref.AgenceEtrangere </value> 
      <value>ibansys.model.ref.Banque </value> 
      <value>ibansys.model.ref.BanqueEtrangere </value> 
      <value>ibansys.model.ref.Compte </value> 
      <value>ibansys.model.ref.Devise </value> 
      <value>ibansys.model.ref.ModeDeLivraison </value> 
      <value>ibansys.model.ref.ModeDeReglement </value> 
      <value>ibansys.model.ref.ModePaiement </value> 
      <value>ibansys.model.ref.Pays </value> 
      <value>ibansys.model.ref.Piece </value> 
      <value>ibansys.model.ref.TPiece </value> 
      <value>ibansys.model.ref.Titre </value> 
      <value>ibansys.model.ref.TypeDossierAva </value> 
     </list> 
    </property> 
    <property name="hibernateProperties"> 
     <props> 
      <prop key="hibernate.dialect"> org.hiberate.dialect.MySQL5Dialect</prop> 
      <prop key="hibernate.show_sql">${hibernate.show_sql}</prop> 
      <prop key="hibernate.format_sql">${hibernate.format_sql:false}</prop> 
      <prop key="hibernate.current_session_context_class">thread</prop> 
     </props> 
    </property> 
</bean> 
<bean id="txManagerRef" class="org.springframework.orm.hibernate4.HibernateTransactionManager"> 
    <property name="sessionFactory" ref="sessionFactoryRef"/> 
</bean> 
 <mvc:annotation-driven/> 
<tx:annotation-driven transaction-manager="txManagerRef"/> 
<!--dao --> 
<bean id="DaoRef" class="ibansys.dao.DaoRefImpl" primary="true"> 
    <property name="sessionFactory" ref="sessionFactoryRef" /> 
</bean> 
<bean id="RefService" class="ibansys.services.RefServiceImpl"/> 
</beans> 

,這是我dispathsher

<web-app xmlns="http://java.sun.com/xml/ns/javaee"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
      http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
     version="2.5"> 
    <display-name>Application</display-name> 

<servlet> 
    <servlet-name>Config</servlet-name> 
    <servlet-class> 
     org.springframework.web.servlet.DispatcherServlet 
    </servlet-class> 
    <load-on-startup>1</load-on-startup> 
</servlet> 

<servlet-mapping> 
    <servlet-name>Config</servlet-name> 
    <url-pattern>/*</url-pattern> 
</servlet-mapping> 

+0

你能用英文發佈例外嗎? –

+0

Confi-Servlet.XML看起來不錯。哪個文件應該是錯誤? – Jens

+0

在Config-servlet.xml中 – user6618310

回答

0

請更新CONFI-servlet.xml中至名Config-servlet.xml