我在 user_directory/.m2 文件夹中有一个settings.xml文件 . 我在 settings.xml 中设置了一个属性 . 我希望它在 spring.xml 中访问它 .
Setting.xml的
default
true
Test
在我写的pom.xml中
src/main/resources
true
我是否必须在src / main / resources文件夹中创建 test.properties 文件 .
name = ${testName}
在 spring.xml 我用它作为
run.Exception是
线程“main”中的异常org.springframework.beans.factory.BeanInitializationException:无法加载属性;嵌套异常是java.io.FileNotFoundException:类路径资源[src / main / resources / test.properties]无法打开,因为它不存在
出了什么问题 . 如何从 settings.xml 到 spring.xml 访问属性 .