如何在liferay 7中使用DDMSStructureKey获取DDMStrutre?

如何在liferay 7中使用DDMSStructureKey获取DDMStrutre?,liferay,liferay-7,Liferay,Liferay 7,在liferay 6.2中,我们可以使用 DDMSStructureLocalServiceUtil使用DDMSStructureKey获取DDMSStructure 在liferay 7或DXP中,如何使用DDMSStructureKey获取DDM结构 问候,, Ravi使用@Reference注释在组件中注入DDMSStructureLocalServic @Reference private DDMStructureLocalServic service; 要启用属性批注,请将此依赖项添

在liferay 6.2中,我们可以使用 DDMSStructureLocalServiceUtil使用DDMSStructureKey获取DDMSStructure

在liferay 7或DXP中,如何使用DDMSStructureKey获取DDM结构

问候,,
Ravi

使用@Reference注释在组件中注入DDMSStructureLocalServic

@Reference
private DDMStructureLocalServic service;
要启用属性批注,请将此依赖项添加到Gradle文件中

org.osgi:org.osgi.service.component.annotations:1.3.0

部署包com.liferay.dynamic.data.mapping.model时出现以下错误导入com.liferay.dynamic.data.mapping.model.ddmsstructure;添加以下调用时:DDMSStructure DDMSStructure=structureLocalService.getStructure(groupId、classNameId、DDMSStructureKey)是否添加了所有必需的依赖项?DDM已移出内核,需要定义为单独的依赖项。我添加了DDM的依赖项。。如何获取classNameId ddmsstructure ddmsstructure=structureLocalService.getStructure(groupId,classNameId,ddmsstructureKey);classNameLocalService