我的 Spring Boot 应用程序中有一个使用环境变量的属性文件org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlinorg.apache.ws.security.crypto.merlin.keystore.type=jksorg.apache.ws.security.crypto.merlin.keystore.password=${env:keyStorePassword}org.apache.ws.security.crypto.merlin.keystore.alias=${env:keyAlias}org.apache.ws.security.crypto.merlin.keystore.file=${env:keyStoreFilePath}但是,它说它找不到文件,同时提供文件的路径。所以它正确地从环境文件中提取值。我还复制了文字值而不是环境变量并将其放入属性文件中,并且效果很好。为什么当我从环境中拉出它说找不到文件时?这是错误日志17:06:12.537 [http-nio-8080-exec-1] DEBUG org.apache.ws.security.util.Loader - Trying to find [<file>] using org.springframework.boot.loader.LaunchedURLClassLoader@38af3868 class loader.17:06:12.542 [http-nio-8080-exec-1] DEBUG org.apache.ws.security.util.Loader - Trying to find [<file>] using org.springframework.boot.loader.LaunchedURLClassLoader@38af3868 class loader.17:06:12.559 [http-nio-8080-exec-1] DEBUG org.apache.ws.security.util.Loader - Trying to find [<file>] using ClassLoader.getSystemResource().17:06:12.568 [http-nio-8080-exec-1] DEBUG org.apache.ws.security.components.crypto.Merlin - <file> (No such file or directory)java.io.FileNotFoundException: ${env:keyStoreFilePath} (No such file or directory)该标签与环境变量中的文件路径完全相同。感谢您的任何帮助,您可以提供。
添加回答
举报
0/150
提交
取消