O'Reilly logo

Spring Data by Petri Kainulainen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring the Spring application context

Traditionally, we would use declarative configuration with XML configuration files, but after Spring Framework 3.0 was released, it has been possible to configure the Spring application context by using programmatic configuration. This is our weapon of choice when we are configuring the application context of our application.

We can configure the Spring application context by following these steps:

  1. Create a properties file for the values of the configuration parameters.
  2. Create the application context configuration class.

Creating the properties file

The actual values of the configuration parameters are stored in a properties file called application.properties. This file contains database connection details, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required