To start developing Java EE applications with AppFuse 2.x, please following the instructions below:
Table of Contents
- Create a new project.
- Run it.
- Have Fun.
Create a project
- Download and install JDK 5+.
- Download and install MySQL 5.x.
- Setup a local SMTP server or change mail.properties (in src/main/resources) to use a different host name - it defaults to "localhost".
- Download and install Maven 2.0.6.
|
If you'd prefer to create your project from Eclipse rather than from the command-line, checkout Candy for AppFuse. |
- AppFuse comes in a number of different flavors. To optimize and simplify your experience as a user, we've created a number of different archetypes (a.k.a. starter projects). There are currently two types of AppFuse Archetypes: basic and modular. The basic archetypes are ideal for creating projects that will serve as web applications. The modular archetypes contain "core" and "web" modules and are ideal for creating projects that have a re-usable backend. The list of commands to produce these projects is below. You should change the groupId to match your preferred package name and the artifactId to match your project's name.
|
The warnings you see when creating an archetype are expected. If you see BUILD SUCCESSFUL at the end, your project was created successfully. |
|
MySQL Security
Running MySQL using root with no password is not the most secure thing to do. Once your database is created, you can change the root password using the command below:
AppFuse uses the username "root" and a blank password by default. To change these values, modify the <jdbc.username> and <jdbc.password> properties in your project's pom.xml (at the bottom).
|
Run your application
Running AppFuse is easy now. Once the archetype project is created, Maven will create and populate your database using the hibernate3 and dbunit plugins, respectively. All you have to do is use Maven to run the Jetty container and view your application.
- Check your new project into source control, unless you have a good reason not to. Google Code has free Subversion hosting, as do many others.
- From the command line, cd into your new project's directory and run mvn to download JARs, Tomcat and run the integration tests in your project. Now is a good time to take a coffee break or grab a beer - downloading everything and running the tests can take 5-10 minutes.
- To view your application run mvn jetty:run-war from your project's directory (for a modular project, you'll need to run mvn jetty:run-war from your project's web directory). Maven will start Jetty and you should be able to view your application in your browser at http://localhost:8080.
|
The default username/password for an admin user is admin/admin. For a regular user, use user/user. |
- To override files from AppFuse, run mvn war:inplace. This will extract the dependent WARs into src/main/webapp, where you can change files to your heart's content. When you have the war expanded in your source tree, you can run mvn jetty:run. This will allow you to change files on-the-fly and Jetty will reload them as needed. The only problem with this approach is you end up with an "exploded AppFuse" in your project, which won't bode well for upgrading. We recommend you check your project into source control before running mvn war:inplace. That way, it'll be easier for you to decide what needs to be checked in (over written) and what can be deleted.
If you receive OutOfMemory errors when using jetty:run, see this mailing list thread.
You can change AppFuse from its "embedded mode" to full-source mode by running mvn appfuse:full-source from your project's root directory.
|
Development Environment
See development environment for detailed instructions on how to setup your computer to develop AppFuse-based applications. |
|
Changing database settings
To change your MySQL database settings, simply change the <jdbc.*> properties at the bottom of your pom.xml. See Database Profiles to use a database other than MySQL. |
Develop your application
You can develop your application using Eclipse, IDEA or NetBeans. For Eclipse, run mvn install eclipse:eclipse to generate project files. For IDEA, use mvn idea:idea. Further instructions can be found in the IDE Reference Guide.
The Tutorials should help you get started developing your application.
分享到:
相关推荐
AppFuse 是一个开源项目,旨在简化Java Web应用程序的开发过程。它提供了一个基础框架,集成了许多流行的开源库,如Spring、Hibernate、Struts或Spring Boot等,帮助开发者快速搭建应用骨架。AppFuse 可以根据选定的...
appfuse快速上手AppFuse+QuickStart.html
**AppFuse 学习笔记(一):安装与部署** AppFuse 是一个开源项目,它提供了一种快速构建企业级 Web 应用程序的方式。它使用了多种流行的技术栈,如 Spring Boot、Hibernate、Thymeleaf 和 Maven,使得开发者可以更...
### AppFuse:加速J2EE项目开发 #### 一、简介与背景 AppFuse是一个用于启动J2EE项目的工具包,它提供了一种快速而简便的方法来构建基于Java的应用程序。该工具包由Matt Raible创建,他在网络开发领域拥有丰富的...
AppFuse 是一个基于Java平台的开源项目,旨在加速和简化Web应用程序的开发。它通过集成各种流行框架,如Struts、Spring、Hibernate等,提供了一个项目骨架,使得开发者能够快速搭建新项目的结构。AppFuse分为1.x和...
### Appfuse 学习笔记 #### 一、Appfuse 简介 Appfuse 是一个开源框架,旨在帮助开发者高效地构建企业级应用。通过提供一套完善的架构模板、最佳实践和技术栈组合,使得开发者能够专注于业务逻辑的实现,而不是...
【MAVEN 搭建APPFUSE】是一个关于使用Maven构建基于AppFuse的应用程序的教程。AppFuse是一个开源项目,旨在简化Web应用程序的开发,它提供了一个基础框架,可以帮助开发者快速启动新项目,整合了Spring、Hibernate、...
AppFuse是一个集成了众多当前最流行开源框架与工具(包括Hibernate、ibatis、Struts、Spring、DBUnit、Maven、Log4J、Struts Menu、Xdoclet、SiteMesh、OSCache、JUnit、JSTL等(现在还有lucene的,无敌了))于一身的...
AppFuse 是一个开源项目,旨在简化Java Web应用程序的开发。它提供了一个基础架构,开发者可以在此基础上快速构建安全、可扩展的应用程序。AppFuse 2.1 版本是该项目的一个较早版本,但仍然包含了现代Web开发的核心...
06年时的appfuse,学习SSH架构的经典入门框架。相对比较老的资料,可以欣赏一下当时的架构,向牛人致敬
**Appfuse开发教程** Appfuse 是一个开源项目,它提供了一种快速开发Web应用程序的方式,尤其在使用Java技术栈时。本教程将深入探讨如何利用Appfuse创建数据访问对象(DAO)和简单Java对象(POJO),并进行数据库...
AppFuse 是一个开源项目,它提供了快速开发Java Web应用程序的基础框架。这个框架集成了Spring、Hibernate和Struts等主流技术,使得开发者能够迅速构建出符合MVC架构的应用。在最新的版本2.1.0-M2中,AppFuse 提供了...
AppFuse 是一个由 Matt Raible 创建的开源项目,旨在为初学者提供一个快速入门的 J2EE 框架模板。它集成了多种流行的技术,包括 Spring、Hibernate、iBatis、Struts、Xdoclet 和 JUnit,同时也支持 Taperstry 和 JSF...
主要是自己从网络上搜集的一些关于appfuse1.8.2-2.0.2的一些相关资料,间或有点自己试验的记录,还有点maven和quartz的东东,之前我主要是用1.8.2构建项目,感觉还不错,希望对想学习appfuse的人有些帮助.
AppFuse是一个开源项目,旨在简化Java Web应用的开发。它提供了一个基础结构,开发者可以在此基础上快速构建安全、模块化的应用程序。本项目是关于利用AppFuse框架构建B2C(Business-to-Consumer)电子商务系统的...
**玩转AppFuse:使用AppFuse建设MVC网站** AppFuse是一个开源项目,它提供了一个快速启动MVC(Model-View-Controller)Web应用程序开发的框架。基于Java,AppFuse集成了Spring、Struts2、Hibernate等流行的技术,极...