0

我们正在使用org.codehaus.btm:btm:2.1.4我们的测试,我们看到这些文件出现在我们的 maven 模块目录(这是工作目录)中:

  • btm1.tlog
  • btm2.tlog

我希望它们在另一个目录中创建,例如在target/btmlogs/. 我该如何配置 BTM 来做到这一点?

4

1 回答 1

2

您将必须配置 TransactionManager。相关配置部分

在一个名为src/main/resources/bitronix-default-config.properties. 像这样的东西:

# Avoid warnings in test log
bitronix.tm.serverId=foo-bar
# Disable tlog files
bitronix.tm.journal=null
# In case the journal is enabled locally, avoid that the btm1.tlog and btm2.tlog files are created in the module's directory
# causing gitignore, mvn clean and IDE indexing issues
bitronix.tm.journal.disk.logPart1Filename=target/btm/btm1.tlog
bitronix.tm.journal.disk.logPart2Filename=target/btm/btm2.tlog
于 2016-02-25T09:55:18.833 回答