Configuring service.properties

This tutorial explains how to use and edit the service.properties file. It also tells you about the properties and how to set them to fit your needs.

Service Builder generates a service.properties file in your *-service module’s src/main/resources folder. Liferay DXP uses this file’s properties to alter your service’s database schema. You should not modify this file directly, but rather make any necessary property overrides in a service-ext.properties file in that same folder.

Here are some of the properties the service.properties file includes:

  • build.namespace: This is the namespace you defined in your service.xml. Liferay distinguishes different modules from each other using their namespaces.
  • build.number: Liferay distinguishes your module’s different Service Builder builds. Each time you deploy a distinct Service Builder build to Liferay, Liferay increments this number.
  • build.date: This is the time of your module’s latest Service Builder build.
  • include-and-override: The default value of this property defines service-ext.properties as an override file for service.properties.

Awesome! You now have all the tools necessary to set up your own service-ext.properties file.

What is Service Builder?

Creating Local Services

« Customizing Model Entities With Model HintsConnecting Service Builder to External Databases »
この記事は役に立ちましたか?
0人中0人がこの記事が役に立ったと言っています