I created application with the following jdl.
And then, I ran the test with cypress when it was created successfully. Most of them pass but get some errors in entities that have relationship with User entity in microservice.
I noticed that the application does not automatically add user information to the microservices' databases. This is unlike any other I have done before. I tried removing the kafka option but the result is the same.
Tell me, is my design wrong? Please
Thanks very much
application {
config {
baseName StudySpace
applicationType gateway
packageName io.witcher.studyspace
serverPort 8080
authenticationType oauth2
databaseType sql
devDatabaseType mysql
prodDatabaseType mysql
cacheProvider hazelcast
clientFramework react
buildTool gradle
languages [vi, en]
clientTheme flatly
serviceDiscoveryType consul
testFrameworks [cypress]
messageBroker kafka
}
entities *
}
application {
config {
baseName GroupService
applicationType microservice
packageName io.witcher.studyspace.group_service
serverPort 8081
authenticationType oauth2
databaseType sql
devDatabaseType mysql
prodDatabaseType mysql
buildTool gradle
languages [en, vi]
cacheProvider hazelcast
serviceDiscoveryType consul
testFrameworks [cypress]
messageBroker kafka
}
entities Group, GroupMember, GroupAdmin, WaitingMember
}
application {
config {
baseName ExamStore
applicationType microservice
packageName io.witcher.studyspace.exam_store
serverPort 8082
authenticationType oauth2
databaseType sql
devDatabaseType mysql
prodDatabaseType mysql
buildTool gradle
languages [en, vi]
cacheProvider hazelcast
serviceDiscoveryType consul
testFrameworks [cypress]
messageBroker kafka
}
entities Topic, Exam, ExamItem, Question, Option, QuestionGroup
}
application {
config {
baseName AnswerStore
reactive true
applicationType microservice
packageName io.witcher.studyspace.answer_store
serverPort 8083
authenticationType oauth2
databaseType sql
devDatabaseType mysql
prodDatabaseType mysql
buildTool gradle
languages [en, vi]
cacheProvider hazelcast
serviceDiscoveryType consul
testFrameworks [cypress]
messageBroker kafka
}
entities GroupTimeTable, TimeTable, AnswerSheet, AnswerSheetItem
}
entity GroupAdmin {}
entity WaitingMember {}
entity GroupMember {}
entity Group {
groupId String unique required
name String minlength(5) maxlength(255) required
}
entity Topic {
topicId String unique required
name String minlength(5) maxlength(255) required
}
entity QuestionGroup {
repoId String unique required
name String minlength(5) maxlength(255) required
groupId String
}
entity Question {
content TextBlob required
note TextBlob
}
entity Option {
content TextBlob required
isCorrect Boolean required
}
entity Exam {
examId String unique required
name String minlength(3) maxlength(155) required
duration Integer min(5) max(180) required
mix Integer min(0) max(2) required
groupId String required
}
entity ExamItem {
numOfQuestion Integer required
}
entity GroupTimeTable {
examId String required
startAt Instant required
endAt Instant required
groupId String required
note String
}
entity TimeTable {
title String minlength(2) maxlength(255)
time Instant
note TextBlob required
}
entity AnswerSheet {
time Instant required
}
entity AnswerSheetItem {
questionId Integer required
answerId Integer required
}
relationship ManyToOne {
GroupMember{user(login)} to User
GroupMember{group(groupId)} to Group
WaitingMember{user(login)} to User
WaitingMember{group(groupId)} to Group
GroupAdmin{user(login)} to User
GroupAdmin{group(groupId)} to Group
AnswerSheet{groupTimeTable} to GroupTimeTable
AnswerSheet{user(login)} to User
TimeTable{user(login)} to User
AnswerSheetItem{answerSheet} to AnswerSheet
QuestionGroup{user(login)} to User
QuestionGroup{topic(topicId)} to Topic
Question{repo(repoId)} to QuestionGroup
Option{question} to Question
ExamItem{repo} to QuestionGroup
ExamItem{exam} to Exam
}
dto * with mapstruct
service * with serviceClass
paginate * with infinite-scroll
microservice Group, GroupMember, GroupAdmin, WaitingMember with GroupService
microservice Topic, Exam, ExamItem, Question, Option, QuestionGroup with ExamStore
microservice GroupTimeTable, TimeTable, AnswerSheet, AnswerSheetItem with AnswerStore