AppFuseQuickStart

xiaoxiao2021-03-06  56

AppFuse's main purpose is to help you quickly accept the start of your webapp. Here Are The Basic Steps to Creating A New

Project with it. ---------------------------------------------- -------------------------------------------- APPFUS is the purpose of help You start your web application quickly. This article describes the basic steps to build a new project. -------------------------------------------------- ----------------------------------------

Download the source version or checkout the appfuse module from CVS. (Cvs -d: pserver: guest@cvs.dev.java.net: / cvs co appfuse) Install J2SE 1.4 , set a JAVA_HOME environment variable, install Ant 1.6.1 , set an ant_home environment variable. install mysql 3.23.x (Recommend 4.0.18) and Tomcat 4.1.x (Recommend 5.0.24 with hotfix). Set a catalina_home environment

Variable to point to your tomcat installation. Optionally, you can see my development environment setup and get links to

Download the Above packages. --------------------------------------------- ----------------------------------------------- Download source code Or check the AppFUSE module from the CVS (CVS -D: PServer: guest@cvs.dev.java.net: / cvs co appfuse). Install J2SE1.4 , set the Java_Home environment

Variables, install ant1.6.1 , set up Ant_home environment variables. Install mysql3.23.x (recommended 4.0.18) and Tomcat4.1.x (recommended 5.0.24 patch version). Set one

Catalina_home environment variables indicate the installation directory of Tomcat. Optionally, you may refer to my development environment settings and get the link address of the above package. -------------------------------------------------- ----------------------------------------

Setup a local smtp server or change mail.properties (in the web / web-inf / class Directory) and build.properties (in the root

- for log4j messages) To point to an existing one - The Default to localhost. -------------------------------- -------------------------------------------------- -------- Set a local SMTP server or change the mail.properties file (under the web / web-inf / class directory) and the build.properties file (under the root directory to change the log4j message) To point out existing SMTP servers, the default is local ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -------------------------------------------------- -

Copy lib / junit3.8.1 / junit.jar to $ ant_home / lib .------------------------------------------------------------------------------------------------------------------------------------------ -------------------------------------------------- ------ Copy LiB / JUnit3.8.1 / junit.jar to $ ANT_HOME / LIB. -------------------------------------------------- ----------------------------------------

Run ant new -dapp.name = yourappname -ddb.name = yourdbname. This will create a directory named yourappname in the Same Directory

AS Appfuse. ----------------------------------- ------------------------------------------ Run ant new -dapp.nae = Your app name -ddb.name = your database name. This step will be opposite a name in the same directory as appfuse ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------- ---------

Navigate to the New Directory and Run Ant Setup To create the database and setup your app on tomcat. The database setup will Will

Only Work if your root user has no password. You can change this in build.properties if Necessary. if you want to test and

make sure everything works, run ant test-all - make sure Tomcat is stopped when you do this Run ant test-reports -.. there will be a message after it runs telling you how you can view the generated reports ----- -------------------------------------------------- --------------------------------- Go to the new directory, run Ant Setup to establish this database, And install your app in Tomcat. The database configuration is only the case where your root user does not set the password.

Can you work. If you need, you can change it in the build.properties file. If you want to test and run Ant Test-Reports - will tell you how to see the results reported by this run after it runs. -------------------------------------------------- ----------------------------------------

Optional installs ------------------------------------------------ ------------------------------------------ Optional installation ---- -------------------------------------------------- ------------------------------------

If you'd like to use iBATIS as a persistence framework option, view the README.txt in extras / ibatis. If you'd like to use Spring as the web framework, view the README.txt in extras / spring. If you don 'T Want to Install Ibatis or Spring MVC - You Should Delete Extras / Ibatis And Extras / Spring Before Checking Your

Project Into Source Control. --------------------------------------------- -------------------------------------------- If you like to use Ibatis As a lasting framework, see Readme.txt In Extras / Ibatis If you like to use the Spring person micro-web framework, see Readme.txt In extras / spring If you want to install iBatis or Spring MVC, you can delete extras / iBatis and Extras / Spring Checks your app before you Source Control

