0
0
Spring Bootframework~5 mins

application.properties structure in Spring Boot - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the application.properties file in a Spring Boot project?
It is used to configure application settings like server port, database connection, and other properties in a simple key-value format.
Click to reveal answer
beginner
How are properties structured inside application.properties?
Properties are written as key-value pairs separated by an equals sign, for example: <br>server.port=8080
Click to reveal answer
intermediate
How can you organize properties for different environments using application.properties?
You create separate files like application-dev.properties or application-prod.properties and activate them via the spring.profiles.active property.
Click to reveal answer
intermediate
What is the difference between application.properties and application.yml?
application.properties uses simple key-value pairs, while application.yml uses YAML format which supports nested structures and is more readable for complex configs.
Click to reveal answer
beginner
Can you use comments in application.properties? How?
Yes, comments start with a hash symbol #. Anything after # on the line is ignored by Spring Boot.
Click to reveal answer
What symbol separates keys and values in application.properties?
A,
B:
C-
D=
How do you activate a specific profile in Spring Boot?
Aspring.profiles.active=profileName
Bprofile.active=spring
Cspring.active.profile=profileName
Dactive.profile=spring
Which file format supports nested configuration better?
Aapplication.yml
Bapplication.xml
Capplication.properties
Dapplication.json
How do you write a comment in application.properties?
A// This is a comment
B<!-- This is a comment -->
C# This is a comment
D/* This is a comment */
What would this line do? server.port=9090
ASets the database port to 9090
BSets the server port to 9090
CStarts the server on port 80
DDisables the server
Explain the structure and purpose of the application.properties file in Spring Boot.
Think about how you tell your app what settings to use.
You got /4 concepts.
    Describe how to manage different environments using application.properties files.
    Consider how you might have different settings for testing and production.
    You got /3 concepts.