Closed rwinch closed 8 months ago
Adding testjars/application-($beanName).yml or testjars/application-($beanName).properties to the test jar would be a nice convention. For example:
testjars/application-($beanName).yml
testjars/application-($beanName).properties
@Bean @DynamicProperty(name = "messages.url", value = "'http://localhost:' + port") static CommonsExecWebServer messagesApiServer() { return CommonsExecWebServer.builder() .classpath(cp -> cp .files("build/libs/messages-0.0.1-SNAPSHOT.jar") ) .build(); }
You could set the foo property to bar for the messages application using a yml file at:
foo
bar
src/test/resources/testjars/application-messagesApiServer.yml
foo: bar
Adding
testjars/application-($beanName).yml
ortestjars/application-($beanName).properties
to the test jar would be a nice convention. For example:You could set the
foo
property tobar
for the messages application using a yml file at:src/test/resources/testjars/application-messagesApiServer.yml