As Google App Engine will start and stop instances regularly, and this means incurring the cold start time regularly, I'd like to configure my Spring MVC3 app using XML to avoid the 3-5 sec delay caused by scanning the class files for annotations when using annotation configuration when a new instance is spun up.
However writing the xml is a bit of a chore and much easier to use the annotations to define my configuration. So I'd like the best of both worlds and to use the annotations to generate the config file, and then turn off the scanning at runtime. From this question it seems there aren't any existing tools that will do this.
So what is the best way to approach this? Presumably there is a class which does the scanning in spring at runtime that could be re-appropriated to scan at design time and then spit out the xml?
Are there any limitations on things which can be done from the annotation configuration which will not be possible in the xml configuration?