Maven Running Spring Roo比萨店样品
我确实与Spring合作过,但对SpringRoo来说是新手,所以我下载了1.3.2,并希望运行pizzashop示例。 我已经安装了maven 3.2.1和JDK8。我从命令行启动了Roo,并希望在新创建的目录中执行“script pizzashop.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”。 我怎样才能
TeaBeeSpring 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
我仍然对这些警告感到不安,但测试通过了,看起来比萨饼店在营业