Let ${myVar} stands for a variable named myVar (it’s the Maven template for inlining Maven variables ).
We will allow users application to define the data root directory.
So, let ${app.base.dir}, a variable representing the directory you chose as the full path of data application.
The maven reference about variables usage is not a coincidence.
Indeed, we will use this variable with Maven to perform this requirement.
How ? Simply by declaring the variable like a property (key-value) in a property file located in our src/main/resources directory.
Our property file config.properties will have for content :
app.base.dir=C:/tutorial-trading |
The directory structure that I propose to store stocks is the following:
${app.base.dir}/quotes/${isinAction}/${year}/${monthNumeric}.csv |
where ${isinAction} is a stock ISIN, ${year} is the year and ${monthNumeric} is the month number of the year (1-12).
So, there will be up to 12 CSV files by year and by stock.
For readability and debugging purposes, each CSV quotation file (therefore for each month) is ordered by chronological date.
The directory structure that I propose to store stock lists is the following :
${app.base.dir}/list/${myList}.csv |
where ${myList} is the list name.