You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would make sure the servers from the AxonServerConnectionDetails is taken before creating the AxonServerConnectionManager. But apparently that doesn't work all the time.
When debugging, the instance is properly created by this axonServerConfigurationWithConnectionDetails@Bean but it is then later modified by the ConfigurationPropertiesBindingPostProcessor.
From the javadoc for ConfigurationPropertiesBindingPostProcessor:
BeanPostProcessor to bind PropertySources to beans annotated with ConfigurationProperties.
So this does not sound like a ordering issue but tied to the fact that this Bean is annotated with ConfigurationProperties so will always be bound to properties after being instantiated.
Basic information
Steps to reproduce
@TestContainers
AxonServerContainer
as a field of the test class, annotated with@Container
and@ServiceConnection
axon.axonserver.servers
property in a property file withunknownhost
, which is an unresolvable host.Expected behaviour
The
@ServiceConnection
annotation has precedence over property based configuration and the Axon Server test container can be accessed by the test.Actual behaviour
The property
axon.axonserver.servers
set tounknownhost
overrides the configuration generated thanks to the@ServiceConnection
annotation.By looking at JDBC implementation, this precedence is properly handled by having the connection details object (JdbcConnectionDetails) being an interface distinct from the properties object (DataSourceProperties), allowing for a property based implementation of the connection details and a test container based implementation of the same connection details interface.
In Axon Framework, AxonServerConfiguration is both bound to a
ConfigurationProperties
and created by a connection detail factory when using test containers.The text was updated successfully, but these errors were encountered: