Scalate的的渲染標籤是不能夠解決的模板,並拋出以下異常:Scalate的的渲染標籤是不能夠解決模板
org.fusesource.scalate.util.ResourceNotFoundException:無法加載資源:[文件:/Users/xxxxx/template/abc-conf.ssp] at org.fucesource.scalate.util.ResourceLoader $ class.createNotFoundException(ResourceLoader.scala:58) at org.fusesource.scalate.util.FileResourceLoader.createNotFoundException( ResourceLoader.scala:61) at org.fusesource.scalate.util.ResourceLoader $ class.resourceOrFail(ResourceLoader.scala:55) at org.fusesource.scalate.util.FileResourceLoader.resourceOrFail(ResourceLoader.scala:61) at org.fusesource.scalate.util.UriResource.delegate(Resource.scala:90) at org.fusesource.scalate.util.DelegateResource.text(Resource.scala:215) at org.fusesource.scalate.ssp。 SspCodeGenerator.generate(SspCodeGenerator.scala:152) 在org.fusesource.scalate.TemplateEngine.compileAndLoad(TemplateEngine.scala:802) 一個
它被用作 <%render(「abc-conf.ssp」,Map(「a」 - >「a」))%> – mangeeteden
它告訴你在Users/xxxxx處沒有文件/模板/ ABC-conf.ssp'。你的模板在哪裏? – Samuel
嗨,我將模板放在CLASSPATH @ src/main/resources/templates中 – mangeeteden