0
是否可以修改并让grails spring-security-core插件使用例如/WEB-INF/applicationContext-security.xml中定义的其他bean?Grails spring-security-core插件
有没有人成功地能够例如运行春季安全的简约情况:
<http>
<http-basic/>
<intercept-url pattern="/**" access="ROLE_ADMIN" />
</http>
<authentication-manager>
<authentication-provider>
<user-service>
<user name="admin" password="pass" authorities="ROLE_ADMIN" />
</user-service>
</authentication-provider>
</authentication-manager>
已经安装Grails的春季安全核心插件,使Grails的插件不重定向它和使用它的自己的豆呢?
在这种情况下,您在哪里以及如何指定这个以使其成为可能?
我自己添加了applicationContext-security.xml并将其添加到web.xml中。我没有在我的WEB-INF /中开始。所以基本上我不应该打扰尝试添加新的bean定义,即使在resource.xml中,因为它不会很好地与插件? –
哎呀,对不起 - 我误读了文件名。您可以在WEB-INF中添加其他文件并将其添加到web.xml中,但Grails中的标准方式是在resources.xml中执行。但是,如果你也想使用插件,在这种情况下它将无法正常工作。请参阅http://www.jayway.com/2009/11/23/spring-security-for-real-with-grails/了解一些有点过时但大多数情况下有效的示例,这些示例在不使用插件的情况下配置XML的Spring Security。 –