JdbcTemplate 对象和 SimpleJdbcTemplate 之间有什么区别?
最佳答案
截至Spring 3.1 SimpleJdbcTemplate
已弃用,SimpleJdbcTemplate
的大部分功能已集成到 JdbcTemplate
中,除了 NamedParameterJdbcTemplate
提供的命名参数.
底线是,如果您使用 SimpleJdbcTemplate 完全没问题,并且不必急于升级,但对于新开发,您应该使用 JdbcTemplate 或 NamedParameterJdbcTemplate。
如果有人感兴趣,I've posted an usage example of JdbcTemplate在我的博客中(从 project set up in the previous post 开始),更多有趣的例子在 official Spring documentation 中。 .
关于Java Spring JdbcTemplate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3365359/