@Value and Spring Properties

@Value annotation allows you to inject either values or results of expression into fields or even methods and constructors. Spring has several mechanisms to deal with configuration and dependency inject. IMHO for Services is more them fine to use all these features, however for libraries we need to be extremely careful and I would say you don't want to use any of these capabilities. We also need to be careful about versioning properties inside jars, especially for libraries. It's very easy to get unpredictable behavior. So great powers require great responsibility and thinking beyond anything I made a video showing some of this feature and also some simple POC - so let's get started!



The Video


The Code


Cheers,
Diego Pacheco

Popular posts from this blog

Java Agents

Manage Work not People

DDD The Lost Discipline