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

Spring MVC ポートレットへのカスタム設定の追加

written-by

Antonio Ortega

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

問題

  • 新しい Spring MVC ポートレットを作成しました。これをカスタム ポートレット設定で構成したいと考えています。 どうすればそれができますか?

Environment

  • Liferay DXP

解決策

Spring MVC ポートレットを作成したら、以下の手順に従ってカスタム設定を追加する必要があります。

  • configuration.jsp ファイルを作成します。 <h1>Test Config</h1>のようなサンプル コンテンツ を追加できます。 portlet.xml ファイルを変更して、構成ファイルの場所を示し、 config-templateとしてマークします。つまり、 portlet.xml に次のようなものを追加します。
 <init-param>
<name>config-template</name>
<value>/configuration.jsp</value>
</init-param>
  • liferay-portlet.xml を変更し、必要な configuration-action-class を追加します。これについては、セクション ポートレットの設定ページでデフォルト設定タブを作成するで説明されています。 概念実証のために、Liferay が提供する DefaultConfigurationAction クラスを使用できます。 それ以外の場合は、それを拡張するカスタム構成アクション クラスを作成する必要があります。
  • その後、ポートレットを構築してデプロイできます。構成オプションをクリックすると、「Test Config」というタイトルが表示されます。
  • その時点で、以下にリンクした 2 つの記事を読み、この Configuration Action Blade Sample を見て、さらに支援が必要な場合にどのように続行できるかを確認することをお勧めします。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base