[姆咪] Spring boot大師請進

作者: kerycheng (kk)   2024-07-05 21:17:32
Spring boot有提供DispatcherServlet對映的方法嗎?
我原本框架是有一個web.xml和customDispatcher.xml
web.xml會去定義
<servlet-mapping>
<servlet-name>customDispatcher</servlet-name>
<url-pattern>/action/*</url-pattern>
</servlet-mapping>
customDispatcher.xml會去定義
<ApplictionService>
<service name="SomeService.do" serviceClass="com.custom.service"
serviceMethod="SomeService">
</ApplicationService>
假設當我前端打了http://localhost:8080/action/SomeService.do
Spring boot接收到了這個/action/*
會去找applicationService中對應的method做執行,再把結果回傳回來
有這種方法嗎?
作者: sixB (6B)   2024-07-05 21:25:00
大師
作者: sustainer123 (caster)   2024-07-05 21:26:00
大師
作者: deatheo (逆十字)   2024-07-05 22:48:00
我記得好像要額外overwrite

Links booklink

Contact Us: admin [ a t ] ucptt.com