Java 如何在SpringbeanXML for log中获取属性文件名?
我想记录属性,但例如,我不想每次在xml中添加新属性文件时手动更改登录代码。但我必须知道日志记录的文件名 我在XML中有:Java 如何在SpringbeanXML for log中获取属性文件名?,java,xml,spring,spring-boot,Java,Xml,Spring,Spring Boot,我想记录属性,但例如,我不想每次在xml中添加新属性文件时手动更改登录代码。但我必须知道日志记录的文件名 我在XML中有: <bean id="myProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list>
<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>
类路径:first.properties
类路径:second.properties
类路径:third.properties
所以问题是:如何将所有名称“first.properties”、“second.properties”、“third.properties”作为字符串[]获取,例如在java代码中