I'm currently working on a Spring project. I made a diagram to illustrate what i'm saying. Is the diagram UML below represent a correct/good architecture to follow with Spring ?
To explain, the RestController redirects requests. This controller have an interface dependancy injected with the real class (here a class that handle storage of reports with files).
The class DatabaseFile implements DatabaseInterface. On one hand, some methods for content treatment ( like getContentFromReport(string) -> call readFile(String) then for instance take only important lines), on the other hand pure file method (like ReadFile using (Reader, FileUtil...)).
My problem is that file methods (readFile(), deleteFolder()) doesn't contain dependancy Injection and I can't mock some objects.
The diagram :