JHipster Cassandra 微服务项目 - 生成器不生成域也不生成服务 类
JHipster Cassandra Microservices Project - the Generator does not Generate Domain nor Service Classes
我有一个包含网关和两个微服务应用程序的 JHipster apps.jh 文件。其中一个微服务应用程序具有 SQL 后端 (PosgreSQL),另一个具有 Cassandra 后端。 运行 命令 jhipster import-jdl apps.jh
生成项目文件夹和所有前端代码(在网关项目中)。此外,生成了 PostgreSQL 微服务的所有实体和服务;然而,Cassanra 微服务的实体和服务都没有生成。
如果我将我的 Cassandra 微服务的 databaseType
更改为 postgresql
,那么会生成实体。
我是运行 JHipseter 7.0.1.
请指教
我最好的,
阿马尔
原来我忽略了 JHipster 输出中的一个错误(在生成代码时)。我忽略的错误是:
Error running generator app: Error: Error parsing file src/main/java/com/saathratri/tajvote/repository/AuthorityRepository.java: Error: Sad sad panda, parsing errors detected in line: 6, column: 46!
Expecting token of type --> Identifier <-- but found --> '<' <--!
->compilationUnit
->ordinaryCompilationUnit
->typeDeclaration
->interfaceDeclaration
->normalInterfaceDeclaration
->extendsInterfaces
->interfaceTypeList
->interfaceType
->classType
at Object.parse (/usr/local/lib/node_modules/generator-jhipster/node_modules/java-parser/src/index.js:40:11)
at Object.parse (/usr/local/lib/node_modules/generator-jhipster/node_modules/prettier-plugin-java/src/parser.js:6:26)
at Object.parse (/usr/local/lib/node_modules/generator-jhipster/node_modules/prettier/index.js:13625:19)
at coreFormat (/usr/local/lib/node_modules/generator-jhipster/node_modules/prettier/index.js:14899:14)
at format (/usr/local/lib/node_modules/generator-jhipster/node_modules/prettier/index.js:15131:14)
at /usr/local/lib/node_modules/generator-jhipster/node_modules/prettier/index.js:57542:12
at Object.format (/usr/local/lib/node_modules/generator-jhipster/node_modules/prettier/index.js:57562:12)
at /usr/local/lib/node_modules/generator-jhipster/generators/generator-transforms.js:50:31
At: package com.saathratri.tajvote.repository;
import com.saathratri.tajvote.domain.Authority;
public interface AuthorityRepository extends <Authority, String> {
}
application {
config {
baseName saathratrigateway,
packageName com.saathratri,
applicationType gateway,
authenticationType oauth2,
databaseType sql,
prodDatabaseType postgresql,
serverPort 8080,
serviceDiscoveryType eureka,
testFrameworks [protractor]
}
entities *
}
application {
config {
baseName geonamesservice,
packageName com.saathratri.geonames,
applicationType microservice,
authenticationType oauth2,
databaseType sql,
prodDatabaseType postgresql,
serverPort 8081,
serviceDiscoveryType eureka
}
entities GnGeoname, GnAdmin1CodeAscii, GnAdmin2Code, GnAlternateName, GnContinentCode, GnCountryInfo, GnHierarchy, GnFeatureCode, GnIsoLanguageCode, GnPostalCode, GnTimeZone
}
application {
config {
baseName tajvoteservice,
packageName com.saathratri.tajvote,
applicationType microservice,
//authenticationType oauth2,
databaseType cassandra,
prodDatabaseType cassandra,
serverPort 8082,
serviceDiscoveryType eureka
}
entities CustomerReviewsByHotel, CustomerReviewsByHotelAndMainStarRating, CustomerReviewsByHotelAndLastNameAndFirstName, RatingByHotelAndReview
}
我不得不为我的 tajvoteservice
Cassandra 服务注释掉 authenticationType oauth2
。现在我的服务和域 类 生成了。
我有一个包含网关和两个微服务应用程序的 JHipster apps.jh 文件。其中一个微服务应用程序具有 SQL 后端 (PosgreSQL),另一个具有 Cassandra 后端。 运行 命令 jhipster import-jdl apps.jh
生成项目文件夹和所有前端代码(在网关项目中)。此外,生成了 PostgreSQL 微服务的所有实体和服务;然而,Cassanra 微服务的实体和服务都没有生成。
如果我将我的 Cassandra 微服务的 databaseType
更改为 postgresql
,那么会生成实体。
我是运行 JHipseter 7.0.1.
请指教
我最好的, 阿马尔
原来我忽略了 JHipster 输出中的一个错误(在生成代码时)。我忽略的错误是:
Error running generator app: Error: Error parsing file src/main/java/com/saathratri/tajvote/repository/AuthorityRepository.java: Error: Sad sad panda, parsing errors detected in line: 6, column: 46!
Expecting token of type --> Identifier <-- but found --> '<' <--!
->compilationUnit
->ordinaryCompilationUnit
->typeDeclaration
->interfaceDeclaration
->normalInterfaceDeclaration
->extendsInterfaces
->interfaceTypeList
->interfaceType
->classType
at Object.parse (/usr/local/lib/node_modules/generator-jhipster/node_modules/java-parser/src/index.js:40:11)
at Object.parse (/usr/local/lib/node_modules/generator-jhipster/node_modules/prettier-plugin-java/src/parser.js:6:26)
at Object.parse (/usr/local/lib/node_modules/generator-jhipster/node_modules/prettier/index.js:13625:19)
at coreFormat (/usr/local/lib/node_modules/generator-jhipster/node_modules/prettier/index.js:14899:14)
at format (/usr/local/lib/node_modules/generator-jhipster/node_modules/prettier/index.js:15131:14)
at /usr/local/lib/node_modules/generator-jhipster/node_modules/prettier/index.js:57542:12
at Object.format (/usr/local/lib/node_modules/generator-jhipster/node_modules/prettier/index.js:57562:12)
at /usr/local/lib/node_modules/generator-jhipster/generators/generator-transforms.js:50:31
At: package com.saathratri.tajvote.repository;
import com.saathratri.tajvote.domain.Authority;
public interface AuthorityRepository extends <Authority, String> {
}
application {
config {
baseName saathratrigateway,
packageName com.saathratri,
applicationType gateway,
authenticationType oauth2,
databaseType sql,
prodDatabaseType postgresql,
serverPort 8080,
serviceDiscoveryType eureka,
testFrameworks [protractor]
}
entities *
}
application {
config {
baseName geonamesservice,
packageName com.saathratri.geonames,
applicationType microservice,
authenticationType oauth2,
databaseType sql,
prodDatabaseType postgresql,
serverPort 8081,
serviceDiscoveryType eureka
}
entities GnGeoname, GnAdmin1CodeAscii, GnAdmin2Code, GnAlternateName, GnContinentCode, GnCountryInfo, GnHierarchy, GnFeatureCode, GnIsoLanguageCode, GnPostalCode, GnTimeZone
}
application {
config {
baseName tajvoteservice,
packageName com.saathratri.tajvote,
applicationType microservice,
//authenticationType oauth2,
databaseType cassandra,
prodDatabaseType cassandra,
serverPort 8082,
serviceDiscoveryType eureka
}
entities CustomerReviewsByHotel, CustomerReviewsByHotelAndMainStarRating, CustomerReviewsByHotelAndLastNameAndFirstName, RatingByHotelAndReview
}
我不得不为我的 tajvoteservice
Cassandra 服务注释掉 authenticationType oauth2
。现在我的服务和域 类 生成了。