Skip to content

Commit e61c87e

Browse files
committed
Serve images from github
See spring-attic/sagan#1017
1 parent 0ca7b7b commit e61c87e

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

README.adoc

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
:project_id: tut-spring-webflux-kotlin-rsocket
55
:tabsize: 2
66
:image-width: 500
7+
:images: https://raw.githubusercontent.com/spring-guides/tut-spring-webflux-kotlin-rsocket/master/images
78
:book-root: .
89

910
The tutorial shows you how to build a simple chat application using Spring Boot and Kotlin. You will learn about the benefits of using Kotlin for server-side development from a syntax perspective.
@@ -31,11 +32,11 @@ This project is based on Spring Boot 2.4.0, which requires Kotlin 1.4.10. Make s
3132

3233
Clone the repository from IntelliJ IDEA by choosing `File | New | Project from Version Control`.
3334

34-
image::./images/download-from-vcs.png[]
35+
image::{images}/download-from-vcs.png[]
3536

3637
Specify the project path: http://github.com/kotlin-hands-on/kotlin-spring-chat.
3738

38-
image::./images/download-from-vcs-github.png[]
39+
image::{images}/download-from-vcs-github.png[]
3940

4041
Once you clone the project, IntelliJ IDEA will import and open it automatically.
4142
Alternatively, you can clone the project with the command line:
@@ -47,7 +48,7 @@ $ git clone https://github.com/kotlin-hands-on/kotlin-spring-chat.
4748

4849
Note that the project includes solution branches for each part of the tutorial. You can browse all the branches in the IDE by invoking the Branches action:
4950

50-
image::./images/intellij-git-branches.png[]
51+
image::{images}/intellij-git-branches.png[]
5152

5253
Or you can use the command line:
5354

@@ -56,36 +57,36 @@ git branch -a
5657

5758
It is possible to use the `Compare with branch` command in IntelliJ IDEA to compare your solution with the proposed one.
5859

59-
image::./images/intellij-git-compare-with-branch.png[]
60+
image::{images}/intellij-git-compare-with-branch.png[]
6061

6162
For instance, here is the list differences between the `initial` branch and `part-2` branch:
6263

63-
image::./images/intellij-git-compare-with-branch-diff.png[]
64+
image::{images}/intellij-git-compare-with-branch-diff.png[]
6465

6566
By clicking on the individual files, you can see the changes at a line level.
6667

67-
image::./images/intellij-git-compare-with-branch-file-diff.png[]
68+
image::{images}/intellij-git-compare-with-branch-file-diff.png[]
6869

6970
This should help you in the event that you have any trouble with the instructions at any stage of the tutorial.
7071

7172
=== Launching the application
7273
The `main` method for the application is located in the `ChatKotlinApplication.kt` file. Simply click on the gutter icon next to the main method or hit the `Alt+Enter` shortcut to invoke the launch menu in IntelliJ IDEA:
7374

74-
image::./images/intellij-run-app-from-main.png[]
75+
image::{images}/intellij-run-app-from-main.png[]
7576

7677
Alternatively, you can run the `./gradlew bootRun` command in the terminal.
7778

7879
Once the application starts, open the following URL: http://localhost:8080. You will see a chat page with a collection of messages.
7980

80-
image::./images/chat.gif[]
81+
image::{images}/chat.gif[]
8182

8283
In the following step, we will demonstrate how to integrate our application with a real database to store the messages.
8384

8485
=== Project overview
8586

8687
Let's take a look at the general application overview. In this tutorial, we are going to build a simple chat application that has the following architecture:
8788

88-
image::./images/application-architecture.png[]
89+
image::{images}/application-architecture.png[]
8990

9091
Our application is an ordinary 3-tier web application. The client facing tier is implemented by the `HtmlController` and `MessagesResource` classes. The application makes use of server-side rendering via the _Thymeleaf_ template engine and is served by `HtmlController`. The message data API is provided by `MessagesResource`, which connects to the service layer.
9192

@@ -98,7 +99,7 @@ The `PersistentMessageService` connects to a database to store the messages. We
9899

99100
After you have downloaded the project sources and opened them in the IDE, you will see the following structure, which includes the classes mentioned above.
100101

101-
image::./images/project-tree.png[]
102+
image::{images}/project-tree.png[]
102103

103104

104105
Under the `main/kotlin` folder there are packages and classes that belong to the application. In that folder, we are going to add more classes and make changes to the existing code to evolve the application.
@@ -287,7 +288,7 @@ runtimeOnly("com.h2database:h2")
287288

288289
⚠️ To refresh the list of the project dependencies, click on the little elephant icon that appears in the top right-hand corner of the editor.
289290

290-
image::./images/intellij-gradle-reload.png[]
291+
image::{images}/intellij-gradle-reload.png[]
291292

292293
=== Create database schema and configuration
293294

@@ -307,7 +308,7 @@ CREATE TABLE IF NOT EXISTS messages (
307308

308309
⌨️ Create a new folder called `sql` in the `src/main/resources` directory. Then put the SQL code from above into the `src/main/resources/sql/schema.sql` file.
309310

310-
image::./images/schema-sql-location.png[]
311+
image::{images}/schema-sql-location.png[]
311312

312313
Also, you should modify `application.properties` so it contains the following attributes:
313314

@@ -607,7 +608,7 @@ The test above looks similar to the previous one, except we check that the poste
607608

608609
Once we have implemented all these tests, we can run them and see whether they pass.
609610

610-
image::./images/intellij-running-tests.png[]
611+
image::{images}/intellij-running-tests.png[]
611612

612613
At this stage, we added message persistence to our chat application. The messages can now be delivered to all active clients that connect to the application. Additionally, we can now access the historical data, so everyone can read previous messages if they need to.
613614

0 commit comments

Comments
 (0)