[英]Error: Unable to access jarfile auth-api.jar - SpringBoot
I am trying to set environment based configuration.我正在尝试设置基于环境的配置。 Have created 3 different Spring profiles that I will be using during app development.
创建了 3 个不同的 Spring 配置文件,我将在应用程序开发期间使用它们。
I have created:我创造了:
application-dev.yaml
(which should be default profile) application-dev.yaml
(应该是默认配置文件)application-test.yaml
application-prod.yaml
When I am trying to run app locally using当我尝试使用本地运行应用程序时
java -jar auth-api.jar --spring.profiles.active=dev
I am getting the following error:我收到以下错误:
Error: Unable to access jarfile auth-api.jar
This is how my folder structure looks:这是我的文件夹结构的样子:
If you are on your project root, then give this command java -jar target/auth-api.jar --spring.profiles.active=dev
or you can navigate to the target folder and then give this command java -jar auth-api.jar --spring.profiles.active=dev
如果你在你的项目根目录,然后给出这个命令
java -jar target/auth-api.jar --spring.profiles.active=dev
或者你可以导航到目标文件夹然后给出这个命令java -jar auth-api.jar --spring.profiles.active=dev
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.