Return to site

🍃🎓 SPRING CERTIFICATION QUESTION: Spring Boot supports both Java properties and YML files. Would you recognize and understand them if you saw them?

· java,spring

Answer:

YAML is a superset of JSON, which is very handy for specifying hierarchical data:

YAML example:

db:
  dev:
    server: localhost
    port: 8080
application:
  technology:
    - java
    - spring

JSON example:

db.dev.server=localhost
db.dev.port=8080
application.technology[0]=java
application.technology[1]=spring