| Author |
BeanPropertySqlParamterSource vs ParameterMap
|
Adam Jelinek
Greenhorn
Joined: Feb 07, 2012
Posts: 6
|
|
I know that the BeanPropertySqlParamterSource can make things easier, and potentially prevent issues from miss typing the parameter map or row mapper, but what about performance.
I have been trying to find something online that talks about the performance difference between the two, but I have not had any luck. From what I have seen it does the BeanPropertySqlParameterSource does use reflection to call your getters and setters (not necessarily bad). I have to assume that it is a longer code path. Anyways has anyone done any testing? I keep going back and forth, but continue to lean towards coding the parameter maps and row mappers.
Thanks
|
 |
Bill Gorder
Bartender
Joined: Mar 07, 2010
Posts: 1282
|
|
|
I doubt the performance difference is going to be noticeable. The fact that you are not finding any complaints online about it supports this theory. I would not prematurely optimize. If you are using it and not having performance issues than don't worry about it. Choose the method you are most comfortable with and use it.
|
[How To Ask Questions][Read before you PM me]
|
 |
 |
|
|
subject: BeanPropertySqlParamterSource vs ParameterMap
|
|
|