Spring Boot
Compulsory (1p)
/hello returning a greeting message defined in application.properties.
Homework (2p)
Create a Spring Boot application that must run in multiple environments, such as development, and production.
Each environment uses a different database, and the database connection details are provided in application-{profile}.yml.
The application should use JDBC for database access, conditional bean creation with Spring Expression Language (SpEL) and config property injection.
@ConfigurationProperties or @Value in order to read config data and motivate your decision.
CommandLineRunner or ApplicationLineRunner.
application.yml.
@Profile is used together with @ConditionalOnExpression in order to choose the right database.
InfoContributor to return information about the database to which the application is connected.
Advanced (2p)
Create a scenario in which multiple services must share configuration but also adapt to different environments (dev, prod), using Spring Cloud Config.