---
title: "spring roo 笔记 "
author: "zhb8015"
date: "2015-06-04T17:31:37Z"
tags: []
categories: ["企业架构"]
slug: "spring-roo"
draft: false
lastmod: "2015-06-29T16:14:51Z"
id: 2217089
url: "https://peter8015.iteye.com/blog/2217089"
---

对spring roo 的一些总结：源自spring roo officical  ([http://projects.spring.io/spring-roo/](http://projects.spring.io/spring-roo/))

 

**1、概念：spring和aspectj结合的产物**

A next-generation rapid application development tool for Java developers. With Roo you can easily build full Java applications in minutes.

对开发者来说是下一代的快速应用构建工具，你可以在几分钟内更加方便的构建一个全面的java应用

 

Spring Roo differs from other productivity tools by focusing on:

Rapid results

100% develop in Java

Easy-to-use

Fast and simple to remove

Totally compromise free

Active, helpful community

Comprehensive technology integrations

Extension points via Roo add-ons

Spring-certifie architecture

**2、原理** 

http://www.iflym.com/index.php/code/the-theory-about-spring-and-aspectj-pre.html

**3、优点**

Spring roo与其他的产品化的工具不同的特点是专注于：

快速开发

完全用java开发

便于应用

快速并方便删除

完全免费

活跃和有利的社区

便于理解的技术整合

通过roo组件进行扩展

Spring认证的架构体系

 

## Exciting Features - SOLR, CLOUD, FLEX,...

support cool features like Solr for search server integration and cloud deployment like Google App Engine.

支持最酷的特性，比如搜索引擎的solr整合和像GAE云部署

## Zero Risks - Productivity Without Compromise

With Roo you still program everything in Java

零风险：用roo你仍然可以用 JAVA编写所有的程序 。

 

**4、Quickstart:**

mkdir hellocd hellorooroo&gt; hintroo&gt; project setup --topLevelPackage com.fooroo&gt; jpa setup --provider HIBERNATE --database HYPERSONIC\_IN\_MEMORYroo&gt; entity jpa --class ~.domain.Timer --testAutomaticallyroo&gt; field string --fieldName message --notNullroo&gt; hint web mvcroo&gt; web mvc setuproo&gt; web mvc all --package ~.webroo&gt; selenium test --controller ~.web.TimerControllerroo&gt; security setuproo&gt; perform testsroo&gt; quit

  

 

**5、创建项目后转化成 eclipse的项目**

perform eclipse

 **6、运行.roo文件**

roo&gt; script --file clinic.roo

**7、Spring roo 特点：**

 

Roo 的任务是从根本上可持续地改善 Java 开发人员的生产效率，而无损工程完整性和灵活性。Spring Roo 使用流行、可靠和成熟的库，比如 Spring [框架](http://baike.baidu.com/view/66971.htm)、Java 持久化 API、Java Server Pages (JSP)、Spring Security、Spring Web Flow、Log4J 和 Maven。Roo 生成的应用程序使用 Bean Validation (JSR-303) 和 Dependency Injection (JSR-330) 这样的标准，且遵循最佳实践 SpringSource 认证的应用程序架构。

 

使用 Spring Roo，您可以添加和配置 JPA、Spring MVC、Spring Security 等功能，使用 Log4j 进行日志记录，测试 JUnit 和 Selenium、Solr、JMS、电子邮件等框架

 

 

参照：

不错的入门文章：

http://www.oschina.net/question/129540\_19476