spring servlet.xml

时间:2016-08-02 09:15:48

标签: xml spring maven

我开始了我的项目maven webapplication 并在spring-servlet.xml中我有这个错误我看它但我不明白这个错误我真的一行一行我不认为这是我错过或添加的空间或caracter 请帮帮我

我有这个错误:

  

引起:org.xml.sax.SAXParseException; lineNumber:57;   columnNumber:9; cvc-complex-type.2.3:L'élément'bean'nedoit   comporter aucun enfant([children])detypecaractè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>

这是我的调查员

    <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>  

1 个答案:

答案 0 :(得分:0)

请将 Confi-Servlet.xml 的名称更新为 Config-servlet.xml