0

I want to use Spring-Shell for my project. But it seems that writing commands in it is possible only by using @Clixxx Annotations. All my commands are in an XML file so can I create commands dynamically by reading a file?

  • Can you elaborate on what you mean "my commands are in an xml file"? Maybe provide a link to some visible code? – ebottard Aug 06 '14 at 15:36

1 Answers1

0

You can write a code generator, that parses the xml file with the command definitions and create java classes. That must be happen before compile time.

Maybe it's possible to do that also at runtime. Have a look at dynamically-declare-beans-at-runtime-in-spring

Community
  • 1
  • 1
Cengiz
  • 5,375
  • 6
  • 52
  • 77