I have created an XML properties file which contains an sql query as following :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<entry key="sample.select">
<![CDATA[
The SQL query goes here
]]>
</entry>
</properties>
In my DAO I want to get the property "sample.select", but I don't know how is that done in Spring Boot, when I googled about it I found that I have to add the annotation @ImportResource("classpath:my-file.xml") to the Application class, but I want to read the ressource file inside my DAO class and not the Application class.
How can I solve this ?