I want to pass Resources folder path in FolderFontSource

How can i pass resources folder path in application

templateDoc.getFontSettings().setFontsSources(
    new FontSourceBase[] {
        new FolderFontSource("\\resources\\fonts", true) // Search for fonts in the specified folder
});

@Smital279 If I understand you correctly, you would like to load fonts from your JAR. Unfortunately, there is no way to specify font’s folder inside JAR, but in this case you can use StreamFontSource. See the following article for more information:
https://docs.aspose.com/words/java/specify-truetype-fonts-location/#loading-fonts-from-stream

@alexey.noskov I don’t want to load FONT from JAR

I want to load Fonts from src/main/resources/fonts folder of spring application

@Smital279 Then you should specify full path to the folder with your fonts. The folder should be accessible by your application.