I build my spring boot application to .jar file with:
./gradlew build and when I want to run this app:
java -jar /build/libs/app.jar I get error:
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.data.mongodb.host' in string value "${spring.data.mongodb.host}" etc.
When I run this app in IntelliJ everything is ok.
My application.properties
spring.data.mongodb.host=localhost spring.data.mongodb.port=27017 spring.data.mongodb.username=newsAdminUser spring.data.mongodb.password=abc123 spring.data.mongodb.database=newssystemservice server.compression.enabled=true server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain What's the problem?
application.propertiesapplication.properties, to question