Java Spring security没有';我不能和angularJS一起工作

Java Spring security没有';我不能和angularJS一起工作,java,angularjs,spring,spring-mvc,Java,Angularjs,Spring,Spring Mvc,我已经用java和angularJS编写了一个应用程序。现在我想添加Spring安全性,但Spring不处理angular的路径 以下是安全属性: <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

我已经用java和angularJS编写了一个应用程序。现在我想添加Spring安全性,但Spring不处理angular的路径

以下是安全属性:

<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"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/security
    http://www.springframework.org/schema/security/spring-security-3.2.xsd">


    <http auto-config="true" use-expressions="true">

        <intercept-url pattern="/login" access="permitAll" />
        <intercept-url pattern="/rest#/registration" access="permitAll" />
        <intercept-url pattern="/rest**" access="hasRole('ROLE_USER')" />

        <form-login login-page="/login" 
            default-target-url="/rest"
            authentication-failure-url="/login?error" username-parameter="username"
            password-parameter="password" />
        <logout logout-success-url="/login?logout" />
    </http>

    <authentication-manager>
        <authentication-provider user-service-ref="myUserDetailsService">
            <password-encoder hash="md5" />
        </authentication-provider>
    </authentication-manager>

</beans:beans>


Spring正在阻止由“/rest”启动的所有路径,因此我无法打开注册页面。

Spring位于服务器上,它确实知道有关#路径的任何信息,这些路径仅与客户端相关。您需要做的是: 1.使用“角度”隐藏视图。(基于用户角色u accure from server) 2.使用spring保护ajax调用