Created
April 10, 2021 23:26
-
-
Save leonardortlima/0afdeb5aafc73d0ada9441326fa1e990 to your computer and use it in GitHub Desktop.
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
// Based on https://developer.okta.com/blog/2019/05/23/java-microservices-spring-cloud-config | |
application { | |
config { | |
baseName gateway, | |
packageName com.okta.developer.gateway, | |
applicationType gateway, | |
authenticationType jwt, | |
prodDatabaseType postgresql, | |
serviceDiscoveryType eureka, | |
testFrameworks [protractor] | |
} | |
entities Blog, Post, Tag, Product | |
} | |
application { | |
config { | |
baseName blog, | |
packageName com.okta.developer.blog, | |
applicationType microservice, | |
authenticationType jwt, | |
prodDatabaseType postgresql, | |
serverPort 8081, | |
serviceDiscoveryType eureka | |
} | |
entities Blog, Post, Tag | |
} | |
application { | |
config { | |
baseName store, | |
packageName com.okta.developer.store, | |
applicationType microservice, | |
authenticationType jwt, | |
databaseType mongodb, | |
devDatabaseType mongodb, | |
prodDatabaseType mongodb, | |
enableHibernateCache false, | |
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 { | |
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 | |
// will be created under 'docker-compose' folder | |
deployment { | |
deploymentType docker-compose | |
appsFolders [gateway, blog, store] | |
dockerRepositoryName "jmicro" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment