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. Chrome Timeline的指标说明:Blocked、Connect、Send、Wait、Receive

    Blocked time includes any pre-processing time (such as cache lookup) and the time spent waiting for ...

  2. Java jsp基本结构

    <!DOCTYPE html> <!-- [ published at 2015-11-13 12:30:50 ] --> <html> <head> ...

  3. Unity 绘图性能优化 - Draw Call Batching

    Unity 绘图性能优化 - Draw Call Batching Unity官方链接:http://docs.unity3d.com/Manual/DrawCallBatching.html 转载请 ...

  4. 部署statspack工具(一)

    禁用sga自动管理机制,分配比较小的数据缓冲区(30m)和共享池(70m)空间 1.1关闭SGA自动管理机制 查看是否开启了ASSM idle>show parameter sga; NAME  ...

  5. Servlet中进行context属性的同步

    Servlet中进行context属性的同步: 必须所有使用context的servlet都进行synchronized才可以实现同步: servlet: package com.stono.serv ...

  6. 如何在Crystal框架项目中内置启动MetaQ服务?

    当Crystal框架项目中需要使用消息机制,而项目规模不大.性能要求不高时,可内置启动MetaQ服务器. 分步指南 项目引入crystal-extend-metaq模块,如下: <depende ...

  7. BZOJ-2768: [JLOI2010]冠军调查(超级裸的最小割)

    2768: [JLOI2010]冠军调查 Time Limit: 10 Sec  Memory Limit: 128 MB Description 一年一度的欧洲足球冠军联赛已经进入了淘汰赛阶段.随着 ...

  8. ssh配置文件及问题解决

    一 ssh的配置文鉴模板 Host AAA User gitolite3 HostName IP地址 IdentityFile ~/.ssh/key 二 下载代码的方法 1 ssh git2 git ...

  9. C# vs TypeScript - 高级类型

    总目录 从C#到TypeScript - 类型 从C#到TypeScript - 高级类型 从C#到TypeScript - 变量 从C#到TypeScript - 接口 从C#到TypeScript ...

  10. 【java设计模式】之 建造者(Builder)模式

    我们还是举上一节的例子:生产汽车.上一节我们通过模板方法模式控制汽车跑起来的动作,那么需求是无止境的,现在如果老板又增加了额外的需求:汽车启动.停止.鸣笛引擎声都由客户自己控制,他想要什么顺序就什么顺 ...