我有性质serverpath.properties文件,XML文件名为search-servlet.xml的 有位置就像是/properties/serverpath.properties和/src/spring/search-servlet.xml访问属性文件密钥
serverpath.properties包含以下键值对 wmcorelib.authentication.url = http://qae.ws.wiley.com:8001/als
现在我想用这个键wmcorelib.authentication.url我的XML中。
任何帮助都会很大
你想在运行时或编译时使用它吗? – radimpe
我想要编译时间 – user2959826
您可以将属性加载到hashmap中,解析XML,然后迭代其节点。如果您发现与您的地图匹配,请将值替换为键值。这种后处理适合你吗? –