-
Notifications
You must be signed in to change notification settings - Fork 20
/
apps.jh
85 lines (74 loc) · 1.64 KB
/
apps.jh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
application { // <1>
config {
baseName gateway,
packageName com.okta.developer.gateway,
applicationType gateway,
authenticationType oauth2, // <2>
prodDatabaseType postgresql,
searchEngine elasticsearch, // <3>
serviceDiscoveryType eureka, // <4>
testFrameworks [protractor] // <5>
}
entities Blog, Post, Tag, Product
}
application {
config {
baseName blog,
packageName com.okta.developer.blog,
applicationType microservice, // <6>
authenticationType oauth2, // <7>
prodDatabaseType postgresql,
searchEngine elasticsearch,
serverPort 8081, // <8>
serviceDiscoveryType eureka
}
entities Blog, Post, Tag
}
application {
config {
baseName store,
packageName com.okta.developer.store,
applicationType microservice,
authenticationType oauth2,
databaseType mongodb, // <9>
devDatabaseType mongodb,
prodDatabaseType mongodb,
enableHibernateCache false,
searchEngine elasticsearch,
serverPort 8082,
serviceDiscoveryType eureka
}
entities Product
}
// <10>
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
}
// <11>
relationship ManyToOne {
Blog{user(login)} to User,
Post{blog(name)} to Blog
}
relationship ManyToMany {
Post{tag(name)} to Tag{post}
}
// <12>
paginate Post, Tag with infinite-scroll
paginate Product with pagination
// <13>
microservice Product with store
microservice Blog, Post, Tag with blog