Quantcast
Viewing latest article 2
Browse Latest Browse All 44

Difference between @Autowired and @Resource in Spring

The main difference is that @Autowired wires per type and @Resource wires per bean name. But @Autowired in combination with @Qualifier also autowires by name.

…@Autowired is a spring annotation whereas @Resource is specified by the JSR-250. So the latter is part of normal java where as @Autowired is only available by spring.

Autowired and Resource difference – Spring Community Forums


Veröffentlicht in Spring Universe Tagged: annotation, Dependency Injection, Java Basics, spring Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing latest article 2
Browse Latest Browse All 44

Trending Articles