Spring, IoC Containers, and Static Code – Design Principles

In this article, I would like to discuss the inversion of control patterns, static code (can be legacy or newly created) within an IoC framework like spring, and the issue of wiring utility methods in static code inside the IoC framework.

Static Methods

For example, we have an HttpUtils class with inside a bunch of static methods. Should we remove the static keyword and annotate the class with a Spring stereotype, which would immediately turn it into a spring singleton?

CategoriesUncategorized