2013-05-04 222 views
2

我有一个应用程序的页面不是在jsp,但速度,并没有与春天运行...我想整合春季安全到它,但我找不到任何文档...我搜索在springource文档documentation,但我无法找到该做什么。甚至可以开始?如果是这样,我该怎么做?弹簧安全与速度?

我想准备一个弹簧安全的context.xml

<beans:beans xmlns="http://www.springframework.org/schema/security" 
    xmlns:beans="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:context="http://www.springframework.org/schema/context" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
      http://www.springframework.org/schema/context 
      http://www.springframework.org/schema/context/spring-context-3.0.xsd 
      http://www.springframework.org/schema/security 
      http://www.springframework.org/schema/security/spring-security-3.1.xsd"> 
<http pattern="/app/template/Login.vm" security="none" /> 
<http auto-config="false" use-expressions="true" > 
<form-login login-page="/app/template/Login.vm/" username-parameter="loginName" password-parameter="password" 
       login-processing-url="/app/template/Login.vm" 
       default-target-url="/app/template/Home.vm" /> 
</http> 
    <authentication-provider> 
     <user-service> 
     <user name="xx" password="123" authorities="ROLE_USER, ROLE_ADMIN" /> 
     <user name="yy" password="456" authorities="ROLE_USER" /> 
     </user-service> 
    </authentication-provider> 
    </authentication-manager> 
</beans:beans> 

--thank你的帮助

回答

1

没有什么是在所有使用Spring Security的提供方法级的阻止你使用Velocity模板的项目的安全性。这两种技术将会一起愉快地玩。事实上,多年前,原作者Ben Alex曾经在培训课程中告诉学生他比JSP更喜欢速度。

如果你想要Spring MVC框架,它也支持Velocity作为模板引擎。

要给大家介绍Spring中的一些见解核心由以下部分组成:

  • 设计模式 - 依赖注入
  • 一种编程范式 - 面向方面的编程

在提供一些轨道围绕上述内容,核心是非常有用的。它也是Spring MVC和Spring Security等其他投资组合产品的基础。

我强烈推荐本书Spring in Action,开始使用。