开发者

Spring persistence layer for dynamic queries

I have legacy app having its own persistent laye开发者_Python百科r. I cannot call it a framework but it does its job although very complicated and not componentised so gets very difficult to extend or add features.

I am looking to use some latest technology to be introduced in the system where the new code is written in the new framework and slowly deprecate the legacy layer.

I am inclined to use Spring framework JDBC layer and AOP based transaction management. My requirement is complicated as most of the queries are dynamic. The columns to be selected/updated are dynamic as depends on permission of the attribute to the user. Also since most of the entities have similar logic most of the time only table or view name needs to be changed in a query.

What do you suggest in terms of what part of Spring I should use to write the SQL queries?


Have you taken a look at Spring's SimpleJDBCTemplate? It would seem to fit the bill for your project.

http://www.vaannila.com/spring/spring-simple-jdbc-template.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