simple jdbc wrapper

前端 未结 8 998
青春惊慌失措
青春惊慌失措 2021-01-01 21:35

To implement data access code in our application we need some framework to wrap around jdbc (ORM is not our choice, because of scalability).

The coolest framework I

8条回答
  •  半阙折子戏
    2021-01-01 22:13

    This sounds like a very short sighted decision. Consider the cost of developing/maintaining such a framework, especially when you can get it, and it's source code for free. Not only do you not have to do the development yourself, you can modify it at will if need be.

    That being said, what you really need to duplicate is the notion of JdbcTemplate and it's callbacks (PreparedStatementCreator, PreparedStatementCallback), as well and RowMapper/RowCallbackHandler. It shouldn't be overcomplicated to write something like this (especially considering you don't have to do transaction management).

    Howver, as i've said, why write it when you can get it for free and modify the source code as you see fit?

提交回复
热议问题