Skip to content

Commit 4dc656c

Browse files
committed
Updated docs. Added fallback handler. jwt property
1 parent 97bd15d commit 4dc656c

13 files changed

+342
-100
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vscode/

README.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ NOTE: This hands-on tutorial accompanies an https://learning.oreilly.com/live-tr
1717

1818
== Additional Informatioin
1919
* Source code is https://github.com/jclingan/oreilly-microprofile-quarkus-hands-on[available in GitHub].
20-
* https://github.com/jclingan/oreilly-microprofile-quarkus-hands-on/docs[Instructions]
20+
* Tutorial https://github.com/jclingan/oreilly-microprofile-quarkus-hands-on/tree/master/docs[Instructions]
2121
* The accompanying slides are available at [red]#Location TBD#

docs/create-student-service.adoc

+23-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
== Create Student Service
22

3-
Create a simple Quarkus project as a starting point - the "student" service. A default RESTful endpoint is generated. While this workshop utilizes the mvn command line tooling, projects can also be generated at http://code.quarkus.io[code.quarkus.io] using a Web UI.
3+
Create a simple Quarkus project as a starting point - the "student" service. A default RESTful endpoint is generated. While this tutorial utilizes the mvn command line tooling, projects can also be generated at http://code.quarkus.io[code.quarkus.io] using a Web UI.
44

55
. Go to the project's base directory and create project using maven
66
+
@@ -18,6 +18,9 @@ $ mvn io.quarkus:quarkus-maven-plugin:1.1.0.Final:create \
1818
-Dextensions="resteasy-jsonb,smallrye-health"
1919
----
2020
--
21+
+
22+
// *********************************************
23+
'''
2124

2225
. Optional: To see a list of available extensions, type:
2326

@@ -30,6 +33,9 @@ $ mvn io.quarkus:quarkus-maven-plugin:1.1.0.Final:create \
3033
$ mvn quarkus:list-extensions
3134
----
3235
--
36+
+
37+
// *********************************************
38+
'''
3339

3440
. Open project in your favorite IDE
3541
.. Open StudentResource.java and peruse the JAX-RS source code
@@ -56,10 +62,13 @@ public class StudentResource {
5662
}
5763
}
5864
----
65+
66+
NOTE: The generated project does not include a JAX-RS Application class. Quarkus will provide a default JAX-RS Application class if one is not provided by the developer. In addition, Quarkus RESTful resources are `@ApplicationScoped` by default when a scope is not specified. These are non-portable developer convenience features. These points are covered in the https://quarkus.io/guides/getting-started#the-jax-rs-resources[Quarkus Getting Started Guide].
5967
--
6068
6169
+
62-
NOTE: The generated project does not include a JAX-RS Application class. Quarkus will provide a default JAX-RS Application class if one is not provided by the developer. In addition, a single instance of a RESTful resource is created by default. These are non-portable developer convenience features. These points are covered in the https://quarkus.io/guides/getting-started#the-jax-rs-resources[Quarkus Getting Started Guide].
70+
// *********************************************
71+
'''
6372
6473
. Start Quarkus in developer mode
6574
@@ -72,8 +81,8 @@ $ mvn quarkus:dev
7281
----
7382
--
7483
+
75-
76-
// ***********************************************
84+
// *********************************************
85+
'''
7786
7887
. Check that the endpoint returns "hello"
7988
@@ -94,8 +103,8 @@ hello
94103
....
95104
--
96105
+
97-
98-
// ***********************************************
106+
// *********************************************
107+
'''
99108
100109
. Experience live reload. In the StudentResource.java hello() method, replace "Hello" with "Howdy" and save the file
101110
+
@@ -131,8 +140,8 @@ Howdy
131140
....
132141
133142
+
134-
135143
// *********************************************
144+
'''
136145
137146
. In StudentResource.java, create a list of Strings:
138147
+
@@ -146,8 +155,11 @@ public class StudentResource {
146155
----
147156
<1> Add this line
148157
--
158+
+
159+
// *********************************************
160+
'''
149161
150-
. Add a method called listStudents at the "/list" path that returns the students as a JSON array
162+
. Add a method called `listStudents()` at the "/list" path that returns the students as a JSON array
151163
+
152164
--
153165
.StudentResource.java
@@ -161,6 +173,9 @@ public List<String> listStudents() {
161173
}
162174
----
163175
--
176+
+
177+
// *********************************************
178+
'''
164179
165180
. Check the output
166181
+

docs/introduction.adoc

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
== Introduction
22

3-
This lab builds two Java services from scratch that incrementally add Eclipse MicroProfile APIs. The first service is `frontend`, which invokes a `student` backend service that returns a list of students. This domain model is simple so the focus is spent on the MicroProfile APIs themselves.
3+
This tutorial builds two Java services from scratch that incrementally add Eclipse MicroProfile APIs. The first is a `student` service that returns a list of students, which is invoke by a `frontend` service. This domain model is simple so the focus is spent on the MicroProfile APIs themselves.
44

5-
The documented steps in this lab follow a pattern:
5+
The documented steps in this tutorial follow a pattern:
66

77
. Write code
88
. Run a command to test code (curl)
99
. Check output
1010

1111
This pattern flows quickly due to Quarkus' Live Coding feature, and makes checking code changes near-instantaneous so each change can be immediately evaluated.
1212

13-
NOTE: This tutorial will require three terminal windows. Each command block will display the terminal where the command is to be run (_Terminal 1_, _Terminal 2_, _Terminal 3_). As the tutorial progresses, it helps to organize the terminals on your screen so they can all be viewed at the same time. In addition, each code block will show the name of the file to be edited (ex: "StudentResource.java")
13+
NOTE: This tutorial will require three terminal windows. Each command block will display the terminal where the command is to be run - _Terminal 1_, _Terminal 2_, or _Terminal 3_. As the tutorial progresses, it helps to organize the terminals on your screen so they can all be viewed at the same time. In addition, each code block will show the name of the file to be edited (ex: "StudentResource.java")
1414

1515
. Clone the project to your local system
1616
+
1717
--
1818
.Terminal 1
1919
----
20-
$ git clone https://github.com/jclingan/oreilly-microprofile-quarkus-hands-on.git tutorial
20+
$ git clone \
21+
https://github.com/jclingan/oreilly-microprofile-quarkus-hands-on.git \
22+
tutorial
2123
----
2224
.Terminal 1 Output
2325
....

0 commit comments

Comments
 (0)