Home > Back-end >  Will play for springboot jar package, need to modify the resource file
Will play for springboot jar package, need to modify the resource file

Time:11-20

Had not packed, can modify the resource directory json file directly, but the original path after the packaging is not correct, need to modify, then read a file reference the online methods:
InputStream InputStream=Thread. CurrentThread (). GetContextClassLoader () getResourceAsStream (filename);
Can use the normal reading, but not written to the file successfully, please advice

CodePudding user response:

Can't modify, packaged again?

CodePudding user response:

This is the dynamic change of configuration, is to open the page, and then to save data as a json file, behind again from the json file and use it every time you read it out,
  • Related