Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
带Spring.config.location的Spring_Spring_Spring Boot_Config - Fatal编程技术网

带Spring.config.location的Spring

带Spring.config.location的Spring,spring,spring-boot,config,Spring,Spring Boot,Config,我试图指向外部配置文件的路径,如下所示: --spring.config.location=file: C:/Users/some_user/workspace/repository1/payment-api/payment.yml 但它不起作用。知道为什么吗?正确的前缀是file://。在Windows上,如果文件URL是带驱动器前缀的绝对URL,则需要在文件URL中添加一个/in 试一试file:///C:/Users/some_user/workspace/repository1/pay

我试图指向外部配置文件的路径,如下所示:

--spring.config.location=file: C:/Users/some_user/workspace/repository1/payment-api/payment.yml
但它不起作用。知道为什么吗?

正确的前缀是file://。在Windows上,如果文件URL是带驱动器前缀的绝对URL,则需要在文件URL中添加一个/in

试一试file:///C:/Users/some_user/workspace/repository1/payment-api/payment.yml

正确的前缀是file://。在Windows上,如果文件URL是带驱动器前缀的绝对URL,则需要在文件URL中添加一个/in

试一试file:///C:/Users/some_user/workspace/repository1/payment-api/payment.yml