本文介绍了对于基于Play 2.0的Java应用程序,我可以使用groovy模板而不是scala吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我是新的Play 2.0,我很难理解用于创建视图的scala模板。 我可以切换回早期版本的Play框架中的Groovy吗?例如:Play 1.2,Play 1.2.4 解决方案是的,groovy有一个模块: https://github.com/manuelbernhardt/play2-groovy-templates 我发现Scala模板在与它们玩了一周之后不会太糟糕 - 特别是如果您在控制器部件上使用Scala的话。您可以考虑为学习曲线坚持下去。 为评论添加内容: object ApplicationBuild extends Build { ... val appDependencies = Seq(eu.delving %%groovy-templates-plugin%1.1) val main = PlayProject(appName,appVersion,appDependencies,mainLang = SCALA).settings( resolvers + =Delving Snapshot Repository位于http://development.delving.org:8081/nexus/content/repositories/snapshots,解析器+ =Delving Releases Repository位于http://development.delving .org:8081 / nexus / content / groups / public) } 为我工作。 I am new Play 2.0, I am having hard time understanding scala templating for creating views.Can I switch back to groovy as it existed in earlier versions of Play framework. for e.g: Play 1.2, Play 1.2.4 解决方案 Yes, there is a module available for groovy:https://github.com/manuelbernhardt/play2-groovy-templatesI've found the Scala templates not too bad to work with after a week of playing with them--especially if you're using Scala on the controller part. You might consider sticking it out for the learning curve.Adding for the comments:object ApplicationBuild extends Build {... val appDependencies = Seq( "eu.delving" %% "groovy-templates-plugin" % "1.1" ) val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings( resolvers += "Delving Snapshot Repository" at "http://development.delving.org:8081/nexus/content/repositories/snapshots", resolvers += "Delving Releases Repository" at "http://development.delving.org:8081/nexus/content/groups/public" )}Worked for me. 这篇关于对于基于Play 2.0的Java应用程序,我可以使用groovy模板而不是scala吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-06 00:29