6

XML を使用して Spring Social Showcase を試しましたが、XML にエラーがあるようです。

XML ファイルが機能していません。23行目から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 に関連する子は見つかりませんでした。

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

2 に答える 2

1

質問されてからしばらく経ちましたが、今同じ問題に遭遇しました。

Spring-Social-Security jar をビルドパスに追加するだけで修正しました。Mavenを使用:

<dependency>
  <groupId>org.springframework.social</groupId>
  <artifactId>spring-social-security</artifactId>
  <version>${org.springframework.social-version}</version>
</dependency>
于 2013-10-22T09:27:39.060 に答える
1

この部分を変えてみる

<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>
于 2014-01-14T15:49:38.107 に答える