等价于非Boot Spring项目的org.springframework.boot.context.embedded.FilterRegistrationBean吗?

约瑟夫·布莱尔

根据本教程,我正在尝试在Spring中实现外部会话处理我在添加正确的过滤器时遇到了一些麻烦。Spring Boot似乎已经定义了正确的bean /过滤器,但是我的项目不是Spring Boot,因此找不到FilterRegistrationBean在Spring的非引导版本中是否有与此类等效的类?我还尝试了org.springframework.web.context.embedded.FilterRegistrationBean,但是无法正确导入(该文档似乎是指SNAPSHOT版本,因此,该软件包可能从未属于适当的发行版)。

Sotirios Delimanolis

根据您的容器配置web.xml或ServletContainerInitializer,您可以注册一个DelegatingFilterProxy过滤器,并使它按名称引用Filter您在中声明bean ApplicationContext

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

找不到类org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration]

无法实例化接口org.springframework.context.ApplicationContextInitializer(Spring 5.2.3 + Spring Boot 2.2.3)

冲突 org.springframework.boot.test.context.SpringBootTest; 和 org.springframework.test.context.junit.jupiter.SpringExtension;

Spring-Boot-Maven-Plugin,无法实例化接口org.springframework.context.ApplicationContextInitializer

Spring Boot:SpringApplication.run导致org.springframework.context.ApplicationContextException:

Spring Boot 2.0.0.M1:软件包org.springframework.boot.context.embed在哪里?

org.springframework.boot.web.embedded.tomcat.ConnectorStartFailedException上IDEA终极2019.3

抛出java.lang.ClassNotFoundException:org.springframework.boot.context.properties.bind.Bindable

引起:java.lang.ClassNotFoundException:org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata

org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration上的错误处理条件

找不到项目'org.springframework.boot:spring-boot-starter-parent:2.4.0'

在Spring Boot中的何处如何解决“ java.lang.NoClassDefFoundError:org / springframework / data / mapping / context / MappingContext”?

org.springframework.boot.spring-boot POM的用途是什么?

项目生成错误:不可解析的父POM。无法转移org.springframework.boot:spring-boot-starter-parent

Spring Boot项目无法解决依赖关系-无法在org.springframework.boot:spring-boot-starter-web:jar:2.1.1.RELEASE上收集依赖关系

非启动 spring 项目的 Spring Boot BOM

找不到org.springframework.boot:spring-boot-starter-velocity

缺少工件 org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.M5

找不到org.springframework.boot:spring-boot-starter-log4j

缺少工件org.springframework.boot:spring-boot-starter-parent:jar:1.3.2.RELEASE

Spring Boot 1.5.0快照上的org.springframework.boot.orm.jpa.EntityScan

Spring Boot Embedded ActiveMQ持久消息

预装Spring Boot Embedded MongoDb数据

项目构建错误:org.springframework.boot的不可解析的父POM:spring-boot-starter-parent:[unknown-version]:传输失败

Spring Boot-用于多个IP地址的FilterRegistrationBean setAllow()

为什么org.springframework.boot不能导入,而org.springframework.web可以导入?

插件ID为“org.springframework.boot”未找到

导入org.springframework.boot.autoconfigure.web.ErrorAttributes无法解析

org.springframework.boot.web.support不存在