找到了问题所在。复制/粘贴评论:
你确定
<context:property-placeholder>与MyClass bean在同一个应用程序上下文中(not in the parent context)吗?– axtavt
你是对的。我
<context:property-placeholder>从定义的上下文转移ContextLoaderListener到servlet上下文。现在,我的值被解析了。非常感谢

找到了问题所在。复制/粘贴评论:
你确定
<context:property-placeholder>与MyClass bean在同一个应用程序上下文中(not in the parent context)吗?– axtavt
你是对的。我
<context:property-placeholder>从定义的上下文转移ContextLoaderListener到servlet上下文。现在,我的值被解析了。非常感谢