Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1188950
  • 博文数量: 89
  • 博客积分: 10546
  • 博客等级: 上将
  • 技术积分: 1510
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-16 01:24
文章分类

全部博文(89)

文章存档

2012年(7)

2011年(4)

2010年(5)

2009年(52)

2008年(21)

分类: Java

2009-01-30 14:15:46

,从名字很容易让人联想到 。与AppFuse类似,SpringFuse同样是一个项目构建工具,提供了新建项目的基础代码。不同的是,SpringFuse与 SpringSource是合作伙伴,SpringFuse提供的是在线服务,SpringFuse集中在Spring框架本身的一些功能 (SpringMVC, SpringWebFlow, Hibernate, Spring),没有像AppFuse那样提供多种框架组合的选择。
参考:


一起来体验一下SpringFuse。
1.首先请安装以上版本, 2.0.9。具体请参考, Fedora 9 使用手记(2)--安装java开发环境,     用Maven 构建项目
2.下载 springfuse-example.zip,解压到硬盘上(假设存放文件的目录为springfuse-example),进入到springfuse-example。

.
|-- README.txt
|-- pom.xml
`-- src
    `-- main
        `-- sql
            `-- h2
                |-- comment.sql
                |-- create.sql
                |-- drop.sql
                `-- init.sql

它只包括一个简单的pom.xml文件,和一些sql文件。
执行 mvn initialize,会目录下生成一个data-model.springfuse文件。


[hantsy@localhost springfuse-example]$ mvn initialize
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building springfuse-example
[INFO]    task-segment: [initialize]
[INFO] ------------------------------------------------------------------------
[INFO] snapshot com.jaxio:maven-springfuse-plugin:2.5.0-SNAPSHOT: checking for updates from dojo-snapshots
[INFO] [sql:execute {execution: Create and initialize the database}]
[INFO] Executing file: /home/hantsy/Projects/springfuse-example/src/main/sql/h2/drop.sql
[INFO] Executing file: /home/hantsy/Projects/springfuse-example/src/main/sql/h2/create.sql
[INFO] Executing file: /home/hantsy/Projects/springfuse-example/src/main/sql/h2/comment.sql
[INFO] Executing file: /home/hantsy/Projects/springfuse-example/src/main/sql/h2/init.sql
[INFO] 45 of 45 SQL statements executed successfully
[WARNING] Attempting to build MavenProject instance for Artifact (com.jaxio:maven-springfuse-plugin:2.5.0-20090119.142601-1) of type: maven-plugin; constructing POM artifact instead.
[INFO] snapshot com.jaxio:jaxio-dbmetadata:2.5.0-SNAPSHOT: checking for updates from dojo-snapshots
[INFO] [springfuse:extract {execution: Extract Database Meta Data}]
[INFO] Ready to extract the database schema
[INFO] Connecting to Database jdbcUrl=jdbc:h2:~/.h2/quickstartdb
[INFO] Connected OK
[INFO] Database Product Name: H2
[INFO] Database schema extracted
[INFO] File data-model.springfuse passed reverse conversion OK
[INFO] File data-model.springfuse created successfully
[INFO] You are now ready to upload data-model.springfuse to and generate your project!
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9 seconds
[INFO] Finished at: Sat Jan 31 19:03:53 CST 2009
[INFO] Final Memory: 4M/7M
[INFO] ------------------------------------------------------------------------
[hantsy@localhost springfuse-example]$



3.注册一个的账号,登录后,点击“Generate New Project”,输入项目相关的信息,上传生成的data-model.springfuse。

点击“Generate My Project”,然后下载生成的项目文件,将它解压到本地硬盘,进入项目目录(quickstartdb),运行mvn jetty:run,用浏览器打开。



4.生成的项目是一个Maven项目,同时也包含了eclipse项目文件(.project , .classpath),你可以将项目导入到eclipse中进行编辑。NetBean 6.5中内置Maven 2支持,可以用NetBeans直接打开项目。





阅读(3453) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~