Last active
December 16, 2021 22:30
-
-
Save mraible/3c97f60c6617e67fd87cd9895d54311c to your computer and use it in GitHub Desktop.
Microservices with JHipster and Import JDL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application { | |
config { | |
baseName gateway, | |
packageName com.okta.developer.gateway, | |
applicationType gateway, | |
authenticationType oauth2, | |
prodDatabaseType postgresql, | |
searchEngine elasticsearch, | |
serviceDiscoveryType eureka, | |
testFrameworks [protractor] | |
} | |
entities Blog, Post, Tag, Product | |
} | |
application { | |
config { | |
baseName blog, | |
packageName com.okta.developer.blog, | |
applicationType microservice, | |
authenticationType oauth2, | |
prodDatabaseType postgresql, | |
searchEngine elasticsearch, | |
serverPort 8081, | |
serviceDiscoveryType eureka | |
} | |
entities Blog, Post, Tag | |
} | |
application { | |
config { | |
baseName store, | |
packageName com.okta.developer.store, | |
applicationType microservice, | |
authenticationType oauth2, | |
databaseType mongodb, | |
devDatabaseType mongodb, | |
prodDatabaseType mongodb, | |
enableHibernateCache false, | |
searchEngine elasticsearch, | |
serverPort 8082, | |
serviceDiscoveryType eureka | |
} | |
entities Product | |
} | |
entity Blog { | |
name String required minlength(3), | |
handle String required minlength(2) | |
} | |
entity Post { | |
title String required, | |
content TextBlob required, | |
date Instant required | |
} | |
entity Tag { | |
name String required minlength(2) | |
} | |
entity Product { | |
title String required, | |
price BigDecimal required min(0), | |
image ImageBlob | |
} | |
relationship ManyToOne { | |
Blog{user(login)} to User, | |
Post{blog(name)} to Blog | |
} | |
relationship ManyToMany { | |
Post{tag(name)} to Tag{post} | |
} | |
paginate Post, Tag with infinite-scroll | |
paginate Product with pagination | |
microservice Product with store | |
microservice Blog, Post, Tag with blog |
Thank you very much for your great tutorials!!!!
It's my pleasure! 😊
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create an
apps.jh
file with the JDL above, then runjhipster import-jdl apps.jh
.Docker commands you need to run before starting each app:
./mvnw
in each application's directory.