How do you work with Spring?
-main -webapp --resources ---folder -WEB-INF -test
Classic web project structure. I need to process files in the file.
Like I do:
getClass().getClassLoader().getResource("folder")Then I'm doing this file, etc.
Can you tell me what other ways to work with resources in spring?
Spring has a class family to work with resources (in this context, the resource is what can be obtained
InputStream) They all operate the interface. http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/io/Resource.html :
ClassPathResourceenables resources throughout
ByteArrayResourceTurns the White Massive into a resource.
UrlResourcePermits to URL or file resources (URL with a scheme)
FileSystemResourceonly to work with the file system.
PathResourceWorks with the tracks