search

Home  >  Q&A  >  body text

java - 这个checkLMDao是接口,为什么可以调方法?

1.并没有实现类啊?
2.@Autowired有什么用?

PHPzPHPz2804 days ago470

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-18 10:57:22

    Because the specific implementation method is implemented for you by mybatis. You can study it in depth

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-18 10:57:22

    1. What is the use of @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.

    2. There is no implemented class?

    Because the variable is marked @Autowired.

    reply
    0
  • Cancelreply