Skip to content

Conversation

@peyerroger
Copy link

Removed ServerConfigAvailableCondition and ClientConfigAvailableCondition from auto configuration, since this condition is not met if one provides his own server or client SessionSettings Bean.

…tion from auto configuration, since this condition is not met if one provides his own server or client SessionSettings Bean.
@codecov-io
Copy link

codecov-io commented May 1, 2020

Codecov Report

Merging #39 into master will decrease coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
- Coverage   93.47%   93.37%   -0.10%     
==========================================
  Files          17       17              
  Lines         291      287       -4     
  Branches       23       23              
==========================================
- Hits          272      268       -4     
  Misses         10       10              
  Partials        9        9              
Impacted Files Coverage Δ
...igure/client/QuickFixJClientAutoConfiguration.java 96.77% <ø> (-0.20%) ⬇️
...igure/server/QuickFixJServerAutoConfiguration.java 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c8ed9f...d516d63. Read the comment docs.

… Reverted code style in QuickFixJClientAutoConfiguration
@esanchezros
Copy link
Owner

Hi @peyerroger

Thanks for the PR and for spotting the issue. I have added a couple of unit tests with provided session settings.

@esanchezros esanchezros merged commit 4a7fde7 into esanchezros:master May 2, 2020
@esanchezros
Copy link
Owner

There is an outstanding issue with how beans are named. In the case that a SessionSettings bean is provided with a name other than clientSessionSettings or serverSessionSettings, i.e.

@Bean(name = "customServerSessionSettings")
public SessionSettings customServerSessionSettings() {
	return SessionSettingsLocator.loadSettings("classpath:/quickfixj-server-extra.cfg");
}

the spring boot starter will try to create the default one as the name does not match. If the quickfixj config file for either the client or server is not in one of the default locations, then the spring context will fail to load.

Ideally the starter should be clever enough to determine that there is a SessionSettings bean for either the client or server, and autowire it accordingly.

For now this is a limitation but I will give it some thought and see if it can be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants