如何使用Spring Roo shell 1.3.1.RC1创建仅文件 FILEVO_Roo_JavaBean.aj
此命令会生成许多文件:
start
答案 0 :(得分:0)
您是否手动创建了.aj
个文件?此文件由Spring roo管理,不应由用户修改(既不创建)。
创建实体的命令序列应为:
roo> entity jpa --class x.y.FileVO
Created SRC_MAIN_JAVA/x/y/FileVO.java
Created SRC_MAIN_JAVA/x/y/FileVO_Roo_Configurable.aj
Created SRC_MAIN_JAVA/x/y/FileVO_Roo_Jpa_Entity.aj
Created SRC_MAIN_JAVA/x/y/FileVO_Roo_Jpa_ActiveRecord.aj
Created SRC_MAIN_JAVA/x/y/FileVO_Roo_ToString.aj
~.FileVO roo> field string --fieldName name
Updated SRC_MAIN_JAVA/x/y/FileVO.java
Updated SRC_MAIN_JAVA/x/y/FileVO_Roo_Jpa_ActiveRecord.aj
Created SRC_MAIN_JAVA/x/y/FileVO_Roo_JavaBean.aj
~.FileVO roo> test integration
Created SRC_TEST_JAVA/x/y
Created SRC_TEST_JAVA/x/y/FileVODataOnDemand.java
Created SRC_TEST_JAVA/x/y/FileVOIntegrationTest.java
Created SRC_TEST_JAVA/x/y/FileVODataOnDemand_Roo_DataOnDemand.aj
Created SRC_TEST_JAVA/x/y/FileVODataOnDemand_Roo_Configurable.aj
Created SRC_TEST_JAVA/x/y/FileVOIntegrationTest_Roo_Configurable.aj
Created SRC_TEST_JAVA/x/y/FileVOIntegrationTest_Roo_IntegrationTest.aj
~.FileVO roo>
正如您所看到的,FileVO_Roo_JavaBean.aj
是在需要时创建的: FileVO 之后有第一个字段(此 .aj 生成类&#的getter和setter 39; s属性,因此,如果在类中没有属性,则不会生成它。
另外,我建议您更新到当前的Spring Roo版本:1.3.2
祝你好运!