gazbert / bxbot

A simple Bitcoin trading bot written in Java.
MIT License
779 stars 275 forks source link

Fixes #84 - TradingStrategy as Spring bean #85

Closed kuceraf closed 6 years ago

kuceraf commented 6 years ago

Geminy exchange is up again so all IT tests are passing.

When this PR merged it could be possible use Spring features in TradingStrategy impl. I do my best to keep it backwards compatible with your original dependency injection framework (which in my opinion is very good). But it can be complicated to maintain and support two approaches to DI in future.

Fell free to improve/change my code in any way.

Merry Christmas ;)

gazbert commented 6 years ago

Thanks for this Filip!

I'm getting a release out today, but will definitely take look at this over the holidays.

I agree with you, I think Spring DI is the way to go long term... same for the exchange adapters too. If I knew Spring at the time, I would have saved myself a lot of work!

We should look to deprecate the legacy DI framework in a future release early next year. I don't think it'll be too much work to migrate the adapters.

Happy Christmas to you too!

gazbert commented 6 years ago

Had a quick review and it looks good Filip!

Am just rebasing the branch before merging the PR...

We'll need to update the docs too: README, example strat javadoc, strat XML and XSD - to recommend Spring bean approach going forwards, but we'll continue to support the legacy method. I should get this done this week and we can go for a release this weekend :-)

kuceraf commented 6 years ago

Thanks for the verificatoin. Happy to contribute to this great project...