reactive入门
$ mvn io.quarkus.platform:quarkus-maven-plugin:2.10.0.Final:create \ ✔
-DprojectGroupId=org.example \
-DprojectArtifactId=app-reactive \
-DnoCode
$ cd app-reactive
$ ./mvnw quarkus:add-extension -Dextensions="hibernate-reactive-panache,resteasy-reactive-jackson,reactive-mysql-client,jdbc-mariadb"
在src/main/resource/application.properties
文件中添加数据库配置
quarkus.datasource.db-kind=mariadb
quarkus.datasource.username=hongda
quarkus.datasource.password=hongda
quarkus.datasource.reactive.url=mysql://localhost:3306/quarkus
quarkus.datasource.reactive.max-size=16
# drop and create the database at startup (use `update` to only update the schema)
quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.hibernate-orm.log.sql=true
quarkus.hibernate-orm.sql-load-script=import.sql
$ ./mvnw quarkus:add-extension -Dextensions="quarkus-smallrye-health"
$ ./mvnw quarkus:add-extension -Dextensions="quarkus-smallrye-openapi"