ActiveRecordPlugin arp = new ActiveRecordPlugin(druid);
arp.setBaseSqlTemplatePath(PathKit.getWebRootPath()+"/WEB-INF/sql");
arp.addSqlTemplate("/all.sql");
Caused by: java.lang.IllegalArgumentException: File not found in CLASSPATH or JAR : "D:/git/kindergarten/src/main/webapp/WEB-INF/sql/all.sql"
at com.jfinal.template.source.ClassPathSource.<init>(ClassPathSource.java:66)
at com.jfinal.template.source.ClassPathSourceFactory.getSource(ClassPathSourceFactory.java:29)
at com.jfinal.template.Engine.buildTemplateBySourceFactory(Engine.java:158)
at com.jfinal.template.Engine.getTemplate(Engine.java:145)
at com.jfinal.plugin.activerecord.sql.SqlKit.parseSqlTemplate(SqlKit.java:93)
at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:224)
at com.jfinal.core.Config.startPlugins(Config.java:128)
... 16 more
2:删除下面这行:
arp.setBaseSqlTemplatePath(PathKit.getWebRootPath()+"/WEB-INF/sql");
3: arp.addSqlTemplate("/sql/all.sql");