We can’t autowire static fields in spring because the Spring context might not be loaded when the java class loader loads the static values.
In that case the class loader won’t properly inject the static fields in the bean and will fail.
We can’t autowire static fields in spring because the Spring context might not be loaded when the java class loader loads the static values.
In that case the class loader won’t properly inject the static fields in the bean and will fail.