Hello! Today I want to make a couple of examples of database access using JDBC within Spring framework. In this article we'll see how DB's manipulations can be simplified using jdbcTemplate and JdbcDaoSupport.
Cute image from me:
Why? I really don't understand, this solution is opposite to the one of OOP design principle (DRY: Don't Repeat Yourself). If you use some code more then ones - then you must detach it to a separate method and invoke it every time you need in the future.
Spring developers offer us to avoid repeating yourself and use jdbcTemplate which can do all redundant work for us.
Let's see the differences!