Can you use @Autowired with static fields?

In short, no. You cannot autowire or manually wire static fields in Spring. You’ll have to write your own logic to do this.

Leave a Comment