2013-04-09 18 views
5

XML kullanarak Spring Social Showcase'i denedim ancak XML'de bir hata var gibi görünüyor.SpringSocial XML Yapılandırması Şema Hatası

XML dosyası çalışmıyor. Ben şema (http://www.springframework.org/schema/social/) ve URL yapıştırdıysanız kontrol etmeye çalıştı 27.

<facebook:config app-id="${facebook.clientId}" app-secret="${facebook.clientSecret}" app-namespace="socialshowcase" /> 
    <twitter:config app-id="${twitter.consumerKey}" app-secret="${twitter.consumerSecret}"/> 
    <linkedin:config app-id="${linkedin.consumerKey}" app-secret="${linkedin.consumerSecret}"/> 

    <social:jdbc-connection-repository/> 

hat 23 x işaretleri okudum ama buna bulunamadığını söyler. Springframework.org/schema/ olan kökü kontrol etmeye çalıştım ve Spring Social ile ilgili bir çocuk bulamadım.

Bahar sosyal için xmnls veya şema konumu için yeni bir bağlantı var mı?

İşte benim XML File: soru sorulmuştur beri biraz zaman oldu

<?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:facebook="http://www.springframework.org/schema/social/facebook" 
    xmlns:twitter="http://www.springframework.org/schema/social/twitter" 
    xmlns:social="http://www.springframework.org/schema/social" 
    xmlns:linkedin="http://www.springframework.org/schema/social/linkedin" 
    xmlns:c="http://www.springframework.org/schema/c" 
    xmlns:context="http://www.springframework.org/schema/context" 
    xsi:schemaLocation="http://www.springframework.org/schema/social/facebook http://www.springframework.org/schema/social/spring-social-facebook.xsd 
     http://www.springframework.org/schema/social/linkedin http://www.springframework.org/schema/social/spring-social-linkedin.xsd 
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd 
     http://www.springframework.org/schema/social/twitter http://www.springframework.org/schema/social/spring-social-twitter.xsd 
     http://www.springframework.org/schema/social http://www.springframework.org/schema/social/spring-social.xsd 
     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"> 



    <context:property-placeholder location="classpath:/org/springframework/social/showcase/config/application.properties" /> 



    <facebook:config app-id="${facebook.clientId}" app-secret="${facebook.clientSecret}" app-namespace="socialshowcase" /> 
    <twitter:config app-id="${twitter.consumerKey}" app-secret="${twitter.consumerSecret}"/> 
    <linkedin:config app-id="${linkedin.consumerKey}" app-secret="${linkedin.consumerSecret}"/> 

    <social:jdbc-connection-repository/>  
    <bean id="userIdSource" class="org.springframework.social.security.AuthenticationNameUserIdSource" /> 

    <bean id="connectController" class="org.springframework.social.connect.web.ConnectController" autowire="constructor"> 
     <property name="connectInterceptors"> 
      <list> 
       <bean class="org.springframework.social.showcase.facebook.PostToWallAfterConnectInterceptor" /> 
       <bean class="org.springframework.social.showcase.twitter.TweetAfterConnectInterceptor" /> 
      </list> 
     </property> 
    </bean> 

    <bean id="psc" class="org.springframework.social.connect.web.ProviderSignInController" autowire="constructor" />   
    <bean id="signInAdapter" class="org.springframework.social.showcase.signin.SimpleSignInAdapter" autowire="constructor" /> 

    <bean id="disconnectController" class="org.springframework.social.facebook.web.DisconnectController" 
     c:_0-ref="usersConnectionRepository" c:_1="${facebook.clientSecret}" /> 

</beans> 
+0

Spring Sosyal hangi sürümünü kullanıyorsunuz ile bu bölümü

<bean id="connectController" class="org.springframework.social.connect.web.ConnectController" autowire="constructor"> <property name="connectInterceptors"> <list> <bean class="org.springframework.social.showcase.facebook.PostToWallAfterConnectInterceptor" /> <bean class="org.springframework.social.showcase.twitter.TweetAfterConnectInterceptor" /> </list> </property></bean> 

değiştirilir? Spring Social 1.1.0 sürümünü kullanarak –

+0

im. İndirmeye mi ihtiyacım var? – waterfall37

+0

Bunu mu demek istediniz: 1.1.0.M1? veya 1.1.0.M2? En yenisini dene. Kavanozda karşılık gelen xsd dosyasının varlığını kontrol edin. Eğer sizin için uygun değilse, o zaman anlık görüntü yapılarını şov olarak deneyebilirsiniz (https://github.com/SpringSource/spring-social-samples/blob/master/spring-social-showcase-xml/pom.xml) örnek. Eğer prodüksiyon için bir uygulama oluşturursanız, 1.0.2.RELEASE sürümüne geçmeniz daha iyi olacaktır (xml ad alanı desteği yoktur, ancak şu anda büyük bir avantaj görmüyorum) –

cevap

1

, ama şimdi aynı sorunu karşılaştım.

Yalnızca Yapı Yoluma Spring-Social-Security jar'ı ekleyerek düzelttim. maven ile:

<dependency> 
    <groupId>org.springframework.social</groupId> 
    <artifactId>spring-social-security</artifactId> 
    <version>${org.springframework.social-version}</version> 
</dependency> 
+0

Bana yardımcı oldu, ancak 'usersConnectionRepository' adlı fasulye belirtilmeyen başka bir sorunum var. – digz6666

0

Try

<bean class="org.springframework.social.web.connect.ConnectController"> 
<constructor-arg value="${application.url}" /></bean> 
İlgili konular