简体   繁体   English

使用Spring JdbcTemplate构建数据层

[英]Building a data layer using Spring JdbcTemplate

Do you know of any resources that describe building a data access layer using Spring's JdbcTemplate classes? 您是否知道使用Spring的JdbcTemplate类构建数据访问层的任何资源? I'm looking for something beyond the basics described in the Spring framework documentation. 我正在寻找超出Spring框架文档中描述的基础知识的东西。

If not the online docs, perhaps books will help. 如果不是在线文档,也许书籍会有所帮助。 "Spring in Action", "Pro Spring", "Spring Recipes" - take your pick. “Spring in Action”,“Pro Spring”,“Spring Recipes” - 随你挑选。 I'm not sure how much detail you're looking for, though. 不过,我不确定你要找多少细节。 I fear that you'll be disappointed. 我担心你会失望的。

I'm not really sure of exactly what it is you are looking for, but I basically create a DAO class that has a SimpleJDBCTemplate as a property. 我不太确定你正在寻找什么,但我基本上创建了一个具有SimpleJDBCTemplate作为属性的DAO类。 It is set via dependency injection. 它是通过依赖注入设置的。 The public methods of the DAO abstract the interaction with the SimpleJDBCTemplate. DAO的公共方法抽象了与SimpleJDBCTemplate的交互。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM