January 2018
Intermediate to advanced
414 pages
10h 29m
English
As in any Spring Boot application, when we use Netty we can serve static context, but this content will serve reactively with non-blocking IO. Let's first create a new folder in our project under the resource folder; we will name it public. Then, right-click on the folder and choose New | HTML File in the popup menu.
We will edit the file to be like this:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Hello World</title></head><body>Reactive Static Content</body></html>
If we start our server again with:
mvnw spring-boot:run
When visiting http://localhost:8080/index.html, we should get a simple message:
Reactive Static Content
This content has been served as before, but instead of it being a blocking ...
Read now
Unlock full access