legacy-knowledge-base
公開されました Sep. 10, 2025

サービスビルダが service.xml の json-enabled 設定を尊重しない

written-by

Zalán Szakolci

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • json-enabled値は、JSONシリアライズのためにエンティティをアノテーションするかどうかを指定します。 デフォルトでは、remote-serviceの値がtrueの場合は、json-enabledの値がtrueになります。

  • service.xmlでこの属性をfalseに設定し、サービスを再構築すると、生成されたコードには影響がなく、@JSONWebServiceでアノテーションされた*Serviceインターフェースがまだ表示されます。

環境への配慮

  • ライフレイDXP 7.0

決議

  • サービス用の build.gradle をサービスビルダーのバージョン 1.0.304 でアップデートします。
    dependencies {
    ...
    serviceBuilder group: "com.liferay", name: "com.liferay.portal.tools.service.builder", version: "1.0.304"
    }
  • blade gw buildService」を実行し、ファイル内に「JSONWebService」が存在しないことを確認します。
did-this-article-resolve-your-issue

legacy-knowledge-base