Web services 在我实现自定义Web服务后,不再使用platformwebservice
我需要从platformwebservices定制一些DTO和resources,因此我按照Hybris指令为WEB服务创建一个定制扩展 您可以将自己的一个扩展标记为webservice扩展:Web services 在我实现自定义Web服务后,不再使用platformwebservice,web-services,customization,hybris,Web Services,Customization,Hybris,我需要从platformwebservices定制一些DTO和resources,因此我按照Hybris指令为WEB服务创建一个定制扩展 您可以将自己的一个扩展标记为webservice扩展: 1 - Create a new extension using the yempty template. 2 - Add the new extension to localextensions.xml file. 3 - In the command line go to the platform d
1 - Create a new extension using the yempty template.
2 - Add the new extension to localextensions.xml file.
3 - In the command line go to the platform directory and call: ant.
4 - In the command line go to the new extension directory and call ant webservice_nature -Dextname=customextension.
Running this task gives the selected extension a nature of platformwebservices extension. It results in:
1 - Generation of a new web.xml file. If one already exists, it is renamed to web.xml.old.
2 - Generation of the extension_name -web-spring.xml located in extension_name /resources directory, unless it already exists there.
3 - An additional entry in the Platform's local.properties file,
file : local.properties
webservice.module={extensionname}
我可以编译(ant clean all)并启动服务器,但当我尝试在postman中执行请求时,如:
它不工作,它给我一个404错误
如果我删除local extension.xml中的customExtension和local.properties中的“webservice.module={extensionname}”
然后执行请求(相同的url),给出一个200的正确响应
事实上,当设置了我的customExtension时,platformwebservices就不再使用了。您是如何配置扩展的webroots的?当我阅读文档时,它说,我们必须在本地设置自定义扩展的webroot。属性:${extensionname}。weebroot=/${path},关于webroot,我唯一的参考是:mycustomextension.extensioninfo.xml中的::define是否还有其他扩展与该webroot相关?