HI我正在尝试实现Spring Security:并发会话控制一次限制一个会话。我看到我只需要
<http>
...
<session-management>
<concurrency-control max-sessions="1" />
</session-management>
</http>
我从参考http://docs.spring.io/spring-security/site/docs/3.1.x/reference/springsecurity-single.html#ns-config得到了这个。我遇到的问题是我收到此错误,说“配置问题:无法建立AuthenticationEntryPoint。请确保您通过命名空间配置登录机制(例如表单登录)或指定自定义AuthenticationEntryPoint 'entry-point-ref'属性“我不需要在配置中使用登录页面。我看到其他帖子,但我找不到解决这个问题的方法。请帮我解决这个问题。我将在下面发布我的代码。
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/mvc"
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.1.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring- mvc.xsd">
<security:http>
<security:session-management>
<security:concurrency-control max-sessions="1" error-if-maximum-exceeded="true" />
</security:session-management>
</security:http>