此内容没有您所选择的语言版本。

Chapter 4. Compiling the Quarkus Getting Started project


After you have created the Quarkus Getting Started project, you can compile the Hello application and verify that the hello endpoint returns hello.

This example uses the Quarkus built-in development mode. In development mode, you can update the application sources and configurations while your application is running. Your changes will appear in the running application.

Prerequisites

  • You have created the Quarkus Getting Started project.

Procedure

  1. To compile the Quarkus Hello application in development mode, enter the following command from the project directory:

    ./mvnw compile quarkus:dev
    Copy to Clipboard Toggle word wrap

    The following example shows the output of this command:

    2020-04-02 10:53:44,263 INFO  [io.quarkus] (main) getting-started 1.0-SNAPSHOT (powered by 1.7.6.Final-redhat-00014) started in 0.946s. Listening on: http://0.0.0.0:8080
    2020-04-02 10:53:44,267 INFO  [io.quarkus] (main) Profile dev activated. Live Coding activated.
    2020-04-02 10:53:44,267 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy]
    Copy to Clipboard Toggle word wrap
  2. To request the provided endpoint, enter the following command in a new terminal window:

    curl -w "\n" http://localhost:8080/hello
    hello
    Copy to Clipboard Toggle word wrap
    Note

    This example uses the "\n" attribute to automatically add a new line before the output of the command. This prevents your terminal from printing a '%' character or putting both the result and the next command prompt on the same line.

  3. To stop the application, press CTRL+C.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat