这是我的 web.xml 的一部分:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:application-config.xml
</param-value>
</context-param>
application-config.xml 使用属性占位符:
<context:property-placeholder location="classpath:properties/db.properties"/>
是否有可能以某种方式定义要在 web.xml 中而不是在 application-config.xml 中使用的属性文件?