Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何解决 Maven 表达式中的列表项?
例如在以下片段中:
<configuration> <animals> <animal>cat</animal> <animal>dog</animal> <animal>aardvark</animal> </animals> </configuration>
用什么表达来获得“狗”。它应该是类似的东西${configuration.animals.animal<?>}。
${configuration.animals.animal<?>}
您可以使用${configuration.animals[1]}
${configuration.animals[1]}
参考:http: //jira.codehaus.org/browse/PLXUTILS-37