java - StringRedisTemplate vs StringRedisConnection -
what differences between stringredistemplate , stringredisconnection[interface]. [we can utilize stringredisconnection defaultstringredisconnection] what different utilize cases of these 2 classes.[stringredistemplate & defaultstringredisconnection] if there major differences between 2 please tell me merit , demerit of both classes , class better. do of classes providing improve exception handling?
it seems me both classes doing same thing. if doing same set of operations on redis , 1 class syntactic sugar why these introduced separate classes. sure might missing something.
please not list method name. stringredistemplate, stringredisconnection
the stringredistemplate gives access redis connection in case defaultstringredisconnection implementation of stringredisconnection.
the stringredistemplate follows same pattern jdbctemplate, jmstemplate, mongotemplate etc... read link. key reason have template class hide boilerplate code developer. speeding development process, reduces amount of code required , in turn cut down amount of testing required , bugs. template/connection handle exceptions i.e. transform redis exceptions right dao ones.
the redistemplate , stringredistemplate classes utilize help simplify access code redis data. note 1 time template configured class thread safe.
java spring redis spring-data spring-data-redis
No comments:
Post a Comment