Spring Tips: Configuration
speaker: Josh Long (@starbuxman)
Hi, Spring fans! Welcome to another installment of Spring tips! in this installment, we're going to look at something that's rather foundational, and something that I wish I'd addressed earlier: configuration. And no, I don't mean functional configuration or java configuration or anything like that, I'm talking about the string values that inform how your code executes. the stuff that you put in application.properites. that configuration.
All configuration in Spring emanates from the Spring Environment
abstraction. The Environment
is sort of like a dictionary - a map with keys and values. Environment
is just an interface through which we can ask questions about, you know, the Environment
. The abstraction lives in Spring Framework and was introduced in Spring 3, more than a decade ago. up until that point, there was a focused mechanism to allow integration of configuration called property placeholder resolution. This environment mechanism and the constellation of classes around that interface more than…