2012-09-01 21 views
9

no'lu eleman için herhangi bir bildirim bulunamadı. Springsource Tools Suite 3 kullanıyorum ve interceptions uygulamaya çalışıyorum. Bu kod ve hatalar yorumlanmıştır:Eşleşen joker karakteridir, ancak

servlet-context.xml

<?xml version="1.0" encoding="UTF-8"?> 
<beans:beans xmlns="http://www.springframework.org/schema/mvc" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:beans="http://www.springframework.org/schema/beans" 
    xmlns:context="http://www.springframework.org/schema/context" 
    xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd 
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> 

<annotation-driven /> 

<resources mapping="/resources/**" location="/resources/" /> 

<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> 
    <beans:property name="prefix" value="/WEB-INF/views/" /> 
    <beans:property name="suffix" value=".jsp" /> 
</beans:bean> 

<beans:bean id="authInterceptor" class="com.bank.accounting.authentication.AuthInterceptor" /> 
<beans:bean id="authUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> 

fasulye tanımı ayrıştırma sırasında beklenmeyen hata: Yapılandırma sorun: element için BeanDefinitionParser bulunamıyor [liste]

<beans:property name="interceptors"> 
     <list> 

Eşleşen joker karakterdir, ancak öğe için bir bildirim bulunamadı ' liste'.

  <ref bean="authInterceptor" /> 
     </list> 
    </beans:property> 
    <beans:property name="mappings"> 
     <props> 

eşleştirme joker sıkı, ancak hiçbir beyan elemanı 'sahne' için bulunabilir.

  <prop key="/home">HomeController</prop> 
     </props> 
    </beans:property> 
</beans:bean> 
<beans:bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> 

fasulye tanımı ayrıştırma sırasında beklenmeyen hata: Yapılandırma sorun: element için BeanDefinitionParser bulunamıyor [sahne]

<beans:property name="mappings"> 
     <props> 

eşleştirme joker sıkı, ancak hiçbir beyan elemanı için bulunabilir 'sahne'.

  <prop key="/login">LoginController</prop> 
     </props> 
    </beans:property> 
</beans:bean> 
</beans:beans> 

cevap

33

<list> ve <ref> etiketler utilnamespace aittir.

xmlns:util="http://www.springframework.org/schema/util" 
xsi:schemaLocation=" 
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd" 

Ve sonra uygun şekilde bu bildirimleri önek: İlk ekleyin Ayrıca <beans:util> ile

<util:list> 
    ... 

deneyebilirsiniz.

+3

+1. Benim durumumda schemaLocation bildirimini kaçırıyordum. –

İlgili konular