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

转载:https://www.cnblogs.com/guanghuiqq/archive/2012/10/30/2746316.html

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

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

解决办法:

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

猜你喜欢

转载自blog.csdn.net/AlbertFly/article/details/88576149