-------------------------------------------------- ------------------------------

Usually, after you get all this to work - it's likely you'll want to change all your package names to "com.company" Rather

Than "Org.Appfuse". I Use Eclipse to Rename Packages. To do this, Go to the package view, Click ON A Package Name and Right

Click -> Refactor -> Rename. Type in "* .xml, * .properties, *. xdt" for File Name Patterns to search in. ------------------- -------------------------------------------------- --------------------- Usually, you may do this - change your name to "com.company" instead of "org.appfuse", I usually use Eclipse to rename the package name. Do this work, enter

Package Vies, click a package name and right click -> Refactor -> Rename. Enter * .xml, * .properties, *. Xdt "in the file search to find out. ----------------------------- -------------------------------------------------- ----------- Note: if you want to use ibatis, i recomment you install it (instructions at extras / ibatis / readme.txt) Before renaming all

IF you don't install it first, you can add the ibatis / src as a source directory and rename packages there. make

Sure to Edit / Change All the package name in the .xml files (include, build.xml). You will also need to manually change

Package Names in the * daoibatis files. -------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------note: If you want to use Ibatis, I suggest you install it (explained in extras / ibatis / readme.txt) before changing all package names. If you don't install it first, you can increase

Add IBATIS / SRC as a source code directory and is replenished there. Please make sure you change all the package names in the .xml file (including build.xml). You will need to manually change the package.

Daoibatis file ----------------------------------------------- -------------------------------------------

By adding "* .xml, * .properties, *. Xdt" to the file name patterns field in the rename package wizard, The Following Files Should

Be changed as well. if you're not useful eclipse or something isn't Working Right - You Might Want To Enssure The "Org.Appfuse"

HAS Been Changed to "com.company" in The Following Files:

- Metadata / Web / Global-Exceptions.xml- Web / Web-INF / TILES-Config.xml- Web / Web-INF / CONFIG.XML- Web / Web-INF / CLASS / LOG4J.PROPERTIES- Web / Web-INF / VALIDATOR-RULES-CUSTOM.XML- SRC /service/com/company/service.xml- src / Dao / COM / Company / DAO / Hibernate / ApplicationContext-hibernate.XML- metadata / templates / struts_form.xdt ---------- -------------------------------------------------- ----------------------------- Increase "* .xml, * .properties, *. Xdt" to the more name wizard In the file search domain, the files listed will be automatically better. If you don't use Eclipse or some parts don't work correctly, you need to confirm that "Org.Appfuse" is correct in the following files to "com.Company": - metadata / web / global-exceptions.xml- web / web -Inf / tiles-config.xml- web / web-inf / class / log4j.properties- web / web-inf / validator-rules-custom.xml- src / service / com / company / service / applicationContext-Service.xml - SRC / DAO / COM / COMPANY / DAO / Hibernate / ApplicationContext-hibernate.xml- metadata / templates / struts_form.xdt ------------------------ -------------------------------------------------- ----------------

You'll Need to Manually Change The Location of the Hibernate Mapping Files in The ApplicationContext-Hibernate.xml File

(Location listed above). Basically, "ORG / AppFuse" Needs to Be Changd to "COM / Company". ---------------------------------------------------------------------------------------- -------------------------------------------------- -------------- You will need to manually change the Hibernate map file location in the ApplicationContext-hibernate.xml file (where the location is listed above). In general, "org / appfuse" needs to be changed

"COM / Company" -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------------------------

You'll Also Need To Change A Few Targets in Build.xml To Refer to the New Package Names. These Targets / Changes Are Listed

BELOW:

- junitdoclet-module - change org. * to com. * - javadoc - change org. * to com. * -------------------------- -------------------------------------------------- -------------- You also need to change some Targets in the build.xml file to refer to the new package. These Targets / Changes Please see: - JUnitDoclet-module - change org. * To com. * - javadoc - change org. * To com. * ------------------- -------------------------------------------------- --------------------- if you rename the org.appfuse.Webapp.form Package to, Say Test.Web.form, you also Have to Edit The Converterutil in THE

