Tomcat10巨坑,软件不是越新越好。(⽤到tomcat9及以下就可
以)
tomcat的版本也不易太⽼,否则会导致理论和实际不相适应: (尽量使⽤tomcat 8.x、tomcat 8.5、tomcat 9)
Tomcat10巨坑
结论: t o m c a t 9 和 t o m c a t 10 的依赖包不是同⼀个。 \color{#FF3030}{结论:tomcat9和tomcat10的依赖包不是同⼀个。}结论:tomcat9和tomcat10的依赖包不是同⼀个。servlet和tomcat的关系
tomcat9的包名以javax开头:javax.*
t o m c a t 10 的包名更改为: j a k a r t a . ∗ \color{#FF3030}{tomcat10的包名更改为:jakarta.*}tomcat10的包名更改为:jakarta.∗
官⽹说名:
Users of Tomcat 10 onwards should be aware that, as a result of the move from Java EE to Jakarta EE
as part of the transfer of Java EE to the Eclipse Foundation, the primary package for all implemented APIs has changed from j a v a x . ∗ \color{#FF3030}{javax.*}javax.∗toj a k a r t a . ∗ \color{#FF3030}{jakarta.*}jakarta.∗. This will almost certainly require code changes to enable applications to migrate from Tomcat 9 and earlier to Tomcat 10 and later. A migration tool is under development to aid this process.
⽽且tomcat10在结合springMVC使⽤时,DispatcherServlet在配置时会报错。
现在(2021年3⽉30⽇)DispatcherServlet导的包:
软件不是越新越好。
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论