1.并没有实现类啊?2.@Autowired有什么用?
学习是最好的投资!
Because the specific implementation method is implemented for you by mybatis. You can study it in depth
@Autowired
@AutowiredYou can annotate member variables, methods and constructors to complete automatic assembly.
To put it simply: Spring helps you find a class that implements this interface and instantiates the marked variable.
Because the variable is marked @Autowired.
Because the specific implementation method is implemented for you by mybatis. You can study it in depth
1. What is the use of
@Autowired
?To put it simply: Spring helps you find a class that implements this interface and instantiates the marked variable.
2. There is no implemented class?
Because the variable is marked
@Autowired
.