简体   繁体   English

无法使用特定配置文件运行 Spring 引导 JAR 文件

[英]Can't run Spring Boot JAR file with specific profiles

Like the image I've attached, I can run my JAR file with command 'java -jar', but it doesn't work when I add a spring.profiles.active config, and I can't get any infomation in my console.就像我附上的图片一样,我可以使用命令“java -jar”运行我的 JAR 文件,但是当我添加 spring.profiles.active 配置时它不起作用,并且我在控制台中无法获得任何信息.

截屏

Please try it as below:请尝试如下:

java -jar service-app-1.7.44.jar -Dspring.profiles.active=demo

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM