需求如下:
现在我想把动态配置到properties文件当中,示例如下:
merchantNo1=12312321
merchantNo1.webchat.appid=2222222
merchantNo1.webchat.mch_id=33333
merchantNo1.webchat.key=4444
merchantNo2=11111111
merchantNo2.webchat.appid=2222222
merchantNo2.webchat.mch_id=33333
merchantNo2.webchat.key=4444
merchantNo3=default
merchantNo3.webchat.appid=2222222
merchantNo3.webchat.mch_id=33333
merchantNo3.webchat.key=4444
然后我在代码实现的方式是,如果merchantNo传的值是default那么appid等值就取
的是如下的这些值,求大神告知如何实现
merchantNo3.webchat.appid=2222222
merchantNo3.webchat.mch_id=33333
merchantNo3.webchat.key=4444