Skip to content

Instantly share code, notes, and snippets.

@imechemi
Created November 6, 2019 05:39
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 imechemi/15a30677764e8101bf20e0bbd9813330 to your computer and use it in GitHub Desktop.
Save imechemi/15a30677764e8101bf20e0bbd9813330 to your computer and use it in GitHub Desktop.
How to get ApplicationContext from Spring with Java config
public class Application {
public static void main(String[] args) {
ApplicationContext ctx = new AnnotationConfigApplicationContext(SOTelemetryDbConfig.class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment