官方doc地址:https://www.ebayopensource.org/wiki/display/TURMERICDOC/Configuring+a+Service+for+Full+REST+Access
按照上边的方法配置,但总提示说找不到页面,火大啦。
最后冷静下来想想,原来是web.xml配置SPFServlet地址有问题:
eclipse plugin默认生成的是:
<servlet-mapping> <servlet-name>MyDemoServiceV1</servlet-name> <url-pattern>/MyDemoServiceV1</url-pattern> </servlet-mapping>
使用restfull风格后要改为通配符,如下:
<servlet-mapping> <servlet-name>MyDemoServiceV1</servlet-name> <url-pattern>/MyDemoServiceV1/*</url-pattern> </servlet-mapping>
如此 http://localhost:8080/MyDemoServiceV1/print/ssss才能找SPFServlet