部署SnappyData-0.5 pulse.war

时间:2016-07-20 22:14:00

标签: snappydata

我正在尝试将Pulse Web应用程序部署到外部Tomcat。部署时出现此错误。我该如何解决这个问题?

  

org.springframework.beans.factory.NoSuchBeanDefinitionException:没有   名为'org.springframework.security.authenticationManager'的bean是   定义:你忘记添加一个gobal了   元素到你的配置(与孩子   元素)?或者,您可以使用authentication-manager-ref   你和元素的属性。

3 个答案:

答案 0 :(得分:2)

行。这是固定的。对于每个也经历过这种情况的人......你必须设置Spring Profile“pulse.authentication.default”,否则它将不会加载AuthenticationManager Bean。

总体问题在于RowStore的文档,它说这是可选的,实际上它是必需的。

http://rowstore.docs.snappydata.io/docs/manage_guide/pulse/quickstart.html#topic_795C97B46B9843528961A094EE520782

它在步骤4)说,配置安全性是可选的,而实际上你必须传递Spring配置文件。此外,再次在“验证脉冲用户”一节中,它说这不是必需的。

要解决此问题,我必须传递Spring Profile“pulse.authentication.default”以在spring-security.xml中激活Bean并正确部署pulse.war。

SnappyData pulse.war将来执行此操作的更好方法可能是使用“!pulse.authentication.custom”,只要未配置自定义的bean,它将始终加载默认的AuthenticationManager bean。

为了使其成为真正可选的未来的示例更改:

<beans:beans profile="!pulse.authentication.custom" >
        <authentication-manager>
            <authentication-provider>
                <user-service>
                    <user name="admin" password="admin" authorities="ROLE_USER" />
                </user-service>
            </authentication-provider>
        </authentication-manager>
    </beans:beans>

答案 1 :(得分:1)

您使用的是哪个版本的Tomcat? 这是same issue with TC authentication上的另一个帖子。

否则,您可以在“嵌入模式”中尝试使用Pulse吗?

答案 2 :(得分:0)

您使用的是哪个版本的SnappyData? 您需要在类路径中提及pulse.properties文件。有关详细信息,请查看http://rowstore.docs.snappydata.io/docs/manage_guide/pulse/quickstart.html#topic_795C97B46B9843528961A094EE520782

如果您有任何问题,请告诉我们。