2013-04-09 7 views
5

मैंने एक्सएमएल का उपयोग कर स्प्रिंग सोशल शोकेस की कोशिश की लेकिन ऐसा लगता है कि एक्सएमएल में एक त्रुटि है।स्प्रिंगसामाजिक एक्सएमएल कॉन्फ़िगरेशन स्कीमा त्रुटि

एक्सएमएल फ़ाइल काम नहीं कर रही है। मैं करने के लिए 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/> 

रहा स्कीमा (http://www.springframework.org/schema/social/) और URL में चिपकाया जाँच करने की कोशिश की लाइन 23 पर एक्स के निशान को पढ़ लिया है, लेकिन यह यह कहते हैं कि यह नहीं मिला है। मैंने रूट की जांच करने की कोशिश की जो springframework.org/schema/ है और मैं स्प्रिंग सोशल से संबंधित एक बच्चा नहीं ढूंढ पा रहा था।

क्या वसंत सामाजिक के लिए xmnls या स्कीमा स्थान के लिए कोई नया लिंक है?

यहाँ मेरी 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: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

आप वसंत और सामाजिक के किन संस्करणों प्रयोग करते हैं बदलने के लिए? –

+0

वसंत सामाजिक 1.1.0 संस्करण का उपयोग कर रहा हूँ। क्या मुझे डाउनग्रेड करना है या क्या? – waterfall37

+0

क्या आपका मतलब 1.1.0.एम 1 है? या 1.1.0.एम 2? नवीनतम कोशिश करें। जार में संबंधित xsd फ़ाइल की उपस्थिति की जांच करें। यदि यह आपके लिए काम नहीं करता है तो आप [इस] में दिखाए गए स्नैपशॉट बिल्ड का प्रयास कर सकते हैं (https://github.com/SpringSource/spring-social-samples/blob/master/spring-social-showcase-xml/pom.xml) उदाहरण। यदि आप उत्पादन के लिए कुछ ऐप बनाते हैं तो 1.0.2.RELEASE में डाउनग्रेड करना बेहतर होगा (अभी कोई XML नामस्थान समर्थन नहीं है, लेकिन मुझे अभी कुछ बड़ा लाभ नहीं दिख रहा है) –

उत्तर

1

कुछ समय हो गया जब प्रश्न पूछा था, लेकिन मैं एक ही समस्या भर में अब आया था।

मैंने बस अपने बिल्डपैथ में स्प्रिंग-सोशल-सिक्योरिटी जार जोड़कर इसे ठीक किया। Maven के साथ:

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

इससे मेरी मदद मिली लेकिन मेरे पास एक और समस्या है जो कहती है कि 'उपयोगकर्ता कनेक्शन' रिपॉजिटरी नामक कोई बीन परिभाषित नहीं किया गया है। – digz6666

0

कोशिश इस हिस्से

<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 class="org.springframework.social.web.connect.ConnectController"> 
<constructor-arg value="${application.url}" /></bean> 
संबंधित मुद्दे