为什么配置键“ quarkus.servlet.context-path”不起作用

问题描述 投票:0回答:1

使用quarkus框架在线构建工具来快速建立一个宁静的项目。

然后启动项目,我发现了问题:

提供了无法识别的配置密钥“ quarkus.servlet.context-path”。

不知道是什么原因。

 $ ./mvnw clean compile quarkus:dev
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------< com.xuanwugate:code-testing >---------------------
[INFO] Building code-testing 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ code-testing ---
[INFO] Deleting /Users/xiaods/Desktop/code-testing/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ code-testing ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ code-testing ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /Users/xiaods/Desktop/code-testing/target/classes
[INFO] 
[INFO] --- quarkus-maven-plugin:1.3.1.Final:dev (default-cli) @ code-testing ---
Listening for transport dt_socket at address: 5005
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2020-03-29 23:38:52,287 WARN  [io.qua.config] (main) Unrecognized configuration key "quarkus.servlet.context-path" was provided; it will be ignored
2020-03-29 23:38:52,502 INFO  [io.quarkus] (main) code-testing 1.0.0-SNAPSHOT (powered by Quarkus 1.3.1.Final) started in 0.830s. Listening on: http://0.0.0.0:8080
2020-03-29 23:38:52,503 INFO  [io.quarkus] (main) Profile dev activated. Live Coding activated.
2020-03-29 23:38:52,503 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy]
quarkus
1个回答
0
投票

您是否依赖io.quarkus:quarkus-undertow?如果只有io.quarkus:quarkus-resteasy,则JAX-RS直接在Vert.x之上运行,不存在servlet,并且配置密钥不起作用。如果需要servlet,请添加Undertow,但是如果仅需要配置“根路径”,则可以使用quarkus.http.root-path配置属性。

© www.soinside.com 2019 - 2024. All rights reserved.