JDK21: OpenJDK21/GraalVM-JDK-21
Run a discovery server Consul/Nacos, and change bootstrap.yaml configuration.
# linux
gradlew build
# windows
.\gradlew.bat build
# file out put in ./.jar-output/** as follow:
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2023/12/9 18:27 36518945 alpha-module.jar
-a--- 2023/12/9 18:28 35852461 beta-module.jar
spring-cloud-gateway providing a rest api: /hello
# run
java -jar .jar-output/alpha-module.jar
curl 'http://localhost:8082/hello
# return 'hello world'
simple webflux-application providing a rest api: /beta/hello
# run
java -jar .jar-output/beta-module.jar
curl 'http://localhost:8081/beta/hello
# return 'from beta'
access /beta/hello through gateway with discovery will be block.
only occur when spring.threads.virtual.enabled=true
and running as boot-jar.
curl 'http://localhost:8082/beta/hello
# should return 'from beta'