Application.properties

# Profiles (1)
spring.profiles.active=local,api

# Initialize Sql Statements (2)
spring.datasource.initialization-mode=NEVER
#spring.datasource.data=data.sql

# Scheduling Config (default setting: will be overridden by scheduling profile) (3)
scheduling.enabled=false

# Web Application Type (default setting: will be overridden by api profile) (4)
spring.main.web-application-type=none
server.port=-1
  1. Profiles can be used to trigger additional property files and can be used in Beans with @Profile() so that Spring only loads the Bean when the profile is activated. This can be very useful if you want multiple builds for different microservices. local and api will load both application-api.properties and application-local.properties
  2. Used if you want to execute a sql script at the start of the program.
  3. This is a custom property for enabling the conditional config SchedulingConfig
  4. The default setting is servlet, but we may want a microservice config that isn't a web application.