【发布时间】:2014-12-25 16:42:10
【问题描述】:
在经典的 web.xml 类型配置中,您可以像这样配置上下文参数
web.xml
...
<context-param>
<param-name>p-name</param-name>
<param-value>-value</param-value>
</context-param>
...
这是如何在 spring-boot 中实现的。我有一个需要参数的过滤器。
我正在使用 @EnableAutoConfiguration 并在我的 pom.xml 中包含 <artifactId>spring-boot-starter-jetty</artifactId>。
【问题讨论】:
-
查看文档以了解 application.properties 选项。其中许多你可以在一行中解决:) docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/….
标签: spring-mvc jetty spring-boot