如何获取Spring bean xml内的属性文件名作为日志?

问题描述

我想记录属性,但是例如,我不想每次在xml中添加属性文件时都手动更改登录代码。但是我必须知道要记录的文件名。

我使用XML:

<bean id="myProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
 <property name="locations">
  <list>
     <value>classpath:first.properties</value>
     <value>classpath:second.properties</value>
     <value>classpath:third.properties</value>
  </list>
 </property>
</bean>

这样的问题:例如,如何在Java代码中将所有名称“ first.properties”,“ second.properties”,“ third.properties”作为String []获得

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)