gpt4 book ai didi

java - 如何使用 Arquillian 部署 WildFly 数据源?

转载 作者:行者123 更新时间:2023-11-30 03:23:04 25 4
gpt4 key购买 nike

我尝试按如下方式部署我的数据源:

@Deployment(name = "test", order=2)
static WebArchive createDeployment() {
ShrinkWrap.createFromZipFile(WebArchive, new File("target/test.war")).addAsWebInfResource(new File("src/test/resources/test-DS.xml"), "test-DS.xml")
}

但似乎我的数据源被忽略了,我在 jboss 控制台中看不到有关部署的信息。

还有其他可能使用 arquillian 部署数据源吗?

@Deployment(name = "datasource", order=1)
static ? createDSDeployment() {
?
}

最佳答案

您可以使用单独的standalone*.xml 进行arquillian 测试并在其中指定您的数据源。例如,在 arquillian.xml 中:

   <configuration>
...
<property name="serverConfig">standalone-test.xml</property>
...
</configuration>

和数据源可以在 <datasources> 中描述该独立部分的部分

关于java - 如何使用 Arquillian 部署 WildFly 数据源?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30872296/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com