In MyBatis, you mark the places where parameters should be inserted into your SQL like so:
SELECT * FROM Person WHERE id = #{id}
This will work:
SELECT * FROM Person WHERE name LIKE '%' + #{beginningOfName} + '%';