This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. 日本語portal properties
小沢仁
設定内容 #
概要 #
LiferayのGUIの他に、Liferayは多くの設定をportal.propertiesファイルで行っています。以下の順にプロパティファイルが読み込まれます。後に読み込まれた設定が有効になります。
- Liferayのportal-impl.jarファイルに同梱されているportal.properties
- portal-ext.properties
- GUIからの設定(データベースに保管)
portal.propertiesファイルは以下のフォルダに配置されています。しかし、設定項目を検索する場合のみに利用してください。設定を変更する場合は、必ずportal-ext.propertiesファイルを作成して、そのファイルに記述してください。新規にportal.propertiesファイルを作成すると、エラーになる場合があります。
- Liferayの実行環境:ROOT\WEB-INF\lib\portal-impl.jar
- ソースコード:\portal-impl\src\portal.properties
配置 #
テキストエディタを使って、以下の何れのフォルダにportal-ext.propertiesに作成してください:
- include-and-override=portal-ext.properties
- include-and-override=${liferay.home}/portal-ext.properties
両方のフォルダにportal-ext.propertiesが存在する場合は、portal.propertiesの以下の設定の順で読み込まれます:
- include-and-override=portal-ext.properties
- include-and-override=${liferay.home}/portal-ext.properties
マルチテナント構成を構築された場合は、テナント毎にプロパティファイルを設けることができます。この場合は、bin\setenv.bat又はbin/setenv.shのJava起動オプションJAVA_OPTSに次の設定を追加してください: -Dcompany-id-properties=true この設定がされると、portal-ext.propertiesの後にportal-{会社ID}.properties(例:portal-liferay.com.properties)ファイルが読み込まれます。
なお、Javaの起動時にプロパティファイルを設定する場合は、bin\setenv.bat又はbin/setenv.shのJava起動オプションJAVA_OPTSに次の設定を追加してください。最後に読み込まれます。 -Dexternal-properties=プロパティファイル名