I created a small application that reads an Excel file and creates all the necessary SQL queries for it. An Excel file manipulates clients from time to time.
The first line of the Excel file includes a heading, which I need to convert to integers when reading lines. For example, the heading "English" must be translated to "30" before I generate SQL queries. (Only some internal definitions). (You can compare it with DNS, the human-accessible domain name in the IP address mapping) I am currently doing the mapping manually, but I want to get rid of this step using the tiny Spring configuration. Since the headers are not fixed, you must read the header information from the properties file.
I found something like this:
<bean class="java.util.HashMap" id="exampleMapping"> <constructor-arg index="0"> <map> <entry key="theKey" value="theValue"/> <entry key="otherKey" value="otherValue"/> </map> </constructor-arg> </bean>
Which seems to work quite well. But the Spring configuration is compiled into a jar. Thus, my first choice (if possible) was to push out the key value pairs into the properties file.
source share