简体   繁体   English

如何使用s4sdk设置odata服务?

[英]How to provision odata service by using s4sdk?

I have create a project by using s4sdk and build a spring boot application which can consume the ODATA service provided by a on-premise ABAP backend system (by leveraging VDM). 我已经使用s4sdk创建了一个项目,并构建了一个Spring Boot应用程序,该应用程序可以使用本地ABAP后端系统提供的ODATA服务(通过利用VDM)。 Now I want to make my application able to provision some ODATA service to outside. 现在,我想使我的应用程序能够向外部提供一些ODATA服务。 I know "SAP Cloud Platform SDK for service development" can do it. 我知道“用于服务开发的SAP Cloud Platform SDK”可以做到。 Do I need to introduce it into my project and how? 我需要将其介绍到我的项目中吗? Or "s4sdk" already contains it. 或“ s4sdk”已包含它。 I notice I can already use the annotation like "@Read" to create service implementation class in my project. 我注意到我已经可以在项目中使用“ @Read”之类的注释来创建服务实现类。 But after creating the implementation class and put the edmx file under the resource/edmx fold. 但是在创建实现类并将edmx文件放在resource / edmx折叠下之后。 The exposed ODATA service doesn't work. 公开的ODATA服务不起作用。 Any tips for that? 有什么提示吗? Thanks very much. 非常感谢。

Let me refer you to the blog series about the SAP Cloud Platform SDK for service development . 让我向您介绍有关用于服务开发SAP Cloud Platform SDK的博客系列。

The reason why you can use @Read is, as you have already assumed, that the SAP S/4HANA Cloud SDK already declares the SAP Cloud Platform SDK for service development in its BOM. 正如您已经假设的那样,可以使用@Read的原因是,SAP S / 4HANA Cloud SDK已经在其BOM中声明了SAP Cloud Platform SDK用于服务开发。

Apart from that, while the SAP S/4HANA Cloud SDK manages the correct version of the SAP Cloud Platform SDK for service development, we recommend that you mention the dependency of the SAP Cloud Platform SDK for service development explicitly in your pom.xml (w/o hard-wiring its version). 除此之外,虽然SAP S / 4HANA Cloud SDK管理用于服务开发的正确版本的SAP Cloud Platform SDK,但我们建议您在pom.xml中明确提及SAP Cloud Platform SDK用于服务开发的依赖性。 / o硬连线其版本)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM