如果没有使用注解注入,需要在applicationContext.xml中注入,现在大部分都是用注解注入,但是也要看懂以下注入方法。 下面是在userService中注入userDao,在userDao中注入jdbcTemplate。