ciao!
volevo testare la libreria Mustache usando Maven.
nel mio main:
codice:
public class Main {
public static void main(String[] args) {
try {
MustacheFactory mf = new DefaultMustacheFactory();
Mustache mustache = mf.compile("template.mustache");
mustache.execute(new PrintWriter(System.out), new MustacheExample()).flush();
} catch (IOException ex) {
System.out.println(ex.getMessage());
}
}
}
a questo punto ho creato la cartella resources con dentro il template; le cartelle sono così:
codice:
src/main/java
-com
--mp
---test --> MAIN
-resources --> TEMPLATE
in fase di esecuzione ottengo questo:
codice:
Exception in thread "main" com.github.mustachejava.MustacheNotFoundException: Template template.mustache not found
in sostanza, suppongo, non trova il template che gli indico.
come devo richiamare il file di risorse con Maven??