The documentation contains the following paragraph.
"As with @Autowired, you can use @Inject at the level level, the level at the method level level, and the constructor-level level of the class."
If I don't have an error, I know that the @Inject annotation can be used at the field level, method level and constructor level, cannot be used at the class level.
Source code of input annotation:
@Target({ METHOD, CONSTRUCTOR, FIELD })
@Retention(RUNTIME)
@Documented
public @interface Inject {}
It's true?
source
share