当前位置:网站首页>@What is the difference between resource and @autowired?
@What is the difference between resource and @autowired?
2022-07-07 12:49:00 【Six years of Surabaya】
@Resource and @Autowired The difference between ?
@Autowired yes Spring Notes provided ,@Resource yes JDK Notes provided .
@Autowired Can only be injected by type ,@Resource By default, it is injected by name , You can also inject by type .
@Resource By default, it is injected by name , If the injection fails, it will be injected by type , If injection fails by type, an exception will be thrown .
边栏推荐
- leetcode刷题:二叉树26(二叉搜索树中的插入操作)
- Visual stdio 2017 about the environment configuration of opencv4.1
- Leetcode skimming: binary tree 25 (the nearest common ancestor of binary search tree)
- MPLS experiment
- 基于NeRF的三维内容生成
- [statistical learning method] learning notes - logistic regression and maximum entropy model
- Design and implementation of communication protocol
- 【统计学习方法】学习笔记——支持向量机(上)
- Leetcode skimming: binary tree 20 (search in binary search tree)
- Creation and assignment of graphic objects
猜你喜欢
Polymorphism, final, etc
Leetcode question brushing: binary tree 26 (insertion operation in binary search tree)
【统计学习方法】学习笔记——支持向量机(下)
Master formula. (used to calculate the time complexity of recursion.)
Day-18 hash table, generic
3D content generation based on nerf
Static routing assignment of network reachable and telent connections
什么是ESP/MSR 分区,如何建立ESP/MSR 分区
ICLR 2022 | pre training language model based on anti self attention mechanism
leetcode刷题:二叉树26(二叉搜索树中的插入操作)
随机推荐
Experiment with a web server that configures its own content
基于NeRF的三维内容生成
【二叉树】删点成林
Charles: four ways to modify the input parameters or return results of the interface
【从 0 开始学微服务】【02】从单体应用走向服务化
SSM框架搭建的步骤
Object. Simple implementation of assign()
【从 0 开始学微服务】【03】初探微服务架构
HZOJ #240. 图形打印四
About IPSec
通讯协议设计与实现
gcc 编译报错
【PyTorch实战】图像描述——让神经网络看图讲故事
Static vxlan configuration
2022 examination questions and online simulation examination for safety production management personnel of hazardous chemical production units
@Resource和@Autowired的区别?
【从 0 开始学微服务】【01】什么是微服务
Zhimei creative website exercise
聊聊Redis缓存4种集群方案、及优缺点对比
Day-24 UDP, regular expression