Getting started with application.properties

In Spring Boot, application.properties is the default file from which configuration values are picked up. Spring Boot can pick the application.properties file from anywhere on the classpath. Typically, application.properties is located at srcmain esources, as shown in the following screenshot:

The following snippet shows how you can customize Spring Security using the configuration in application.properties:

    security.basic.enabled=false
management.security.enabled=false
security.user.name=user-name
security.user.password=user-password
security.oauth2.client.clientId: clientId
security.oauth2.client.clientSecret: clientSecret
security.oauth2.client.authorized-grant-types:
authorization_code,refresh_token,password
security.oauth2.client.scope: openid

Similar to these, other Spring Boot starters, modules, and frameworks can be customized through configuration in application.properties.

In the next section, we'll look at some of the configuration options Spring Boot provides for these frameworks.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset