java-如何使用PostgreSQL而不是MySQL配置Artifactory?

如何配置PostgreSQL而不是MySQL来运行artifactory

解决方法:

在Artifactory 2上,您可以按照参考说明配置数据源,只需对PostgreSQL做等效操作即可(用等效值代替).

因此,修改$ARTIFACTORY_HOME / etc / artifactory.system.properties以取消注释(并修改)该行:

artifactory.jcr.configPath=repo/postgresql

创建文件

$ARTIFACTORY_HOME/etc/repo/postgresql/repo.xml

本文引用了用作基础的repo.xml,或者您可以找到它here

然后,您需要设置repo.xml的内容以匹配您的数据库设置(从引用的文件中提取了相关部分并进行了修改):

<!-- MySQL Filesystem -->
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
    <param name="driver" value="org.postgresql.Driver"/>
    <param name="url" value="jdbc:postgresql:[your database URL]"/>
    <param name="user" value="artifactory_user"/>
    <param name="password" value="password"/>
    <!-- Leave this on "mysql", don't know how these apply for PostgreSQL -->
    <param name="schema" value="[postgresql??]"/>
    <param name="schemaObjectPrefix" value="rep_"/>
</FileSystem>

<!-- http://wiki.apache.org/jackrabbit/DataStore -->

<!-- MySQL Datastore -->
<DataStore class="org.artifactory.jcr.jackrabbit.ArtifactoryDbDataStoreImpl">
    <param name="url" value="jdbc:postgresql:[your database URL]"/>
    <param name="tablePrefix" value=""/>
    <param name="user" value="artifactory_user"/>
    <param name="password" value="password"/>
    <param name="databaseType" value="postgresql"/>
    <param name="driver" value="org.postgresql.Driver"/>
    <param name="minRecordLength" value="512"/>
    <param name="maxConnections" value="15"/>
    <param name="copyWhenReading" value="true"/>
</DataStore>



    <!-- PostGreSQL Persistance Manager -->
    <PersistenceManager
            class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
        <param name="url"
               value="jdbc:mysql://localhost:3306/artifactory?useUnicode=true&amp;characterEncoding=UTF-8"/>
        <param name="user" value="artifactory_user"/>
        <param name="password" value="password"/>
        <param name="schemaObjectPrefix" value="${wsp.name}_"/>
    </PersistenceManager>

请记住,将PostgreSQL jar拖放到WEB-INF / lib目录中,并按照说明进行操作,最好是对全新安装运行此命令.

祝好运

上一篇:scrapy中发送post请求


下一篇:Sass学习第一天