gpt4 book ai didi

grails - applicationContext中的Spring-security AuthenticationEntryPoint

转载 作者:行者123 更新时间:2023-12-02 14:45:23 24 4
gpt4 key购买 nike

基本上我得到一个基于此的错误:

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 {...

在如何正确“转换”它方面,我是否遗漏了一些东西?

最佳答案

你应该实现的接口(interface)在org.springframework.security.web Spring Security >= 3.0 中的包(就像您在错误消息中一样),所以它应该是:

import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.security.AuthenticationException;
public class TestAuthFilterEntryPoint implements AuthenticationEntryPoint,
InitializingBean {
// ...

关于grails - applicationContext中的Spring-security AuthenticationEntryPoint,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12746112/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com