Database URL
, username
, password
различаются в нашей команде разработчиков.Теперь я хочу использовать этот способ и настроить профиль в pom.xml
:
<profiles>
<profile>
<id>local</id>
<properties>
<db.url>jdbc:mysql://127.0.0.1:3306/xx?sendStringParametersAsUnicode=false</db.url>
<db.mysql.username>xx</db.mysql.username>
<db.mysql.password>xx</db.mysql.password>
<serverBaseUrl>http://127.0.0.1:8080</serverBaseUrl>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>test</id>
<properties>
<db.url>jdbc:mysql://xx/xx?sendStringParametersAsUnicode=false</db.url>
<db.mysql.username>xx</db.mysql.username>
<db.mysql.password>xx</db.mysql.password>
<serverBaseUrl>http://xx:8133</serverBaseUrl>
</properties>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
</profile>
</profiles>
Я хочу, чтобы свойства типа db.mysql.username
были установлены в отдельном файле с именем developer-specific-config.properties
, и создать имя файла developer-specific-config.properties.example
, чтобы рассказать другим разработчикам, как использовать.Кроме того, я хотел бы добавить developer-specific-config.properties
к gitignore, чтобы он не отслеживался.
Как это закончить?