Spring Database


  • DAO support 
  • @Repository annotation 
  • Data access through JDBC 
    • JdbcTemplate class 
    • NamedParameterJdbcTemplate class 
  • Data access through ORM 
    • Hibernate 
    • JPA 
    • Spring Data JPA Note that “Spring Data JPA” is a new and recommended RDBMS data access technology moving forward!

DAO Support

Why DAO (Data Access Object)? 

  • The DAO support in Spring is aimed at providing consistency/portability to your code regardless what persistence technologies like JDBC, Hibernate, JPA or JDO are used underneath 
    • Portability of code - switching to a different persistence technology (JDBC to JPA, for example) is a matter of changing a few lines in the configuration file 
    • It also allows one to code without worrying about catching exceptions that are specific to each persistence technology

You must have an active subscription to download PDF,Lab Zip and Recordings of this course topic.Please click the "Subscribe" button or the "Login" button if you already have an account.