问题描述
entity Student {
name String,age Integer
}
现在我正在尝试使用 JHipster CLI 并生成我的虚拟项目所需的实体。我注意到默认情况下 JHipster 最终会生成以下内容:
我希望知道我是否可以让 JHipster 跳过生成其余控制器,因为我想手动添加自定义其余控制器。我知道我只能单独删除这些控制器(以及生成的集成测试)。
有什么办法可以控制吗?我已经尝试使用 jhipster import-jdl
的所有 cli 选项,但还没有成功。
这是我正在使用的命令
jhipster import-jdl src/main/resources/student.jh
这是完整的输出
jhipster -d import-jdl src/main/resources/student.jh
INFO! Using JHipster version installed globally
DEBUG! Executing CLI only script
DEBUG! cmd: import-jdl from ./import-jdl
DEBUG! args: [object Undefined]
INFO! Executing import-jdl src/main/resources/student.jh
DEBUG! Options: debug: true,skip-install: false,interactive: false,json-only: false,ignore-application: false,ignore-deployments: false,skip-ui-grouping: false,skip-db-changelog: false,skip-sample-repository: false,skipInstall: false,jsonOnly: false,ignoreApplication: false,ignoreDeployments: false,skipUiGrouping: false,skipdbChangelog: false,skipSampleRepository: false,from-cli: true,fromCli: true,inline:
DEBUG! JDLProcessor started with files: src/main/resources/student.jh and options: debug: true,fromCli: true
INFO! Found .yo-rc.json on path. This is an existing app
INFO! The JDL is being parsed.
DEBUG! importState exportedEntities: 1
DEBUG! importState exportedApplications: 0
DEBUG! importState exportedDeployments: 0
INFO! Found entities: Student.
INFO! The JDL has been successfully parsed
DEBUG! Applications not generated
INFO! Generating 1 entity.
DEBUG! Generator is starting
Found the .jhipster/Student.json configuration file,entity can be automatically generated!
The entity Student is being updated.
DEBUG! Generator is starting
DEBUG! Time taken to write files: 62ms
create src/main/resources/config/liquibase/changelog/20210202113651_added_entity_Student.xml
create src/main/resources/config/liquibase/fake-data/student.csv
create src/main/java/org/rationaleemotions/domain/Student.java
create src/main/java/org/rationaleemotions/web/rest/StudentResource.java
create src/main/java/org/rationaleemotions/repository/search/StudentSearchRepository.java
create src/main/java/org/rationaleemotions/repository/StudentRepository.java
create src/test/java/org/rationaleemotions/web/rest/StudentResourceIT.java
create src/test/java/org/rationaleemotions/repository/search/StudentSearchRepositoryMockConfiguration.java
create src/test/java/org/rationaleemotions/domain/StudentTest.java
force src/main/resources/config/liquibase/master.xml
DEBUG! Generator has ended
DEBUG! Generator has ended
DEBUG! Deployments not generated
INFO! Congratulations,JHipster execution is complete!
以下是我的 JHipster info 命令的完整输出
jhipster info
INFO! Using JHipster version installed globally
INFO! Executing jhipster:info
Welcome to the JHipster @R_176_4045@ion Sub-Generator
##### **JHipster Version(s)**
##### **JHipster configuration,a `.yo-rc.json` file generated in the root folder**
<details>
<summary>.yo-rc.json file</summary>
<pre>
{
"generator-jhipster": {
"promptValues": {
"packageName": "org.rationaleemotions"
},"jhipsterVersion": "6.10.5","applicationType": "microservice","baseName": "necropolis","packageName": "org.rationaleemotions","packageFolder": "org/rationaleemotions","serverPort": "8081","authenticationType": "oauth2","cacheProvider": "hazelcast","enableHibernateCache": true,"websocket": false,"databaseType": "sql","devDatabaseType": "mariadb","prodDatabaseType": "mariadb","searchEngine": "elasticsearch","messagebroker": false,"servicediscoveryType": "eureka","buildTool": "maven","enableSwaggerCodegen": false,"jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglesstextByTheJHipsterInfoCommandForObvIoUsSecurityReasons","embeddableLaunchScript": false,"creationTimestamp": 1611077969383,"testFrameworks": [],"jhiPrefix": "jhi","entitySuffix": "","dtoSuffix": "DTO","otherModules": [],"enableTranslation": false,"clientPackageManager": "npm","blueprints": [],"skipClient": true,"skipUserManagement": true
}
}
</pre>
</details>
##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**
<details>
<summary>JDL entity deFinitions</summary>
<pre>
entity Student {
name String,age Integer
}
microservice Student with necropolis
clientRootFolder Student with necropolis
</pre>
</details>
##### **Environment and Tools**
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9,mixed mode)
git version 2.30.0
node: v14.15.3
yeoman: 3.1.1
Docker version 20.10.0,build 7287ab3
docker-compose version 1.27.4,build 40524192
identical .jhipster/Student.json
INFO! Congratulations,JHipster execution is complete!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)