If you are using the Spring-framework with Spring Security, you don't have to follow the chapter Getting started with JPA Security (also you can do and specify the net.sf.jpasecurity.security.authentication.SpringAuthenticationProvider in your persistence.properties).

The easiest way to integrate Spring-Security is to simply replace your LocalEntityManagerFactoryBean or LocalContainerEntityManagerFactoryBean in your Spring configuration with the appropriate counterpart in the net.sf.jpasecurity.spring.persistence package (which are SecureLocalEntityManagerFactoryBean and SecureContainerEntityManagerFactoryBean).

The autodetection mechanism of JPA Security will automatically detect that you are using Spring Security, but you can specify your security context or authentication provider as bean property of the Secure*EntityManagerFactoryBean in your spring configuration.

You need to have the jpasecurity-spring module in your classpath to use spring security.