I have a legacy spring mvc application which is using spring jdbc as ORM. Now I wanted to use spring boot and instead of mvc I will be converting it in to RestAPI. I have problem with database query part. Using propertyplaceholder xml confi the external sql query properties file is configured in the old application. Using Spring boot and latest annotation methods how can I configure this. My understanding is
- Place the query properties file in src/main/resources directory
- In DAO create property name same as the key ( name ) of the sql.
- create getter and setter for the key property
Is this is the right approach ? if yes if I use this how I will get the query in my DAO class ?. If not what is the best method.