I'm implementing the piece of code, that make changes in some configuration file. In the very beginning I'm trying to find my application.properties file:
File file = new File(Objects.requireNonNull(this.getClass().getClassLoader().getResource("application.properties")).getFile());
File is located in /opt/pcc/lib/smp-asnef.jar in src/main/resources/application.properties
But I get an error:
Error: Unable to load the configuration from the URL file:/root/file:/opt/pcc/lib/smp-asnef.jar!/BOOT-INF/classes!/application.properties
Can you explain this error (I want to understand where exactly he is looking for a file and what exactly it means)? And what could be a solution?
I'm ready to give additional information if needed.