mardi 9 juin 2015

Spring load a file

I need to load a file from within a directory in the root of a WAR using Spring This is the directory structure

rootOfWar
--static-dir
---- my-file.css
--WEB-INF
---- classes
.....

It is a normal WAR.

In a Spring @RestController I need to be able to read and write to my-file.css file. What is the best way to get the File, ServletContextResource or?

Aucun commentaire:

Enregistrer un commentaire