Bird
0
0

You wrote this in application.properties:

medium📝 Debug Q6 of 15
Spring Boot - Application Configuration
You wrote this in application.properties:
service.url=${SERVICE_URL}

But at runtime, Spring Boot throws an error about unresolved placeholder. What is the likely cause?
AYou must use %SERVICE_URL% instead
BThe syntax ${SERVICE_URL} is invalid
CThe environment variable SERVICE_URL is not set
DSpring Boot does not support environment variables
Step-by-Step Solution
Solution:
  1. Step 1: Understand placeholder resolution in Spring Boot

    Spring Boot tries to replace ${SERVICE_URL} with the environment variable value.
  2. Step 2: Identify cause of unresolved placeholder error

    If SERVICE_URL is not set in environment or properties, Spring Boot cannot resolve it and throws an error.
  3. Final Answer:

    The environment variable SERVICE_URL is not set -> Option C
  4. Quick Check:

    Unresolved placeholder = missing env var [OK]
Quick Trick: Unresolved placeholder means env var is missing [OK]
Common Mistakes:
  • Thinking syntax ${VAR} is wrong
  • Using Windows %VAR% syntax incorrectly
  • Assuming Spring Boot ignores missing env vars

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes