问题解决: @Resource annotation is not supported on static fields
来源:互联网 发布:淘宝天猫怎么开店 编辑:程序博客网 时间:2024/05/17 22:32
今天做项目,需要给一个类中的静态变量使用@Resource,然后注入时候,程序报错了 @Resource annotation is not supported on static fields,原来spring annotation不支持静态变量注入,因此上网搜了一下,找到了解决的办法,就是把get,set方法的static 修饰符去掉,然后在set方法上面加@Resource即可,问题解决
3 1
- 问题解决: @Resource annotation is not supported on static fields
- @Resource annotation is not supported on static fields
- Resource annotation is not supported on static fields
- Spring 实现线程接口 Runnable 注解注入失败 @Resource annotation is not supported on static fields
- java.lang.IllegalStateException: Autowired annotation is not supported on static fields
- SSLPassPhraseDialog builtin is not supported on Win32
- Annotation processing is not supported for module cycles解决方案
- 记录 Annotation processing is not supported for module cycles.
- 【问题解决】Project facet Java version 6.0 is not supported.
- HTTP method GET is not supported by this URL 问题解决
- 【问题解决】Project facet Java version 1.7 is not supported.
- 【问题解决】Project facet Java version 1.7 is not supported.
- Project facet Java version 1.7 is not supported 问题解决方法
- 【问题解决】Project facet Java version 1.7 is not supported.
- 【问题解决】Project facet Java version 1.7 is not supported.
- 【问题解决】Project facet Java version 1.7 is not supported.
- 【问题解决】Project facet Java version 1.7 is not supported.
- matplotlib安装“is not a supported wheel"问题解决
- iOS 中^block 示例
- 如何辨别美国私立高中优劣程度
- 【犀利评】看完你能乐得多吃一碗饭
- ns3为协议默认安装的loopback接口
- Java_增强for循环
- 问题解决: @Resource annotation is not supported on static fields
- SQL之正则表达式
- 认识.NET
- NDK编译X265库到ARM,遇到问题
- 替换字符串String中的元素和分割字符串为数组
- Python中的base64、base32实例
- 云计算容器服务该何去何从
- android studio 目录结构
- am335x在ubuntu下使用StarterWare编写裸机程序并在CCS中用Jlink调试