SpringBoot分布式架构报错:javax.servlet.servletcohtext.getvirtualserverName()Ljava/lang/string;解决方案

分布式架构中

Description:
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following locat…
org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1321)
The following method did not exist:
javax.servlet.servletcohtext.getvirtualServerName(JLjava/lang/string;

在这里插入图片描述
解决方案:
spring-boot-starter-web 底层web容器 默认tomcat

tomcat容器里默认加载servlet容器,会有servlet-api存在.

main依赖分层的模块,依赖中存在servlet-api,会和main starter-web冲突

猜你喜欢

转载自blog.csdn.net/m0_72568513/article/details/131967107
今日推荐