/spring-boot-configuration-properties-demo

Spring Boot externalized environment based configuration with @ConfigurationProperties and Spring Profiles

Primary LanguageJava

Spring Boot @ConfigurationProperties Example

Tutorial: Spring Boot @ConfigurationProperties: Binding external configurations to POJO classes

Requirements

  1. Java - 1.8.x

  2. Maven - 3.x.x

  3. MySQL - 5.x.x

Steps to Setup

1. Clone the application

git clone https://github.com/callicoder/spring-boot-configuration-properties-demo.git

2. Build and run the app using maven

mvn package
java -jar target/config-properties-demo-0.0.1-SNAPSHOT.jar

Alternatively, you can run the app directly without packaging like this -

mvn spring-boot:run

The app will start running at http://localhost:8080.