Benefits to using Spring Templates
(JdbcTemplate, JmsTemplate, RestTemplate,
JpaTemplate, JdoTemplate, JndiTemplate)
0
1
|
What are the enumerated benefits to using the Spring template classes such as
RestTemplate ,JdbcTemplate , JpaTemplate , JdoTemplate , JndiTemplate JdoTemplate etc?
I'm looking for the general benefits of using these classes as best practice design, for example the thread safeness of these classes. Or if someone could point me to the section of the Spring documentation that discusses the same I would accept that as well.
| ||||
|
1
|
Note, that not all templates are equally useful. For instance jdbcTemplate is a pure gem, I can't live without that (mostly because JDBC is not the best interface one can imagine), on the other hand jpaTemplate does not bring so many advantages.
Note, that if you use given template, your code becomes dependent on Spring interfaces, so Spring is not only dependency mechanism for your application, but becomes also part of it - Spring is no longer easily replacable with something else (Google Guice, CDI). However, given the fact Spring is a pretty good peace of code, I would not be worried about that aspect.
| |||
add comment |