【发布时间】:2011-09-03 03:18:47
【问题描述】:
是否可以通过从属性文件中获取值来设置 Tomcat 的 web.xml 中的值?
例如我想在属性文件中外部化用户角色设置,是否可以这样做:
我的属性文件:
#properties file
my.user.role=role1
我的 web.xml:
<security-role>
<role-name>${my.user.role}</role-name>
</security-role>
编辑:
我找到了this 的帖子,所以我猜角色需要在web.xml 中设置为静态。
【问题讨论】:
标签: tomcat properties web.xml