根据MyBatis,我正在尝试将指南与Play Framework2.2集成起来。本指南是为使用project/Build.scala而不是build.sbt的Play 2.1.x编写的。
在这种情况下,如何将映射xml文件添加到类路径中?
以下文章中使用的配置摘录如下:
val main = play.Project(appName, appVersion, appDependencies).settings(
// Add app folder as resource directory so that mapper xml files are in the classpath
unmanagedResourceDirectories in Compile <+= baseDirectory( _ / "app" ),
// but filter out java and html files that would then also be copied to the classpath
excludeFilter in Compile in unmanagedResources := "*.java" || "*.html"
)发布于 2013-11-03 14:47:17
设置只需在build.sbt文件中插入额外的换行符,而不是逗号,因此:
unmanagedResourceDirectories in Compile <+= baseDirectory( _ / "app" )
// but filter out java and html files that would then also be copied to the classpath
excludeFilter in Compile in unmanagedResources := "*.java" || "*.html"需要空白行!
https://stackoverflow.com/questions/19754106
复制相似问题