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. linux 自动备份脚本

    首先我在/root/backup 目录下建立一个文件夹, #mkdir /root/backup/mysqlbackup 以后在每天五点钟,就会有一个文件保存在这里. 接着新建文件 #vim /roo ...

  2. Grunt安装中遇到的问题汇总

    Grunt安装中遇到的问题汇总 1.如果是windows下的dos中安装Grunt,必须以管理员身份登录(第一个坑) 登录方法是: 方法一:开始>所有程序>附件>命令提示符上右键&g ...

  3. ubuntu 15.10安装搜狗输入法不能打开

    安装Linux是为了更好的做开发,而开发其实不需要输入中文的,然而 在大中国的环境下,电脑没有中文输入法是不行的... 这次装ubuntu 坚持了4天没有中文输入法,我能说,其实没有中文输入法貌似也没 ...

  4. 【Android】Activity

    一.Android四大组件 Activity.Service.BroadCastReceiver.ContentProvider. 二.Activity的继承关系 三.建立.配置和使用Activity ...

  5. shc加密shell脚本

    下载地址:http://www.datsi.fi.upm.es/~frosal/sources/ 安装 .tgz cd shc- mkdir -p /usr/local/man/man1 这步是必须的 ...

  6. doubango介绍

    1.doubango官网:http://www.doubango.org/ 2.doubango是一个开源的VOIP基础平台, 并能用于嵌入式和桌面系统的开源框架,该框架使用ANSCI-C编写,具有很 ...

  7. Grunt + Bower—前端构建利器

    目前比较流行的WEB开发的趋势是前后端分离.前端采用重量级的Javascript框架,比如Angular,Ember等,后端采用restful API的Web Service服务,通过JSON格式进行 ...

  8. 以Tomcat+Mysql为例,实现Docker多容器连接

    Docker提供了多个容器直接访问的方法,最简单的方式是直接使用端口映射-p参数指定映射的端口或者-P映射所有端口,多个容器直接通过网络端口进行访问. 但网络端口映射方式并不是Docker中连接多个容 ...

  9. A tutorial on Principal Components Analysis | 主成分分析(PCA)教程

    A tutorial on Principal Components Analysis 原著:Lindsay I Smith, A tutorial on Principal Components A ...

  10. Hadoop权威指南:HDFS-目录,查询文件系统,删除文件

    Hadoop权威指南:HDFS-目录,查询文件系统,删除文件 [TOC] 目录 FileSystem实例提供了创建目录的方法 public boolean mkdirs(Path f) throws ...