Hi! Question? Can we pass an InputStream to PropertiesUserManagerFactory.setFile instead of a file? Or do we have an alternative to that setFile method?
The problem is that resources can't be treated as Files when they are inside a Jar file. Everywhere I read and look about this, it seems that when using a jar, you can't refer to the resources as files, and every answer says the same: Use `getSourceAsStream`. This article is the best explanation I've found[1]: """ In Java, we can use getResourceAsStream or getResource to read a file or multiple files from a resources folder or root of the classpath. The getResourceAsStream method returns an InputStream. The getResource method returns an URL and normally convert it to a File; Not working in JAR file. """ [1] https://mkyong.com/java/java-read-a-file-from-resources-folder/