Currently, Groovy beans are only loaded when creating a GenericGroovyApplicationContext. An improvement would be GenericResourceApplicationContext, or something similar that looks at the file extension to use GroovyBeanDefinitionReader or XMLBeanDefinitionReader, respectively. I did something similar for XD here, but I think this should be in core Spring:
Hmm, a GenericResourceApplicationContext would be a bit of a god class in concept and would only work if Groovy was on the classpath...
Instead, it seems more natural to add that capability to GroovyBeanDefinitionReader itself which has a switch between ".xml" and ".groovy" in its importBeans functionality already: I've extended this to its loadBeanDefinitions variants, being able to redirect XML files to its internal XmlBeanDefinitionReader (which it always had anyway) as well.
This also translates through to GenericGroovyApplicationContext, being a groovyfied context implementation which now also provides seamless XML support with any of its load methods - and can therefore serve as a generic resource entry point, as long as you have Groovy on the classpath.
As for @ImportResource("config.groovy"), that would currently require an extra reader=GroovyBeanDefinitionReader.class attribute. We can try to smartly pick GroovyBeanDefinitionReader when Groovy is on the classpath there, since it can seamlessly handle XML files now anyway.