Link Details

Link 1110443 thumbnail
User 331299 avatar

By haiphucnguyen
via esofthead.com
Published: Feb 13 2014 / 21:26

We were happy with how we build dynamic SQL using above approach for a while. It works as expected and it is rather easy to maintain SQL statements. However, our features list are always change (and I guess you also face the problem like us, do you?). We are asked to build more flexible query statement, also controls the flow in SQL scripts not only with #if or #foreach. It is time we look for another solution of using script in our SQL statement and it is luckily we found MyBatis-Velocity project. Good things for us are we have experience with Velocity before, and it seems this project fit to our needs, the bad things is the author give only the short introduction how to use Velocity scripting engine in Velocity, also he did not instruct how we use velocity in Spring base application. After several trial and writing some unit tests and debug what are fails, I am delighted to share way how we use Velocity engine in Mybatis, Spring based application.
  • 5
  • 0
  • 477
  • 1732

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (4)



Voters Against This Link (0)



    Debugging JavaScript
    Written by: Ashutosh Sharma
    Featured Refcardz: Top Refcardz:
    1. Design Patterns
    2. OO JS
    3. Cont. Delivery
    4. Java EE7
    5. HTML5 Mobile
    1. Java EE7
    2. Spring Annotations
    3. Git
    4. Java
    5. REST