Brother, you are quite lazy. This world is for lazy people. You can write an abstract base class, and then let all your classes that need to do this inherit this base class. In this way, you don’t have to write Annotated, but the key point is that you still need to write a custom bean factory
Brother, you are quite lazy. This world is for lazy people.
You can write an abstract base class, and then let all your classes that need to do this inherit this base class.
In this way, you don’t have to write Annotated, but the key point is that you still need to write a custom bean factory
No, because the annotations are based on the annotations you write based on the scanner, and spring creates the object for you,
No, and it is recommended that you use it
@Resource
注解替代@Autowired