Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hitenpratap/cacd9dfcae4209416583 to your computer and use it in GitHub Desktop.
Save hitenpratap/cacd9dfcae4209416583 to your computer and use it in GitHub Desktop.
Prevent Grails Circular Service Dependencies
import org.springframework.context.*
class SecondService implements ApplicationContextAware {
ApplicationContext applicationContext
def firstServiceBean
def getFirstServiceBean() {
firstServiceBean = applicationContext.getBean("firstService")
firstServiceBean.doStuff()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment