解决 'class path resource [templates/] cannot be resolved to absolute file path' 错误
This error message indicates that the application is trying to access a file path in a directory called 'templates/', but it is unable to because the directory is located within a jar file rather than on the file system.
In other words, the 'templates/' directory is part of the application's classpath and is packaged within the clientdemo-0.0.1-SNAPSHOT.jar file.
To resolve this issue, you may need to modify the code to access the resources within the jar file using a different method, such as using the ClassLoader.getResourceAsStream() method instead of trying to access the file directly.
原文地址: https://www.cveoy.top/t/topic/lZqf 著作权归作者所有。请勿转载和采集!