java.lang.IllegalStateException: Autowired annotation is not supported on static fields

java.lang.IllegalStateException: Autowired annotation is not supported on static fields

Autowired spring中的注解,不能用于静态的变量。

解决办法:

去掉注解,改成get、set方法。

原文地址:https://www.cnblogs.com/guanghuiqq/p/2746316.html