appfuse2中创建工程的简单步骤

xiaoxiao2021-03-01  38

第一步 创建基于Struts 2 Basic的项目:mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject

myproject是工程名,DarchetypeVersion=2.0.2是版本号,可以到官方网站http://appfuse.org/display/APF/Home查看最新版本以及更新文档。

 

第二步:修改"新建工程/pom.xml"配置文件

   1.修改生成代码方式,找到      <genericCore>${amp.genericCore}</genericCore>      <fullSource>${amp.fullSource}</fullSource>      修改成:       <genericCore>false</genericCore>      <fullSource>true</fullSource>      注意,这里必须吧pom.xml中的genericCore属性设为false 否则只会生成Action

   2.数据库配置信息(在最底下)

 

 第三步:mvn appfuse:full-source

 

 第四步:加入eclipse工程文件,方便导入到eclipse mvn eclipse:eclipse

 

 第五步:eclipse下开发, mvn jetty:run-war发布,http://localhost:8080浏览。

 如何tomcat下调试还不清楚,郁闷,解决后补充上。

相关资源:2021美赛A题思路
转载请注明原文地址: https://www.6miu.com/read-3350168.html

最新回复(0)