【问题标题】:Spring Roo: 'web mvc setup' fails with 'display name required'Spring Roo:“web mvc 设置”失败并显示“需要显示名称”
【发布时间】:2012-03-04 06:39:41
【问题描述】:

我正在尝试遵循 Spring Roo 教程:

http://static.springsource.org/spring-roo/reference/html/beginning.html

我能够创建实体并通过集成测试。

但是,当我继续创建控制器时,以下命令失败:

roo> web mvc setup
Created ROOT/src/main/webapp/WEB-INF/spring
Created ROOT/src/main/webapp/WEB-INF/spring/webmvc-config.xml
Undo create ROOT/src/main/webapp/WEB-INF/spring/webmvc-config.xml
Undo create ROOT/src/main/webapp/WEB-INF/spring
display name required

当我进入下一个 Roo 步骤时,我得到以下信息:

roo> web mvc all --package ~.web
Command 'web mvc all --package ~.web' was found but is not currently available (type      'help' then ENTER to learn about this command)

关于如何解决这些问题的任何想法?谢谢。

【问题讨论】:

  • 注意,我使用的是 Roo 1.21 版。我切换到 1.1.5 版本,上面的命令按预期工作。

标签: spring-roo


【解决方案1】:

您可以在 pom.xml 中看到标记(大约第 8 行)必须定义其名称。 例如

package com.linux.gg

标签名称(第 8 行)应该是

  3     <modelVersion>4.0.0</modelVersion>
  4     <groupId>com.linux.gg</groupId>
  5     <artifactId>gg</artifactId>
  6     <packaging>gg</packaging>
  7     <version>0.1.0.BUILD-SNAPSHOT</version>
  8     <name>gg</name>

如果你删除第8行的gg,就会报错。

display name required

如果此解决方案不能解决您的问题。您可以找到一些缺少值的标签(例如名称、显示)并为它们分配最后一个包目录的名称。 (作为gg)

你可以从这里看到一些关于你的问题的信息。

http://git.springsource.org/roo/roo/commit/c6d1759768d828b67c86da0350079b22135a764f.html

【讨论】:

    猜你喜欢
    • 2016-06-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-17
    • 1970-01-01
    • 1970-01-01
    • 2022-12-09
    相关资源
    最近更新 更多