Skip to content

Instantly share code, notes, and snippets.

@joeRinehart
Created August 16, 2012 18:34
Show Gist options
  • Save joeRinehart/3372475 to your computer and use it in GitHub Desktop.
Save joeRinehart/3372475 to your computer and use it in GitHub Desktop.
Spring Beans in Bootstrap
import org.springframework.web.context.support.WebApplicationContextUtils
class BootStrap {
def init = { servletContext ->
// Get spring
def springContext = WebApplicationContextUtils.getWebApplicationContext( servletContext )
}
}
import mystuff.WhatAWonderfulUtility
// Place your Spring DSL code here
beans = {
whatAWonderfulUtility( WhatAWonderfulUtility )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment