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. KMP算法深入解析

    本文主要介绍KMP算法原理.KMP算法是一种高效的字符串匹配算法,通过对源串进行一次遍历即可完成对字符串的匹配. 1.基础知识的铺垫 字符串T的前k(0 =< k <=tlen)个连续的字 ...

  2. Mysql常用表管理语句

  3. thinkPHP 视图

    一.模板的使用        a.规则        模板文件夹下[TPL]/[分组文件夹/][模板主题文件夹/]和模块名同名的文件夹[Index]/和方法名同名的文件[index].html(.tp ...

  4. sql server停止和重启命令

    http://www.ynpxrz.com/n822732c2024.aspx 我们知道:sql server重启分分两步走 1.停止 net stop mssqlserver 2.重启 net st ...

  5. Flash神奇的视频利器StageVideo

    在过去的几年里,视频已经成为web网页上最主流的趋势之一,这主要是由Adobe Flash Player来推动的.2007年Flash Player 9中引入了H.264和全屏支持技术,通过在web页 ...

  6. 搭建spring工程配置数据源连接池

    Spring作为一个优秀的开源框架,越来越为大家所熟知,前段时间用搭了个spring工程来管理数据库连接池,没有借助Eclipse纯手工搭建,网上此类文章不多,这里给大家分享一下,也作为一个手记. 工 ...

  7. CodeForces 512B(区间dp)

    D - Fox And Jumping Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64 ...

  8. J.U.C并发框架

    转载:http://itindex.net/detail/48869-j.u.c-%E6%A1%86%E6%9E%B6 J.U.C并发框架 作者:Doug Lea SUNY Oswego Oswego ...

  9. ArcGIS API for JavaScript 4.2学习笔记[2] 显示3D地图

    3D地图又叫场景. 由上一篇可知, require入口函数的第一个参数是字符串数组 ["esri/Map", "esri/views/MapView", &qu ...

  10. ArcGIS Pro 简明教程(3)数据编辑

    ArcGIS Pro 简明教程(3)数据编辑 by 李远祥 数据编辑是GIS中最常用的功能之一,ArcGIS Pro在GIS数据编辑上使用习惯有一定的改变,因此,本章可以重点看看一些编辑工具的使用和使 ...