我試過使用XML的Spring Social Showcase,但它似乎在XML中有錯誤。SpringSocial XML配置架構錯誤
XML文件不起作用。我已經在網上閱讀23 X標記至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粘貼它,但它說,它沒有找到。 我試圖檢查springframework.org/schema/的根目錄,但我無法找到與Spring Social有關的孩子。
春季社交的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>
你用什麼版本的春天社會的? – 2013-04-09 08:32:09
即時通訊使用Spring Social 1.1.0版本。我需要降級還是什麼? – waterfall37 2013-04-09 14:57:49
你的意思是1.1.0.M1?或1.1.0.M2?嘗試最新的一個。檢查jar中是否存在相應的xsd文件。如果它不適合你,那麼你可以嘗試快照構建,如[this]所示(https://github.com/SpringSource/spring-social-samples/blob/master/spring-social-showcase-xml/pom.xml )例子。如果你爲生產構建一些應用程序,那麼降級到1.0.2.RELEASE(沒有xml命名空間支持,但我現在沒有看到一些很大的優勢) – 2013-04-09 15:35:35