2013-05-04 168 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,開始使用。