SRC / Service Package. Method getopposingObject is your friends, Take a Look at

Name = stringutils.replace (Name, "Model", "WebApp.form"); Name = StringUtils.Replace (Name, "Webapp.form", "Model"); ------------ -------------------------------------------------- ---------------------------- If you rename org.Appfuse.Webapp.form package is Test.Web.form, you also need Edit ConverterUt in the SRC / Service package. Method GetopposingObject is in your

In Friends, please refer to:

Name = stringutils.replace (Name, "Model", "WebApp.form"); Name = StringUtils.Replace (Name, "Webapp.form", "Model"); ------------ -------------------------------------------------- ---- Download source code or detect the AppFuse module from CVS (CVS -D: PServer: guest@cvs.dev.java.net: / cvs co appfuse). Install J2SE1.4 , set the Java_Home environment variable, install ANT1.6.1 , set the ANT_HOME environment variable. Install mysql3.23.x (recommended 4.0.18) and Tomcat4.1.x (recommended 5.0.24 patch version). Set a Catalina_Home environment variable to indicate the installation directory of Tomcat. Optionally, you may refer to my development environment settings and get the link address of the above package. Set a local SMTP server or change the mail.properties file (in the web / web-inf / class directory) and the build.properties file (in the root directory to change the log4j message) to point out the existing SMTP server By default, local copy lib / junit3.8.1 / junit.jar to $ ant_home / lib. Run ant new -dapp.nae = Your app name -ddb.name = your database name. This step will be directed to a name in the same directory as the appfuse to the new directory, run the Ant Setup to create this database and install your application in Tomcat. The database configuration can only work only if your root user does not set a password. If you need, you can change it in the build.properties file. If you want to test and run Ant Test-Reports - will tell you how to see the results reported by this run after it runs. Optional installation If you like to use iBatis as a lasting framework, see Readme.txt In Extras / Ibatis If you like to use the Spring person to speak light web framework, see Readme.txt In Extras / Spring If you want to install iBatis or Spring MVC You can delete extras / iBATIS and EXTRAS / Spring usually before you check into Source Control, you may do this - change your package to "com.company" instead of "org.appfuse ", I usually use Eclipse to rename the package name. Do this, go to package vies, click a package name and right click -> refactor -> rename. Enter * .xml, * .properties, *. Xdt "in file search to find out. Note: If you want to use iBATI, I suggest you install it (explained in extras / ibatis / readme.txt) changing all Before you name. If you don't install it first, you can add IBATIS / SRC as a source code directory, and you can make a package name. Please make sure to change all the package names in the .xml file (including build.xml). You will need to manually change the package name in the Daoibatis file to add "* .xml, * .properties, *. Xdt" to the file search field of the Reading Dame Wizard, the files listed will be automatically better.

If you don't use Eclipse or some parts don't work correctly, you need to confirm that "Org.Appfuse" is correct in the following files to "com.Company": - metadata / web / global-exceptions.xml- web / web -Inf / tiles-config.xml- web / web-inf / class / log4j.properties- web / web-inf / validator-rules-custom.xml- src / service / com / company / service / applicationContext-Service.xml - SRC / DAO / COM / COMPANY / DAO / Hibernate / ApplicationContext-Hibernate.xml- metadata / templates / struts_form.xdt You will need to manually change the Hibernate map file location in ApplicationContext-hibernate.xml file (list is listed above) . In general, "org / appfuse" needs to be changed to "COM / Company" you also need to change some targets in the build.xml file to refer to the new package. These Targets / Changes Please see: - junitdoclet-module - change org. * To com. * - javadoc - change org. * To com. * If you rename org.Appfuse.Webapp.form is Test.Web.form, You also need to edit the ConverterUt in the SRC / Service package. Method GetopposingObject In your friend, please refer to: name = stringutils.replace (Name, "Model", "Webapp.form"); name = StringUtils.Replace (Name, "WebApp.form", "Model");

Originally see: http://raibledesigns.com/wiki/wiki.jsp? Page = AppFuseQuickStart

转载请注明原文地址:https://www.9cbs.com/read-113349.html

New Post(0)