For DRY CRUD take a look at this
blog entry I wrote. Be sure and read the comments because there are some nice improvements pointed out there.
I'm using JpaDaoSupport but my Spring context config looks like this:
JpaBookDao looks like this:
Because all it is right now is CRUD and that is all taken care of by JpaBaseDao.
I am thinking if tomorrow the company decides NOT to use Spring framework, my DAO Hierarchy would be un-usable Well, only your implementation. That is the idea behind coding to interfaces. In the real world if your company decided not to use Spring you're probably going to have more issues than just the DAO layer. However, technically,
you should be able to just put a new DAO implementation in place. Anywhere your code uses your DAOs should be using the interface and that code shouldn't care that the implementation is Spring specific or not.
What you will need to do however is change the way your DAOs get wired up and are access throughout the rest of your code.