有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何使用Maven创建Stuts2项目

official doc by Apache Struts中,他们提到:

"In your Java IDE create a Java web application with a project name of basic_struts that follows the standard Maven project folder structure"

这是什么意思

  1. 这是否意味着创建一个Maven项目?(但这看起来不像一个网络项目)
  2. 创建动态Web项目?(但是如何使用Maven?我将使用指南中提到的pom.xml文件)

如何使用Maven创建Struts 2应用程序


共 (2) 个答案

  1. # 1 楼答案

    您可以通过选择此原型来创建struts2项目

    org.apache.struts:struts2-archetype-starter
    

    您可以在struts网站上获得关于Maven archetypes的更多信息

    The Starter Archetype (struts2-archetype-starter) The Starter archetype creates a more featured application using several common technologies used in production applications.

    Features

    Sitemesh integration

    Action example (instantiated both through Spring and Struts)

    Spring integration

    Validation example (action and action-alias level)

    Conversion example (global and action level)

    Resource bundle (both global, action and package level)

    mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \ -DartifactId=myWebApp \ -DarchetypeGroupId=org.apache.struts \ -DarchetypeArtifactId=struts2-archetype-starter