Skip to content

Instantly share code, notes, and snippets.

@deigote
deigote / modules_config.fish
Created May 19, 2014 17:14
An example of the modules definitions for using fish-modules
module "[email protected]:deigote/fish-common.git" fish-common
module "[email protected]:deigote/gh-issues-flow.git" gh-issues-flow
@deigote
deigote / GrailsCheckBeanConfigurationAtRuntime.groovy
Last active August 29, 2015 14:01
Grails - Checking which beans are available and how are they configured
def grailsApplication // Injected by default in controllers, accessible as a regular bean elsewhere
assert grailsApplication.mainContext.getBeanDefinition('sessionFactory') instanceof org.springframework.beans.factory.support.GenericBeanDefinition
// Have I any non-singleton bean ?
grailsApplication.mainContext.getBeanDefinitionNames().any {
!grailsApplication.mainContext.getBeanDefinition(it).singleton
}