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
Describe the bug version: v7.9.1
Unable to use telegram types for automatic binding in SpringBoot.
On the contrary, it can work normally in lower versions, such as: 6.8.0
I tried using multiple versions of SpringBoot3, but it still didn't work
I hope anyone with experience can give me some help.
***************************
APPLICATION FAILED TO START***************************
Description:
Binding to target [Bindable@226b143b type = java.util.List<org.telegram.telegrambots.meta.api.objects.commands.BotCommand>, value ='provided', annotations = array<Annotation>[[empty]], bindMethod = [null]] failed:
Property: exchange-bot.commands[0].command
Value: "/start"
Origin: class path resource [application-bot.yml] -29:16
Reason: The elements [exchange-bot.commands[0].command,exchange-bot.commands[0].description,exchange-bot.commands[1].command,exchange-bot.commands[1].description,exchange-bot.commands[2].command,exchange-bot.commands[2].description,exchange-bot.commands[3].command,exchange-bot.commands[3].description,exchange-bot.commands[4].command,exchange-bot.commands[4].description] were left unbound.
Property: exchange-bot.commands[0].description
The only different here is the removal of the no-arg constructor that was forced in these case for backward compatibility with previous version but was warned that it was only a temporary option and bound to be removed in next major version (aka v7).
As a quick workaround, you should be able to extend the BotCommand class in your project and add a single no-arg constructor that calls the parent constructor, or to implement the constructor you need and use the ConstructorBinding annotation instead of fields binding.
The only different here is the removal of the no-arg constructor that was forced in these case for backward compatibility with previous version but was warned that it was only a temporary option and bound to be removed in next major version (aka v7).
As a quick workaround, you should be able to extend the BotCommand class in your project and add a single no-arg constructor that calls the parent constructor, or to implement the constructor you need and use the ConstructorBinding annotation instead of fields binding.
I have temporarily given up on updating to the new version. The project contains not only BotCommand but also many other types that need to be customized in the configuration file. I hope that in the future, the project team will consider reintroducing the no-argument constructor.
Describe the bug
version: v7.9.1
Unable to use telegram types for automatic binding in SpringBoot.
On the contrary, it can work normally in lower versions, such as: 6.8.0
I tried using multiple versions of SpringBoot3, but it still didn't work
I hope anyone with experience can give me some help.
Error:
Maven:
Before
Now
The text was updated successfully, but these errors were encountered: