Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webserver adapter not supported for springboot 1.x tomcat #465

Open
wengyingjian opened this issue Aug 15, 2024 · 1 comment
Open

webserver adapter not supported for springboot 1.x tomcat #465

wengyingjian opened this issue Aug 15, 2024 · 1 comment

Comments

@wengyingjian
Copy link

首先感谢您使用 DynamicTp,如果使用过程中有任何问题,请按照下述模板反馈问题,请使用 Markdown 语法

版本信息

  • Jdk版本:1.8
  • SpringBoot版本: 1.5.16.RELEASE
  • DynamicTp版本:1.1.7
  • 配置中心类型:
  • 配置中心版本:

问题描述

文字描述、截图、粘代码方式

tomcat web server adapter not started for springboot version under 2.x

复现步骤

  1. xxx
  2. xxx

其他信息

问题原因

tomcat adpter加载过程:

org.dromara.dynamictp.starter.adapter.webserver.autocconfigure.WebServerTpAutoConfiguration
-> org.dromara.dynamictp.starter.adapter.webserver.autocconfigure.condition.ConditionalOnTomcatWebServer
-> org.dromara.dynamictp.starter.adapter.webserver.autocconfigure.condition.OnTomcatWebServerCondition
-> 
    @ConditionalOnBean(
        name = {"tomcatServletWebServerFactory"}
    )

问题原因:
tomcatServletWebServerFactory这个类在springboot2.0之后才引入
springboot1.0之前使用的是TomcatEmbeddedServletContainerFactory

解决方案:
注解上添加sprinboot1.x的tomcat支持

@wengyingjian wengyingjian added the bug Something isn't working label Aug 15, 2024
@yanhom1314
Copy link
Collaborator

可以提个pr

@yanhom1314 yanhom1314 added compatibility and removed bug Something isn't working labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants