esanchezros / quickfixj-spring-boot-starter

Spring Boot Starter for QuickFIX/J
Apache License 2.0
125 stars 57 forks source link

quickfixj-spring-boot-starter not working with spring-boot 3.2.0 (only works up-to version 3.1.5) #121

Closed dentalpolitics closed 8 months ago

dentalpolitics commented 8 months ago

Steps to reproduce issue: 1) in quickfixj-spring-boot-starter-examples pom.xml file, change "spring-boot-dependencies" to 3.2.0 2) Launch "Simple Client and Server using Config String" module. Note: things work fine up-to version version 3.1.5

Error message: Parameter 0 of method serverAcceptor in io.allune.quickfixj.spring.boot.starter.configuration.server.QuickFixJServerConfiguration$SocketAcceptorConfiguration required a single bean, but 2 were found:

esanchezros commented 8 months ago

Hey @ntjp,

Thanks for using the library and for reporting this issue. It seems that The version of Spring Framework used by Spring Boot 3.2 no longer attempts to deduce parameter names by parsing bytecode

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes#parameter-name-discovery https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#parameter-name-retention

I recompiled the quickfixj spring boot starter providing the compilation option -parameters and this seems to resolve this issue. Let me have a proper read to the release notes for this spring boot release and will create a new version soon.

Thanks

dentalpolitics commented 8 months ago

thanks a lot for the detailed explanation ! Best Regards

esanchezros commented 8 months ago

I just released version 2.17.0 with the compiler option -parameters set. This should fix the autowiring issue you described.

Please let me know if you find any issues with the new version

dentalpolitics commented 8 months ago

Thanks a lot for the fix ! confirmed to now work fine with spring-boot 3.2.0 Best Regards