在项目所在目录的中,输入
*sbtIdeaRepo at http://mpeltonen.github.com/maven/
*idea is com.github.mpeltonen sbt-idea-processor 0.4.0
update
idea
注意,只有输入“idea”后,才会实际转变为idea项目
接下来先启动jetty
jetty-run
然后启动实时编译模式
~compile
界面会显示
x.Waiting for source changes
这时候你及时保存的代码可以实时编译为class文件,不用重启jetty就可以看到效果了。
在sbt模式下,输入
lift create snippet
会提示输入snippet的name 我输入HelloWorld
这时候会在snippet文件夹中出现HelloWorld.scala
在index.html中的输入
<p lift="HelloWorld.render">Replace me</p>
这样重启jetty后就可以看到效果了。