为什么注入Jdbctemplate而不是JdbcOperations?

看到很多文章都是注入JdbcTemplate的,为什么不是注入它的接口JdbcOperations呢?

@Autowried
private JdbcTemplate jdbcTemplate;

 

JdbcTemplate是JdbcOperations的实现类吗?

因为接口的方法类一定都会实现,但是类的方法接口不一定有,会导致你调用不到方法