Difference between application.yml and application .properties

  • YML is also called as YAMAlin Language,There must be no duplicate levels (no duplicate words)
  • After every level provide colon symbol(:) [Replace dot with colon]and next level should start in next line with atleast one space.
  • For last level provide colon and one space before actual value.        Lastlevel:Value
  • Same Level keys must be under same indent(same space count).Space count must be at last one , atmost n. 
  • Key names need not be in order, they can be in any order.
  • We can not create custom YAML File in Spring boot.Only file allowed : application.yml but we can create custom properties file 
  • YAML has space parser so additional spaces are ignored.
--application.properties--- --application.yml----
spring.datasource.driver-class-name=Oracle
spring.datasource.url=jdbc-orcl
spring.datasource.username=nit
spring.datasource.password=abcd
spring:
datasource:
  driver-class-name: Oracle
  url: jdbc-orcl
  username: nit
  password: abcd