Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven Running Spring Roo比萨店样品_Maven_Spring Roo - Fatal编程技术网

Maven Running Spring Roo比萨店样品

Maven Running Spring Roo比萨店样品,maven,spring-roo,Maven,Spring Roo,我确实与Spring合作过,但对SpringRoo来说是新手,所以我下载了1.3.2,并希望运行pizzashop示例。 我已经安装了maven 3.2.1和JDK8。我从命令行启动了Roo,并希望在新创建的目录中执行“script pizzashop.Roo”,但出现了几个错误: 裁缝激活网页简单失败,因为我没有网页简单 配置。我解决了这个问题,在没有找到一个 在发布包中或通过Google获得tailor.xml 执行测试失败,因为“未能加载ApplicationContext”。 我怎样才能

我确实与Spring合作过,但对SpringRoo来说是新手,所以我下载了1.3.2,并希望运行pizzashop示例。 我已经安装了maven 3.2.1和JDK8。我从命令行启动了Roo,并希望在新创建的目录中执行“script pizzashop.Roo”,但出现了几个错误:

  • 裁缝激活网页简单失败,因为我没有网页简单 配置。我解决了这个问题,在没有找到一个 在发布包中或通过Google获得tailor.xml
  • 执行测试失败,因为“未能加载ApplicationContext”。 我怎样才能解决这个问题
  • 我运行了perform包,这是成功的,之后我尝试了mvn tomcat:从命令行运行,失败原因如下:

    2015-11-27 09:10:03645[main]错误org.springframework.web.context.ContextLoader-上下文 初始化失败 org.springframework.beans.factory.parsing.Bean定义ParsingException: 配置问题:未能读取候选组件类: 文件 [c:\development\components\roo\u pizza\target\classes\com\springsource\pizzashop\domain\PizzaOrderPk.class]; 嵌套异常为org.springframework.core.NestedIOException:ASM ClassReader无法解析类文件-可能是由于新的Java 尚未支持的类文件版本:类路径资源 [java/io/Serializable.class]

  • 在我看来,Java8似乎不受支持,尽管我阅读了Roo1.3中添加的Java8支持。(我对ApplicationContext问题没有想法。) 下周我想做一个Roo的演示,非常感谢您的帮助

    谢谢


    TeaBee

    Spring Roo是一个非常灵活的工具,但这意味着它也很复杂和麻烦。当我使用它时,有超过50%的问题需要手动解决才能运行。但另一方面,你有一个强大的工具。
    如果您不适合使用spring,我建议您使用更轻量级、更稳定的工具,如JBoss Forge或generjee。如果您确实需要spring,也可以查看springfuse。

    因此,我开始修复: 首先,我降级到Java7,然后升级到maven 3.3.9。 起初,roo命令“执行测试”无法运行。这需要通过将mvnXXX.cmd文件(在maven\bin中)复制到mvnXXX.bat来修复。看起来roo正在寻找“bat”文件。 现在,一切都很顺利。
    我还注意到,通过运行mvn tomcat:run,Catalina 6.0.29就启动了。所以我改为mvn tomcat7:run。我将恢复到Java8,并发布结果。

    因此,升级到Java8后,roo控制台抱怨无法加载ApplicationContext。 尝试添加:

    <resources>
        <resource>
            <filtering>true</filtering>
            <directory>src/test/resources</directory>
            <includes>
                <include>**/*.properties</include>
            </includes>
            <excludes>
                <exclude>**/*local.properties</exclude>
            </excludes>
        </resource>
        <resource>
            <directory>src/main/resources</directory>
            <includes>
                <include>**/*.properties</include>
                <include>**/*.xml</include>
            </includes>
        </resource>
    </resources>
    
    
    真的
    src/测试/资源
    **/*.物业
    **/*本地物业
    src/main/resources
    **/*.物业
    **/*.xml
    

    到pom.xml,但没有帮助。

    因此,这里是我为启用Java8所做的修改。 java设置为1.8 aspectj设置为1.8.3 sprint设置为4.2.3.0版本

    投诉:

    The method installFormatters(FormatterRegistry) of type ApplicationConversionServiceFactoryBean must override or implement a supertype method in ApplicationConversionServiceFactoryBean.java
    
    自从installFormatters在Spring4中被弃用以来。 注释掉installFormatters覆盖部分

    将aspectj maven插件升级到1.8.3 将pom.xml中的1.8添加到aspectj maven插件中

    [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]
    c:\development\components\roo_pizza\org\springframework\mock\staticmock\AnnotationDrivenStaticEntityMockingControl.aj:117
    
    [INFO] 
    [INFO] --- aspectj-maven-plugin:1.8:test-compile (default) @ pizzashop ---
    [INFO] Showing AJC message detail for messages of types: [error, warning, fail]
    [WARNING] this affected type is not exposed to the weaver: com.springsource.pizzashop.domain.PizzaOrderPk [Xlint:typeNotExposedToWeaver]
    c:\development\components\roo_pizza\org\springframework\beans\factory\aspectj\AnnotationBeanConfigurerAspect.aj:82
    
    [WARNING] this affected type is not exposed to the weaver: com.springsource.pizzashop.domain.PizzaOrderPk [Xlint:typeNotExposedToWeaver]
    c:\development\components\roo_pizza\org\springframework\beans\factory\aspectj\AnnotationBeanConfigurerAspect.aj:88
    
    [WARNING] this affected type is not exposed to the weaver: com.springsource.pizzashop.domain.PizzaOrderPk [Xlint:typeNotExposedToWeaver]
    c:\development\components\roo_pizza\org\springframework\beans\factory\aspectj\AbstractInterfaceDrivenDependencyInjectionAspect.aj:100
    
    我仍然对这些警告感到不安,但测试通过了,看起来比萨饼店在营业