1

Please let me know if we can get it via just configurations or maybe we can implement it without bit investment and security vulnerabilities.

enter image description here

What we need is to have something like web folder with directory listening (navigation) to being able to search, navigate into folder where file is located and download it without match effort...

Structure in a simple impl can be transparent to actual real directory accordingly to some local folder or mounted share via smb...

It may be not even spring, but at least java related technology.

M. Deinum
  • 115,695
  • 22
  • 220
  • 224
Maksim Kostromin
  • 3,273
  • 1
  • 32
  • 30
  • Why does it have to be java? That is what apache httpd can do out-of-the-box, use that instead of trying to re-invent the wheel (with all the bugs and security related issues you'll introduce). – M. Deinum Feb 07 '20 at 18:46
  • requirements to Java comes if something similar available not in spring-*, then maybe other JVM frameworks have it, because teammates who going to support it are basically java developers – Maksim Kostromin Feb 07 '20 at 19:05
  • Supporting Apache Httpd is a lot easier then trying to shoehorn this onto the JVM. Although a plain tomcat installation might do the trick as well (beware of the security risks and proper settings!). – M. Deinum Feb 07 '20 at 19:06
  • what about implementing features around Apache Httpd? Or even worst fix some bugs? How long me as a java developer need spent to get involved into it to implement something? Otherwise support java based solution for me will be easier. Security is not a question to java, security risks are everywhere and with mentioned spring I can stable handle it quite easily. – Maksim Kostromin Feb 07 '20 at 19:12
  • Security still is a question to java and solution like Apache HTTPD or Apache Tomcat have a lot of security bugs fixed already. If you start writing your own solution you will have to do that as well. I strongly suggest to look for standard solutions and not write your own. – M. Deinum Feb 10 '20 at 06:24

1 Answers1

0

Maybe something like this

public void addResourceHandlers(ResourceHandlerRegistry registry) {
    registry
      .addResourceHandler("/resources/**")
      .addResourceLocations("/resources/","classpath:/other-resources/");
}
Augusto
  • 89
  • 6