Open aCodeRancher opened 5 years ago
For example in JdbcIngredientRepository, you can omit @Autowired, because there is an autowired by constructor.
As of Spring Framework 4.3, an @Autowired annotation on such a constructor is no longer necessary if the target bean only defines one constructor to begin with. However, if several constructors are available, at least one must be annotated to teach the container which one to use.
Hi, I commented out all the @Autowired for all the JdbcTemplate in all JdbcXXXRepository and I also commented out the @Autowired for the constructor in DesignTacoController. But everything still works fine. I expected a null pointer exception. Why?