-
Notifications
You must be signed in to change notification settings - Fork 31
[4.x] Helidon Data examples #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c1cc144 to
ce16623
Compare
a9e0602 to
e4ec3fb
Compare
5614b59 to
509a2b2
Compare
41ba5c7 to
226203c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directory structure:
- SE examples go at the top level
- MP examples go under microprofile
- Declarative examples go under declarative
Avoid the se, mp suffixes / prefixes.
Keep the examples simple, with a small number of classes:
- Single entity
- Single table
- Single HTTP endpoint
- Single Java package, if possible
Ideally, a basic Helidon Data CRUD example has only 3 classes:
- the JPA entity
- the Repository class
- the HTTP service class.
Anything advanced (E.g. transaction) should go in separate examples.
The existing database examples have been updated recently, make sure you align with those.
- https://github.com/helidon-io/helidon-examples/tree/fbfe2fb21f9c9564c916642705a1c2144ce3210d/examples/dbclient
- https://github.com/helidon-io/helidon-examples/tree/fbfe2fb21f9c9564c916642705a1c2144ce3210d/examples/integrations/cdi/jpa
- https://github.com/helidon-io/helidon-examples/tree/fbfe2fb21f9c9564c916642705a1c2144ce3210d/examples/integrations/cdi/datasource
The examples are duplicated per database, the current choices of databases is MySQL, Oracle, Postgres.
The examples implement the same identical CRUD application, based on the Pokemon theme.
The instructions in the README match the default configuration, the test uses Testcontainers to exercises the HTTP endpoint documented in the README.
Add-on (health, metrics, tracing) are implemented as separate examples.
226203c to
eb68eb8
Compare
examples/data/mysql/src/main/java/io/helidon/examples/data/mysql/PokemonService.java
Outdated
Show resolved
Hide resolved
examples/data/mysql/src/main/java/io/helidon/examples/data/mysql/PokemonService.java
Outdated
Show resolved
Hide resolved
examples/data/mysql/src/main/java/io/helidon/examples/data/mysql/PokemonService.java
Outdated
Show resolved
Hide resolved
examples/data/mysql/src/main/java/io/helidon/examples/data/mysql/PokemonService.java
Outdated
Show resolved
Hide resolved
examples/data/mysql/src/main/java/io/helidon/examples/data/mysql/PokemonService.java
Outdated
Show resolved
Hide resolved
examples/data/mysql/src/main/java/io/helidon/examples/data/mysql/PokemonService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Tomáš Kraus <[email protected]>
Signed-off-by: Tomáš Kraus <[email protected]>
Signed-off-by: Tomáš Kraus <[email protected]>
e6d9c48 to
becda59
Compare
Signed-off-by: Tomáš Kraus <[email protected]>
992e2da to
fb5a969
Compare
|
This PR seems to be broken (git changesets were not updated). Moving to #210 |
Contains 3 examples for Helidon Data:
Added
MethodNamecheckstyle suppression forexamples/data/,examples/declarative/data/andexamples/microprofile/data/because required QbMN method name must contain'_'character.