Introduction

Scalatra是一款轻易级Scala web框架,通过Scalatra可以很轻易创建web Application,由Linkedln开源并遵循了Ruby Web框架的Sinatra的原则。
由于个人项目及为了更好的了解Scala的原因,需要款Scala栈的web框架来支撑后台的开发,感觉Scalatra很容易上手也比较容易理解,所以选择了它;官方上对Scalatra web项目的创建推荐使用的是sbt+giter8,想对于sbt我还是比较喜欢使用Maven。
Quick start
1. 将Scalatra Maven模版添加本地仓库
由于Scalatra Maven模版Simple Scalatr Archetype并未添加到Maven中央仓库中,所以需要将git://github.com/Srirangan/simple-scalatra-archetype.git克隆到本地再使用mvn install将模版添加到本地仓库,之后就可以使用Maven来创建scalatra web项目了,步骤:
    1. git clone  git://github.com/Srirangan/simple-scalatra-archetype.git
    2. cd simple-scalatra-archetype
    3. mvn install
完成之后在$Maven_Repository\org\scalatra目录下会生成simple-scalatra-archetype目录,包含simple-scalatra-archetype-2.5-SNAPSHOT.jar等文件,表示可正常使用Maven创建scalatra web项目了
 
2.使用Maven命令创建Scalatra web项目
mvn archetype:generate \
-DarchetypeArtifactId=simple-scalatra-archetype \
-DarchetypeGroupId=org.scalatra \
-DarchetypeVersion=2.5-SNAPSHOT \
-DgroupId=com.mobin -DartifactId=scalatraSimpleApp \
 
使用mvn jetty:run启动项目
 
3.使用IDEA来创建Scalatra web项目
将Simple Scalatr Archetype添加到IDEA中即可,步骤:
1.添加支持
 
2.创建Maven工程时选中该项即可
 
 
4.Scalatra项目结构及使用
Scalatra的项目结构如下:
之后使用mvn jettty:run启动项目,在浏览器中访问localhost:8080界面如下:
 
Scalatra是一个学习scala的不错项目

Scalatra--Introduction And Quick start的更多相关文章

  1. Libsvm:脚本(subset.py、grid.py、checkdata.py) | MATLAB/OCTAVE interface | Python interface

    1.脚本 This directory includes some useful codes: 1. subset selection tools. (子集抽取工具) subset.py 2. par ...

  2. 工作流引擎Activiti 专题

    https://github.com/Activiti/Activiti Quick Start Guide This quick start assumes: Familiarity with Ma ...

  3. 6、Spring-Kafka4

    4.1. Using Spring for Apache Kafka This section offers detailed explanations of the various concerns ...

  4. A Quick Introduction to Linux Policy Routing

    A Quick Introduction to Linux Policy Routing 29 May 2013 In this post, I’m going to introduce you to ...

  5. Quick Introduction to SQL Server Profiler

    Introduction to Profiler SQL Server Profiler — or just Profiler — is a tool that can help monitor al ...

  6. A quick introduction to HTML

    w3c reference : https://www.w3.org/TR/2014/REC-html5-20141028/introduction.html#writing-secure-appli ...

  7. A quick introduction to Source Insight for seamless development platform between Linux and Windows

    前言 Source Insight是一个面向项目开发的程序编辑器和代码浏览器,它拥有内置的对C/C++, C#和Java等程序的分析.能分析源代码并在工作的同时动态维护它自己的符号数据库,并自动显示有 ...

  8. A quick introduction to Google test

    视频参考:Google C++ Testing GTest GMock Framework 为什么要使用 Google C++ Testing Framework? 使用这个框架有许多好理由.本文讨论 ...

  9. Discrete.Differential.Geometry-An.Applied.Introduction(sig2013) 笔记

    The author has a course on web: http://brickisland.net/DDGSpring2016/ It has more reading assignment ...

随机推荐

  1. OC 优化目录

    把 main. info 和 appdelegate 放到自己的新建目录 1.去掉info.plist的警告 在build phases->copy Bundle Resources中去掉inf ...

  2. bug工具

    在线工具:柠檬bug管理--兼顾项目管理 开源工具:PPM Bug 缺陷管理系统 项目管理.bug管理:http://www.bugfree.cn

  3. 2.11. 创建托管对象(Core Data 应用程序实践指南)

    到现在为止,还没有创建过托管对象,回顾了一下,只是创建了托管对象模型,持久化存储区,持久化存储协调器,托管对象上下文. 那么,现在就来创建托管对象吧. 使用NSEntityDescription 的 ...

  4. 集群环境下JSP中获取客户端IP地址的方法

    String ip = request.getHeader("X-Forwarded-For");if (ip == null || ip.length() == 0 || &qu ...

  5. nw.js桌面程序自动更新(node.js表白记)

    Hello Google Node.js 一个基于Google V8 的JavaScript引擎. 一个伟大的端至端语言,或许我对你的热爱源自于web这门极富情感的技术吧! 注: 光阴似水,人生若梦, ...

  6. nginx的配置服务器集群,负载均衡

    在server{}前配置服务器ip和端口号 如: upstream local_tomcat { local_tomcat为访问路径,在下面配置服务器ip及端口号,也可以分配权重(weight==?) ...

  7. C++:C语言实现HTTP的GET和POST请求

    HTTP请求和IP/TCP 所谓的HTTP协议是基于IP/TCP协议的, 所以要获取远端的html数据只要创建socket对象就足够了: HTTP是基于IP/TCP加上了网络请求的固定格式, 比如: ...

  8. python中将两个list合并为字典

    两个list合并为字典的代码如下: def Run(): list2 = [1, 2, 3, 4, 5 ]; list3 = ["a", "b", " ...

  9. EntityFramework Core Raw Query再叙注意事项后续

    前言 话说通过EntityFramwork Core进行原始查询又出问题,且听我娓娓道来. EntityFramework Core Raw Query后续 当我们进行复杂查询时我们会通过原始查询来进 ...

  10. 《HelloGitHub月刊》第10期

    前言 这一年感谢大家的支持,小弟这里给大家拜年了! <HelloGitHub月刊>会一直做下去,欢迎大家加入进来提供更多的好的项目. 最后,祝愿大家:鸡年大吉- <HelloGitH ...