SpringBoot distributed architecture error: javax.servlet.servletcohtext.getvirtualserverName()Ljava/lang/string; solution

In distributed architecture

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;

insert image description here
Solution:
spring-boot-starter-web underlying web container defaults tomcat

The servlet container is loaded by default in the tomcat container, and there will be servlet-api.

main depends on layered modules, and there is servlet-api in the dependencies, which will conflict with main starter-web

Guess you like

Origin blog.csdn.net/m0_72568513/article/details/131967107