gpt4 book ai didi

jetty - 如何在Spring-boot中轻松配置Jetty?

转载 作者:行者123 更新时间:2023-12-03 09:30:45 26 4
gpt4 key购买 nike

通过学习本教程,我可以使用以下依赖项启动Jetty的spring-boot。

    <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>

但是,如何配置Jetty服务器,例如:
  • 服务器线程(队列线程池)
  • 服务器连接器
  • Https配置。
  • Jetty中所有可用的配置...?

  • 有一个简单的方法可以做
  • application.yml?
  • 配置类?

  • 任何例子将不胜感激。

    非常感谢!!

    最佳答案

    Servlet容器有一些常规扩展点,还有一些将Jetty API调用插入其中的选项,因此,我认为可以满足您的所有需求。一般建议可以在in the docs中找到。 Jetty尚未引起足够的重视,因此声明式配置可能没有与Tomcat相同的选项,并且可以肯定的是它不会被使用太多。如果您想帮助改变这一点,欢迎提供帮助。

    关于jetty - 如何在Spring-boot中轻松配置Jetty?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20454441/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com