background
There are some fixed files that the front end needs to access. The first solution is to put it in the file center, but the file center will have an automatically generated file name, and the front-end direct access cannot replace the original file name. So I thought of another solution, put the file in the project directory, and let the front end directly access it.
achieve
In the resource directory, create a new static directory, create a new file directory in the static directory, and then the front end can directly access the files in the file directory
Front-end access path: localhost:8080/file/test.txt