Home
Sign Up
Sign In
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member
Sign In
V2EX
›
Java
Spring 里能有多个 MessageDispatcherServlet 吗?
hello2090
·
Jul 25, 2023
· 1292 views
This topic created in 1008 days ago, the information mentioned may be changed or developed.
是这样的,我们有两部分 soap endpoint, A 接受 soap1.1 的请求,B 接受 soap1.2 的,如果我能分别配置一个 MessageDispatcherServlet, 那我可以一个配 1.1 的 MessageFactory 一个配 1.2 的
但是跑起来以后只有一部分能连上,另一部分报 404. Actuator 看了一下,只有一个 MessageDispatcherServlet, 这就可以解释为啥报 404 了
code 是这样的
结果就是,只有一个 servlet 成功注册上了
SOAP
actuator
servlet
endpoint
1 replies
1
hello2090
OP
Jul 26, 2023
解决啦 根据
https://github.com/spring-projects/spring-boot/issues/19605
需要调一下 ServletRegistrationBean.setName() 因为没有 name 的话只能根据类型,这样一个类型只能注册一个,给他们设置不同的 name 就好了
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
3260 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 29ms ·
UTC 13:49
·
PVG 21:49
·
LAX 06:49
·
JFK 09:49
♥ Do have faith in what you're doing.
❯