You can set portal properties to configure and override Liferay DXP features. Your
installation’s portal-impl.jar
embeds the default properties file:
portal.properties
(Opens New Window)
Overriding a portal property requires creating an extension portal properties file that specifies the properties you’re overriding.
Here’s an example of setting Portal’s data source to a MySQL database by adding
override properties in a [Liferay Home]/portal-ext.properties
file:
jdbc.default.driverClassName=com.mysql.cj.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?characterEncoding=UTF-8&dontTrackOpenResources=true&holdResultsOpenOverStatementClose=true&serverTimezone=GMT&useFastDateParsing=false&useUnicode=true
jdbc.default.username=jbloggs
jdbc.default.password=pass123
The
[include-and-override
](https://docs.liferay.com/dxp/portal/7.2-latest/propertiesdoc/portal.properties.html#Properties Override)
property specifies portal property files that override the defaults. It
specifies the order the files are read—the last file read takes highest
priority.
Properties file prioritization (highest to lowest):
[Liferay Home]/portal-setup-wizard.properties
[user home]/portal-setup-wizard.properties
[Liferay Home]/portal-ext.properties
[user home]/portal-ext.properties
[Liferay Home]/portal-bundle.properties
[user home]/portal-bundle.properties
[Liferay Home]/portal.properties
portal-impl.jar/portal.properties
[Liferay Home]/portal-ext.properties
is the most commonly used file for
overriding the defaults.