YAML configuration

Spring Boot also supports YAML to configure your properties.

YAML is an abbreviation for "YAML Ain't Markup Language". It is a human readable structured format. YAML is commonly used for configuration files.

To understand basic syntax of YAML, look at the example below ;(application.yaml). This shows how our application configuration can be specified in YAML.

spring:   profiles:      active: prodsecurity:   basic:      enabled: false   user:      name=user-name      password=user-passwordoauth2:   client:      clientId: clientId      clientSecret: clientSecret      authorized-grant-types: authorization_code,refresh_token,password      scope: openidapplication:   enableSwitchForService1: true   service1Url: http://abc-dev.service.com/somethingelse   service1Timeout: 250

As ...

Get Mastering Spring 5.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.