基本上我得到的错误就是:
Caused by: java.lang.IllegalStateException: Cannot convert value of type [example.TestAuthFilterEntryPoint] to required type [org.springframework.security.web.AuthenticationEntryPoint] for property 'authenticationEntryPoint': no matching editors or conversion strategy found
... 42 more
基本上我只将此类实现为AuthenticationEntryPoint
import org.springframework.security.ui.AuthenticationEntryPoint;
import org.springframework.security.AuthenticationException;
public class TestAuthFilterEntryPoint implements AuthenticationEntryPoint,
InitializingBean {...
我是否错过了如何正确“转换”这一点?
答案 0 :(得分:1)
您应该实现的接口是在Spring Security> = 3.0中的org.springframework.security.web
包中(就像您在错误消息中一样),所以它应该是:
import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.security.AuthenticationException;
public class TestAuthFilterEntryPoint implements AuthenticationEntryPoint,
InitializingBean {
// ...