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. mySql 分段查询

    准备: 创建一个成绩表 Create table grade (id integer, score integer); 插入数据(只有id每次加一,score是1到100的随机数,java生成): p ...

  2. windows 7 忘記密碼,用“带命令行的安全模式”

    net user administrator /active:yes net user tester /add net localgroup administrators tester /add

  3. Intellij idea 15配置tomcat,maven

    刚导了个项目进去,想把项目运行起开,怎么也找不到tomcat... ctrl + alt +s,打开设置窗,搜索 Application Server Tomcat: 点中间绿色的“+”号,添加选择t ...

  4. php正则表达式简介

    正则表达式简介 正则表达式Regular Expression,使用单个字符串来描述.匹配一系列符合某个句法规则的字符串.代表性书籍<正则表达式之道>里面有详细论述,本书籍为个人查阅之用力 ...

  5. Delphi在Vasta/win 7下通过UAC控制

    在Windows编程时,为了兼容Win7与XP,许多需要底层权限的程序需要通过UAC验证,这是微软出的一个很恶心的东西……还不如Ubuntu那种Root机制呢……但是有困难我们就要克服-现在有一种方式 ...

  6. QT第四天学习

    回顾: 1.信号与槽 public slots: //先声明后实现 signals: //只需要声明 connect(sender,SIGNAL(signal()),receiver,SLOT(slo ...

  7. android 类似QQ底部输入框弹出键盘和面板冲突 布局闪动处理方案(转)

    先看下效果 差不多就是解决这种冲突,布局闪动的 作者的githup :https://github.com/Jacksgong/JKeyboardPanelSwitch Android键盘面板冲突 布 ...

  8. 使用AIR进行移动APP开发常见功能和问题(上)

    1.  获取最近联系人 思路:侦听Geolocation的update事件,获取经度和纬度信息,再把坐标信息上传至服务器,服务器比较坐标信息算出距离,返回最近位置的若干个人. update时间在2种情 ...

  9. Hybrid容器设计之第三方网站

    平台化容器API释放 接上文:(阅读本文前,建议阅读前三篇文章先) 浅谈Hybrid技术的设计与实现 浅谈Hybrid技术的设计与实现第二弹 浅谈Hybrid技术的设计与实现第三弹——落地篇 之前设计 ...

  10. WinForm 更换主窗体的例子

    做一个登录窗口,登录成功时关闭form1,展示from2界面 1.主界面Login namespace WindowsFormsApplication1 { public partial class ...