Why does my spring boot web application fail to load its configuration properties?

I have created a trivial example spring boot web application and it is running well. That is, the web application starts, the controllers respond to requests by calling services and returning results. I am now trying to add configuration via an application.properties file and I simply cannot get it to load.

I am using Spring Boot 2, Spring 5, Eclipse and Maven. My pom.xml contains:




My web application class is:


public class ExampleWebApp {

public static void main(String[] args) {

SpringApplication.run(ExampleWebApp.class, args);



My service class where I try and load the environment is:


public class DataService...

Read More »

By: StackOverFlow - Monday, 16 April

Related Posts