Spring properties in the injection comment
Others
2019-11-02 01:36:54
views: null
@Inject use
- JSR330 specification implemented
- The default in accordance with the type of injection
- If you need to inject by name, @ Inject need to be used with @Name
@Resource
- JSR250 specification implemented, requires a different packet introduced
- @Resource is matched by name
@Autowired
- Spring defined annotations
- The default in accordance with the type of injection
- If you need to use with injection by name, you need to meet @Qualifier comment
- Contains a require property
Origin www.cnblogs.com/watertreestar/p/11780306.html