如果你希望在使用 JDBC 直接方式的应用中切换到使用数据源:
- 停止 Confluence.
- 备份下面的文件,以防止你可能需要重新恢复你的配置:
<installation-directory>/conf/server.xml
<installation-directory>/confluence/WEB-INF/web.xml
<home-directory>/confluence.cfg.xml
- 请按照上面新安装使用的步骤,同时拷贝你的驱动并且将数据源添加到正确的文件中。你可以针对当前数据连接中的配置找到细节信息
<home-directory>/confluence.cfg.xml
。 - 编辑
<home-directory>/confluence.cfg.xml
文件,同时删掉hibernate
元素之前的所有内容。 - 将下面的内容插入到
<properties>
部分。PostgreSQL...
<
property
name
=
"hibernate.setup"
>
<![CDATA[true]]>
</
property
>
<
property
name
=
"hibernate.dialect"
>
<![CDATA[net.sf.hibernate.dialect.PostgreSQLDialect]]>
</
property
>
<
property
name
=
"hibernate.connection.datasource"
>
<![CDATA[java:comp/env/jdbc/confluence]]>
</
property
>
Microsoft SQL Server...
<
property
name
=
"hibernate.setup"
>
<![CDATA[true]]>
</
property
>
<
property
name
=
"hibernate.dialect"
>
<![CDATA[net.sf.hibernate.dialect.SQLServerIntlDialect]]>
</
property
>
<
property
name
=
"hibernate.connection.datasource"
>
<![CDATA[java:comp/env/jdbc/confluence]]>
</
property
>
MySQL...
<
property
name
=
"hibernate.setup"
>
<![CDATA[true]]>
</
property
>
<
property
name
=
"hibernate.dialect"
>
<![CDATA[com.atlassian.hibernate.dialect.MySQLDialect]]>
</
property
>
<
property
name
=
"hibernate.connection.datasource"
>
<![CDATA[java:comp/env/jdbc/confluence]]>
</
property
>
Oracle...
<
property
name
=
"hibernate.setup"
>
<![CDATA[true]]>
</
property
>
<
property
name
=
"hibernate.dialect"
>
<![CDATA[com.atlassian.confluence.impl.hibernate.dialect.OracleDialect]]>
</
property
>
<
property
name
=
"hibernate.connection.datasource"
>
<![CDATA[java:comp/env/jdbc/confluence]]>
</
property
>
- 重启 Confluence.
https://www.cwiki.us/display/CONFLUENCEWIKI/Configuring+a+datasource+connection
原文地址:https://www.cnblogs.com/huyuchengus/p/9157839.html