Hybris中Local.Properties和Project.Properties有什么区别

时间:2015-06-15 12:14:27

标签: hybris

我做了我的研究,却找不到真实的答案。 来自hybris专家的任何意见都受到高度赞赏。

1 个答案:

答案 0 :(得分:4)

Project properties is found within the platform directory of hybris and provides factory default settings. It is not recommended to edit this file.

Local properties is the working copy of the project.properties file that will be found in the config folder. Use this file to override the default hybris settings.

They both do the same thing, allow you to define database connections, ports, build environment, mail services, frontend https, etc,etc. You might ask why don't you just modify the project.properties file instead? You don't because of the following:

  1. Migration aspects - you don't want to merge your changes into new versions of hybris every time you upgrade
  2. Clustering aspects - you would need a unique project.properties for each cluster, that would be identical bar one change
  3. Value Persistence - similar to migration, the values in project.properties tend to change every version, you'll overwrite your changes when upgrading
  4. File Access Rights Aspects - the project.properties is stored in a different place, in a production environment you might not have access to the hybris platform
  5. Overview Aspects - project.properties contains a huge number of properties, it's will be a lot harder to maintain this

In general any changes you want to make use local.properties in config. Hope that helps.

相关问题