Reputation: 73
RESTful API
, now i have created few .json
files in which i want
to store my JSON
data in src/main/resources
, but as i can see
every time i make a change ( example: register a user - write in a
file ) all changes get lost whenever i redeploy the WAR file or the
server gets restarted/reloaded.PATH variable
to fix
my problem? I want to store files somewhere i will be able to update
them without having to worry if server is being reloaded or not. Thank you in advance!Upvotes: 0
Views: 574
Reputation: 567
SMART WAY, with java configuration and classpath (unix example, launch your application this way)
java -classpath $PATH <your-class-name>
or
setenv CLASSPATH = $PATH
see unix and windows instructions.
BAD WAY, within application code
Upvotes: 1