java在Geb配置中使用Spring引导的动态端口
SpringBoot的测试框架有一个选项,可以选择一个随机端口来运行'server.port:0'
测试The documentation suggests grabbing the port as a Spring ^{GebConfig.groovy
中的baseUrl
。是否有方法从ConfigSlurper中访问动态端口号
你可以在下面搜索框中键入要查询的问题!
SpringBoot的测试框架有一个选项,可以选择一个随机端口来运行'server.port:0'
测试The documentation suggests grabbing the port as a Spring ^{GebConfig.groovy
中的baseUrl
。是否有方法从ConfigSlurper中访问动态端口号
# 1 楼答案
只需在基本规范中重写
GebSpec.createConf()
: